scrollingBodyBuilder method

  1. @override
Widget scrollingBodyBuilder(
  1. BuildContext context,
  2. SheetState? state,
  3. ScrollController scrollController,
  4. int pageIndex,
  5. bool scrollLock,
  6. double footerHeight,
)

Implementation

@override
Widget scrollingBodyBuilder(BuildContext context, SheetState? state, ScrollController scrollController, int pageIndex, bool scrollLock, double footerHeight) {
  return ChangeNotifierProvider<DefaultAssetPickerProvider>.value(
    value: provider,
    builder: (BuildContext context, _){
      return Selector<DefaultAssetPickerProvider, bool>(
      selector: (_, DefaultAssetPickerProvider provider) => provider.hasAssetsToDisplay,
      builder: (_, bool hasAssetsToDisplay, __) {
        return hasAssetsToDisplay ? assetsGridBuilder(context, scrollController, scrollLock, footerHeight) : delegate.imageLoadingIndicator(context) ?? exampleLoadingIndicator(context);
        }
      );
    },
  );
}