@@ -32,8 +32,6 @@ import '../widget/gaps.dart';
32
32
import '../widget/platform_progress_indicator.dart' ;
33
33
import '../widget/scale_text.dart' ;
34
34
35
- const String _ordinalNamePermissionOverlay = 'permissionOverlay' ;
36
-
37
35
/// The delegate to build the whole picker's components.
38
36
///
39
37
/// By extending the delegate, you can customize every components on you own.
@@ -179,8 +177,8 @@ abstract class AssetPickerBuilderDelegate<Asset, Path> {
179
177
ValueNotifier <PermissionState >(
180
178
initialPermission,
181
179
);
182
- final ValueNotifier <bool > permissionOverlayHidden =
183
- ValueNotifier <bool >(false );
180
+ late final ValueNotifier <bool > permissionOverlayHidden =
181
+ ValueNotifier <bool >(permission.value.isAuth );
184
182
185
183
/// Whether the permission is limited currently.
186
184
/// 当前的权限是否为受限
@@ -617,10 +615,7 @@ abstract class AssetPickerBuilderDelegate<Asset, Path> {
617
615
}
618
616
return Positioned .fill (
619
617
child: Semantics (
620
- sortKey: const OrdinalSortKey (
621
- 0 ,
622
- name: _ordinalNamePermissionOverlay,
623
- ),
618
+ sortKey: const OrdinalSortKey (0 ),
624
619
child: Container (
625
620
padding: context.mediaQuery.padding,
626
621
color: context.themeData.canvasColor,
@@ -1003,11 +998,7 @@ class DefaultAssetPickerBuilderDelegate
1003
998
if (value) {
1004
999
return child! ;
1005
1000
}
1006
- return Semantics (
1007
- excludeSemantics: true ,
1008
- sortKey: const OrdinalSortKey (1 , name: _ordinalNamePermissionOverlay),
1009
- child: child,
1010
- );
1001
+ return ExcludeSemantics (child: child);
1011
1002
},
1012
1003
child: _layout (context),
1013
1004
);
0 commit comments