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(),)
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(),
),
),
);
}
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. :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With