@@ -42,6 +42,7 @@ class AppleMap extends StatefulWidget {
4242 this .onTap,
4343 this .onLongPress,
4444 this .snapshotOptions,
45+ this .insetsLayoutMarginsFromSafeArea = true ,
4546 }) : super (key: key);
4647
4748 final MapCreatedCallback ? onMapCreated;
@@ -165,6 +166,10 @@ class AppleMap extends StatefulWidget {
165166
166167 final SnapshotOptions ? snapshotOptions;
167168
169+ /// A Boolean value indicating whether the view's layout margins are updated
170+ /// automatically to reflect the safe area.
171+ final bool insetsLayoutMarginsFromSafeArea;
172+
168173 @override
169174 State createState () => _AppleMapState ();
170175}
@@ -336,6 +341,7 @@ class _AppleMapOptions {
336341 this .myLocationEnabled,
337342 this .myLocationButtonEnabled,
338343 this .padding,
344+ this .insetsLayoutMarginsFromSafeArea,
339345 });
340346
341347 static _AppleMapOptions fromWidget (AppleMap map) {
@@ -352,6 +358,7 @@ class _AppleMapOptions {
352358 myLocationEnabled: map.myLocationEnabled,
353359 myLocationButtonEnabled: map.myLocationButtonEnabled,
354360 padding: map.padding,
361+ insetsLayoutMarginsFromSafeArea: map.insetsLayoutMarginsFromSafeArea,
355362 );
356363 }
357364
@@ -379,6 +386,8 @@ class _AppleMapOptions {
379386
380387 final EdgeInsets ? padding;
381388
389+ final bool ? insetsLayoutMarginsFromSafeArea;
390+
382391 Map <String , dynamic > toMap () {
383392 final Map <String , dynamic > optionsMap = < String , dynamic > {};
384393
@@ -400,6 +409,8 @@ class _AppleMapOptions {
400409 addIfNonNull ('myLocationEnabled' , myLocationEnabled);
401410 addIfNonNull ('myLocationButtonEnabled' , myLocationButtonEnabled);
402411 addIfNonNull ('padding' , _serializePadding (padding));
412+ addIfNonNull (
413+ 'insetsLayoutMarginsFromSafeArea' , insetsLayoutMarginsFromSafeArea);
403414 return optionsMap;
404415 }
405416
0 commit comments