@@ -42,6 +42,7 @@ class AppleMap extends StatefulWidget {
42
42
this .onTap,
43
43
this .onLongPress,
44
44
this .snapshotOptions,
45
+ this .insetsLayoutMarginsFromSafeArea = true ,
45
46
}) : super (key: key);
46
47
47
48
final MapCreatedCallback ? onMapCreated;
@@ -165,6 +166,10 @@ class AppleMap extends StatefulWidget {
165
166
166
167
final SnapshotOptions ? snapshotOptions;
167
168
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
+
168
173
@override
169
174
State createState () => _AppleMapState ();
170
175
}
@@ -336,6 +341,7 @@ class _AppleMapOptions {
336
341
this .myLocationEnabled,
337
342
this .myLocationButtonEnabled,
338
343
this .padding,
344
+ this .insetsLayoutMarginsFromSafeArea,
339
345
});
340
346
341
347
static _AppleMapOptions fromWidget (AppleMap map) {
@@ -352,6 +358,7 @@ class _AppleMapOptions {
352
358
myLocationEnabled: map.myLocationEnabled,
353
359
myLocationButtonEnabled: map.myLocationButtonEnabled,
354
360
padding: map.padding,
361
+ insetsLayoutMarginsFromSafeArea: map.insetsLayoutMarginsFromSafeArea,
355
362
);
356
363
}
357
364
@@ -379,6 +386,8 @@ class _AppleMapOptions {
379
386
380
387
final EdgeInsets ? padding;
381
388
389
+ final bool ? insetsLayoutMarginsFromSafeArea;
390
+
382
391
Map <String , dynamic > toMap () {
383
392
final Map <String , dynamic > optionsMap = < String , dynamic > {};
384
393
@@ -400,6 +409,8 @@ class _AppleMapOptions {
400
409
addIfNonNull ('myLocationEnabled' , myLocationEnabled);
401
410
addIfNonNull ('myLocationButtonEnabled' , myLocationButtonEnabled);
402
411
addIfNonNull ('padding' , _serializePadding (padding));
412
+ addIfNonNull (
413
+ 'insetsLayoutMarginsFromSafeArea' , insetsLayoutMarginsFromSafeArea);
403
414
return optionsMap;
404
415
}
405
416
0 commit comments