buildLoadingWidgetIfNeeded<S> method
Widget?
buildLoadingWidgetIfNeeded<S>(
- BuildContext context,
- AsyncSnapshot<
S> snapshot, - IBlocBuilder widget
Builds the loading widget if needed.
Implementation
Widget? buildLoadingWidgetIfNeeded<S>(
BuildContext context,
AsyncSnapshot<S> snapshot,
IBlocBuilder widget,
) {
if (shouldWaitForData(widget.waitForData, snapshot)) {
if (widget.loadingBuilder != null) {
return widget.loadingBuilder!(context);
}
return Container();
}
return null;
}