androidLayout method
Layout for Android devices. Android设备的选择器布局
Implementation
@override
Widget androidLayout(BuildContext context) {
return FixedAppBarWrapper(
appBar: appBar(context),
body: Selector<DefaultAssetPickerProvider, bool>(
selector: (_, DefaultAssetPickerProvider provider) =>
provider.hasAssetsToDisplay,
builder: (_, bool hasAssetsToDisplay, __) {
final bool shouldDisplayAssets = hasAssetsToDisplay ||
(allowSpecialItemWhenEmpty &&
specialItemPosition != SpecialItemPosition.none);
return AnimatedSwitcher(
duration: switchingPathDuration,
child: shouldDisplayAssets
? Stack(
children: <Widget>[
RepaintBoundary(
child: Column(
children: <Widget>[
Expanded(child: assetsGridBuilder(context)),
if (!isSingleAssetMode && isPreviewEnabled)
bottomActionBar(context),
],
),
),
pathEntityListBackdrop(context),
pathEntityListWidget(context),
],
)
: loadingIndicator(context),
);
},
),
);
}