appBar method
Custom app bar for the picker. 选择器自定义的顶栏
Implementation
@override
AssetPickerAppBar appBar(BuildContext context) {
return AssetPickerAppBar(
backgroundColor: theme.appBarTheme.backgroundColor,
centerTitle: isAppleOS,
title: Semantics(
onTapHint: semanticsTextDelegate.sActionSwitchPathLabel,
child: 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 and macOS, show nothing.
actions: <Widget>[
if (!isAppleOS && (isPreviewEnabled || !isSingleAssetMode))
confirmButton(context),
],
actionsPadding: const EdgeInsetsDirectional.only(end: 14),
blurRadius: isAppleOS ? appleOSBlurRadius : 0,
);
}