how to add border radius to google maps in flutter?












1















enter image description here



I added a google map widget into a container with a border radius but google maps corners not rounded .






Container(
height: 100,
width: double.infinity,
margin: EdgeInsets.only(left: 30, right: 30),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30),
border: Border.all(
style: BorderStyle.solid,
),
),
child: GoogleMap(),)












share|improve this question





























    1















    enter image description here



    I added a google map widget into a container with a border radius but google maps corners not rounded .






    Container(
    height: 100,
    width: double.infinity,
    margin: EdgeInsets.only(left: 30, right: 30),
    decoration: BoxDecoration(
    borderRadius: BorderRadius.circular(30),
    border: Border.all(
    style: BorderStyle.solid,
    ),
    ),
    child: GoogleMap(),)












    share|improve this question



























      1












      1








      1


      1






      enter image description here



      I added a google map widget into a container with a border radius but google maps corners not rounded .






      Container(
      height: 100,
      width: double.infinity,
      margin: EdgeInsets.only(left: 30, right: 30),
      decoration: BoxDecoration(
      borderRadius: BorderRadius.circular(30),
      border: Border.all(
      style: BorderStyle.solid,
      ),
      ),
      child: GoogleMap(),)












      share|improve this question
















      enter image description here



      I added a google map widget into a container with a border radius but google maps corners not rounded .






      Container(
      height: 100,
      width: double.infinity,
      margin: EdgeInsets.only(left: 30, right: 30),
      decoration: BoxDecoration(
      borderRadius: BorderRadius.circular(30),
      border: Border.all(
      style: BorderStyle.solid,
      ),
      ),
      child: GoogleMap(),)








      Container(
      height: 100,
      width: double.infinity,
      margin: EdgeInsets.only(left: 30, right: 30),
      decoration: BoxDecoration(
      borderRadius: BorderRadius.circular(30),
      border: Border.all(
      style: BorderStyle.solid,
      ),
      ),
      child: GoogleMap(),)





      Container(
      height: 100,
      width: double.infinity,
      margin: EdgeInsets.only(left: 30, right: 30),
      decoration: BoxDecoration(
      borderRadius: BorderRadius.circular(30),
      border: Border.all(
      style: BorderStyle.solid,
      ),
      ),
      child: GoogleMap(),)






      flutter flutter-layout






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 29 '18 at 19:24







      a7me63azza8

















      asked Dec 29 '18 at 19:05









      a7me63azza8a7me63azza8

      237




      237
























          2 Answers
          2






          active

          oldest

          votes


















          1














          probably an expensive solution but you could use ClipRRect. Something like this:



          Widget build(BuildContext context) {
          return Center(
          child: ClipRRect(
          borderRadius: BorderRadius.only(
          topLeft: Radius.circular(30),
          topRight: Radius.circular(30),
          bottomRight: Radius.circular(30),
          bottomLeft: Radius.circular(30),
          ),
          child: Align(
          alignment: Alignment.bottomRight,
          heightFactor: 0.3,
          widthFactor: 2.5,
          child: GoogleMap(),
          ),
          ),
          );
          }





          share|improve this answer


























          • if you're happy with the answer you should mark it correct and up vote it,,thanks

            – flutter
            Dec 30 '18 at 16:23











          • Hmm doing this doesn't seem to work for me. I am still left with a rectangular google maps

            – john.zli
            Jan 20 at 5:39



















          2














          Keep in mind that the google_maps_flutter plugin is only a developer preview. I'm sure a lot more work will be added to this before they release version 1.0. So don't stress too much about missing features. File tickets. :)






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53972558%2fhow-to-add-border-radius-to-google-maps-in-flutter%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            probably an expensive solution but you could use ClipRRect. Something like this:



            Widget build(BuildContext context) {
            return Center(
            child: ClipRRect(
            borderRadius: BorderRadius.only(
            topLeft: Radius.circular(30),
            topRight: Radius.circular(30),
            bottomRight: Radius.circular(30),
            bottomLeft: Radius.circular(30),
            ),
            child: Align(
            alignment: Alignment.bottomRight,
            heightFactor: 0.3,
            widthFactor: 2.5,
            child: GoogleMap(),
            ),
            ),
            );
            }





            share|improve this answer


























            • if you're happy with the answer you should mark it correct and up vote it,,thanks

              – flutter
              Dec 30 '18 at 16:23











            • Hmm doing this doesn't seem to work for me. I am still left with a rectangular google maps

              – john.zli
              Jan 20 at 5:39
















            1














            probably an expensive solution but you could use ClipRRect. Something like this:



            Widget build(BuildContext context) {
            return Center(
            child: ClipRRect(
            borderRadius: BorderRadius.only(
            topLeft: Radius.circular(30),
            topRight: Radius.circular(30),
            bottomRight: Radius.circular(30),
            bottomLeft: Radius.circular(30),
            ),
            child: Align(
            alignment: Alignment.bottomRight,
            heightFactor: 0.3,
            widthFactor: 2.5,
            child: GoogleMap(),
            ),
            ),
            );
            }





            share|improve this answer


























            • if you're happy with the answer you should mark it correct and up vote it,,thanks

              – flutter
              Dec 30 '18 at 16:23











            • Hmm doing this doesn't seem to work for me. I am still left with a rectangular google maps

              – john.zli
              Jan 20 at 5:39














            1












            1








            1







            probably an expensive solution but you could use ClipRRect. Something like this:



            Widget build(BuildContext context) {
            return Center(
            child: ClipRRect(
            borderRadius: BorderRadius.only(
            topLeft: Radius.circular(30),
            topRight: Radius.circular(30),
            bottomRight: Radius.circular(30),
            bottomLeft: Radius.circular(30),
            ),
            child: Align(
            alignment: Alignment.bottomRight,
            heightFactor: 0.3,
            widthFactor: 2.5,
            child: GoogleMap(),
            ),
            ),
            );
            }





            share|improve this answer















            probably an expensive solution but you could use ClipRRect. Something like this:



            Widget build(BuildContext context) {
            return Center(
            child: ClipRRect(
            borderRadius: BorderRadius.only(
            topLeft: Radius.circular(30),
            topRight: Radius.circular(30),
            bottomRight: Radius.circular(30),
            bottomLeft: Radius.circular(30),
            ),
            child: Align(
            alignment: Alignment.bottomRight,
            heightFactor: 0.3,
            widthFactor: 2.5,
            child: GoogleMap(),
            ),
            ),
            );
            }






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Dec 29 '18 at 20:56

























            answered Dec 29 '18 at 20:49









            flutterflutter

            4223821




            4223821













            • if you're happy with the answer you should mark it correct and up vote it,,thanks

              – flutter
              Dec 30 '18 at 16:23











            • Hmm doing this doesn't seem to work for me. I am still left with a rectangular google maps

              – john.zli
              Jan 20 at 5:39



















            • if you're happy with the answer you should mark it correct and up vote it,,thanks

              – flutter
              Dec 30 '18 at 16:23











            • Hmm doing this doesn't seem to work for me. I am still left with a rectangular google maps

              – john.zli
              Jan 20 at 5:39

















            if you're happy with the answer you should mark it correct and up vote it,,thanks

            – flutter
            Dec 30 '18 at 16:23





            if you're happy with the answer you should mark it correct and up vote it,,thanks

            – flutter
            Dec 30 '18 at 16:23













            Hmm doing this doesn't seem to work for me. I am still left with a rectangular google maps

            – john.zli
            Jan 20 at 5:39





            Hmm doing this doesn't seem to work for me. I am still left with a rectangular google maps

            – john.zli
            Jan 20 at 5:39













            2














            Keep in mind that the google_maps_flutter plugin is only a developer preview. I'm sure a lot more work will be added to this before they release version 1.0. So don't stress too much about missing features. File tickets. :)






            share|improve this answer




























              2














              Keep in mind that the google_maps_flutter plugin is only a developer preview. I'm sure a lot more work will be added to this before they release version 1.0. So don't stress too much about missing features. File tickets. :)






              share|improve this answer


























                2












                2








                2







                Keep in mind that the google_maps_flutter plugin is only a developer preview. I'm sure a lot more work will be added to this before they release version 1.0. So don't stress too much about missing features. File tickets. :)






                share|improve this answer













                Keep in mind that the google_maps_flutter plugin is only a developer preview. I'm sure a lot more work will be added to this before they release version 1.0. So don't stress too much about missing features. File tickets. :)







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 1 at 0:23









                Randal SchwartzRandal Schwartz

                21k22950




                21k22950






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53972558%2fhow-to-add-border-radius-to-google-maps-in-flutter%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Monofisismo

                    Angular Downloading a file using contenturl with Basic Authentication

                    Olmecas