shouldWaitForData<S> method
Indicates if the BlocBuilder should wait for data.
If true
, the BlocBuilder will wait for data before
building the widget.
Implementation
bool shouldWaitForData<S>(bool canWait, AsyncSnapshot<S> snapshot) {
final state = snapshot.connectionState;
return canWait &&
(state == ConnectionState.waiting || state == ConnectionState.none);
}