scrollingBodyBuilder method
Widget
scrollingBodyBuilder(
- BuildContext context,
- SheetState? sheetState,
- ScrollController scrollController,
- int pageIndex,
- bool scrollLock,
Implementation
@override
Widget scrollingBodyBuilder(BuildContext context, SheetState? sheetState, ScrollController scrollController, int pageIndex, bool scrollLock, double footerHeight) {
return StoreConnector<GiphyState, GiphyState>(
converter: (store) => store.state,
builder: (context, state){
final extent = sheetState?.extent ?? 0;
if(state.displayAssets.length == 0 && !state.connectivity){
final connectivityIndicator = delegate.connectivityIndicator(context, extent);
return connectivityIndicator == null ? connectivityIndicatorExample() : connectivityIndicator;
}
else if(state.displayAssets.length > 0){
return assetsGridBuilder(context, extent, scrollController, scrollLock, footerHeight, state.displayAssets);
}
else{
return delegate.loadingIndicator(context) ?? loadingIndicatorExample(context);
}
}
);
}