Closed zgosalvez closed 3 years ago
Hey, I'm not sure why this isn't working, as the UiKitView actually supports clipping.
Try this:
Card(
margin: EdgeInsets.all(2.0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4.0),
),
clipBehavior: Clip.antiAlias,
color: Colors.black.withOpacity(0.35),
child: Container(
height: 200,
child: ClipRRect(
borderRadius: BorderRadius.circular(4.0),
child: PlatformMap(
onMapCreated: _onMapCreated,
initialCameraPosition: const CameraPosition(
target: LatLng(0.0, 0.0),
),
),
),
),
),
As far as I can tell it should not be the plugins fault to not clip any border Radius and you could maybe open an issue in the official Flutter repository.
Thanks, @LuisThein. We tried this and it does work. 👏🏼
Attempting to clip using a border-radius does not work on iOS. I guess the only way to do so is by having the plugin expose the iOS's
MKMapView.layer.cornerRadius
as a property.