appBar method
Custom app bar for the picker. 选择器自定义的顶栏
Implementation
@override
PreferredSizeWidget appBar(BuildContext context) {
return FixedAppBar(
backgroundColor: theme.appBarTheme.color,
centerTitle: isAppleOS,
title: pathEntitySelector(context),
leading: backButton(context),
// Condition for displaying the confirm button:
// - On Android, show if preview is enabled or if multi asset mode.
// If no preview and single asset mode, do not show confirm button,
// because any click on an asset selects it.
// - On iOS, show if no preview and multi asset mode. This is because for iOS
// the [bottomActionBar] has the confirm button, but if no preview,
// [bottomActionBar] is not displayed.
actions: (!isAppleOS || !isPreviewEnabled) &&
(isPreviewEnabled || !isSingleAssetMode)
? <Widget>[confirmButton(context)]
: null,
actionsPadding: const EdgeInsetsDirectional.only(end: 14.0),
blurRadius: isAppleOS ? appleOSBlurRadius : 0.0,
);
}