androidLayout method

  1. @override
Widget androidLayout(
  1. BuildContext context
)
override

Layout for Android devices. Android设备的选择器布局

Implementation

@override
Widget androidLayout(BuildContext context) {
  return AssetPickerAppBarWrapper(
    appBar: appBar(context),
    body: Consumer<DefaultAssetPickerProvider>(
      builder: (BuildContext context, DefaultAssetPickerProvider p, _) {
        final bool shouldDisplayAssets =
            p.hasAssetsToDisplay || shouldBuildSpecialItem;
        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),
        );
      },
    ),
  );
}