@@ -19,7 +19,6 @@ import '../constants/constants.dart';
19
19
import 'builder/fade_image_builder.dart' ;
20
20
import 'builder/slide_page_transition_builder.dart' ;
21
21
import 'fixed_appbar.dart' ;
22
- import 'platform_progress_indicator.dart' ;
23
22
24
23
class AssetPicker extends StatelessWidget {
25
24
AssetPicker ({
@@ -997,6 +996,18 @@ class AssetPicker extends StatelessWidget {
997
996
),
998
997
);
999
998
999
+ /// Custom app bar for the picker.
1000
+ /// 选择器自定义的顶栏
1001
+ FixedAppBar appBar (BuildContext context) => FixedAppBar (
1002
+ backgroundColor: theme.appBarTheme.color,
1003
+ centerTitle: isAppleOS,
1004
+ title: pathEntitySelector,
1005
+ leading: backButton (context),
1006
+ actions: ! isAppleOS ? < Widget > [confirmButton (context)] : null ,
1007
+ actionsPadding: const EdgeInsets .only (right: 14.0 ),
1008
+ blurRadius: isAppleOS ? appleOSBlurRadius : 0.0 ,
1009
+ );
1010
+
1000
1011
/// Layout for Apple OS devices.
1001
1012
/// 苹果系列设备的选择器布局
1002
1013
Widget appleOSLayout (BuildContext context) {
@@ -1036,14 +1047,7 @@ class AssetPicker extends StatelessWidget {
1036
1047
},
1037
1048
),
1038
1049
),
1039
- FixedAppBar (
1040
- backgroundColor: theme.canvasColor,
1041
- centerTitle: true ,
1042
- title: pathEntitySelector,
1043
- leading: backButton (context),
1044
- actionsPadding: const EdgeInsets .only (right: 14.0 ),
1045
- blurRadius: appleOSBlurRadius,
1046
- ),
1050
+ appBar (context),
1047
1051
],
1048
1052
);
1049
1053
}
@@ -1052,14 +1056,7 @@ class AssetPicker extends StatelessWidget {
1052
1056
/// Android设备的选择器布局
1053
1057
Widget androidLayout (BuildContext context) {
1054
1058
return FixedAppBarWrapper (
1055
- appBar: FixedAppBar (
1056
- backgroundColor: theme.canvasColor,
1057
- centerTitle: false ,
1058
- title: pathEntitySelector,
1059
- leading: backButton (context),
1060
- actionsPadding: const EdgeInsets .only (right: 14.0 ),
1061
- actions: < Widget > [confirmButton (context)],
1062
- ),
1059
+ appBar: appBar (context),
1063
1060
body: Selector <AssetPickerProvider , bool >(
1064
1061
selector: (BuildContext _, AssetPickerProvider provider) =>
1065
1062
provider.hasAssetsToDisplay,
0 commit comments