@@ -717,6 +717,7 @@ abstract class AssetPickerBuilderDelegate<Asset, Path> {
717
717
/// The overlay when the permission is limited.
718
718
Widget permissionOverlay (BuildContext context) {
719
719
final Size size = MediaQuery .sizeOf (context);
720
+ final EdgeInsets padding = MediaQuery .paddingOf (context);
720
721
final Widget closeButton = Container (
721
722
margin: const EdgeInsetsDirectional .only (start: 16 , top: 4 ),
722
723
alignment: AlignmentDirectional .centerStart,
@@ -793,7 +794,7 @@ abstract class AssetPickerBuilderDelegate<Asset, Path> {
793
794
child: Semantics (
794
795
sortKey: const OrdinalSortKey (0 ),
795
796
child: Container (
796
- padding: EdgeInsets .only (top: MediaQuery . paddingOf (context) .top),
797
+ padding: EdgeInsets .only (top: padding .top),
797
798
color: context.theme.canvasColor,
798
799
child: Column (
799
800
children: < Widget > [
@@ -803,10 +804,7 @@ abstract class AssetPickerBuilderDelegate<Asset, Path> {
803
804
SizedBox (height: size.height / 18 ),
804
805
accessLimitedButton,
805
806
SizedBox (
806
- height: math.max (
807
- MediaQuery .paddingOf (context).bottom,
808
- 24.0 ,
809
- ),
807
+ height: math.max (padding.bottom, 24.0 ),
810
808
),
811
809
],
812
810
),
@@ -1317,6 +1315,7 @@ class DefaultAssetPickerBuilderDelegate
1317
1315
Widget assetsGridBuilder (BuildContext context) {
1318
1316
appBarPreferredSize ?? = appBar (context).preferredSize;
1319
1317
final bool gridRevert = effectiveShouldRevertGrid (context);
1318
+ final accessibleNavigation = MediaQuery .accessibleNavigationOf (context);
1320
1319
return Selector <DefaultAssetPickerProvider , PathWrapper <AssetPathEntity >?>(
1321
1320
selector: (_, DefaultAssetPickerProvider p) => p.currentPath,
1322
1321
builder: (context, wrapper, _) {
@@ -1374,8 +1373,7 @@ class DefaultAssetPickerBuilderDelegate
1374
1373
);
1375
1374
1376
1375
// Enables drag-to-select.
1377
- if (dragToSelect ??
1378
- ! MediaQuery .accessibleNavigationOf (context)) {
1376
+ if (dragToSelect ?? ! accessibleNavigation) {
1379
1377
child = GestureDetector (
1380
1378
excludeFromSemantics: true ,
1381
1379
onHorizontalDragStart: (d) {
0 commit comments