onData method
Life-cycle for when a data from the provider's "build" method is received.
Might be invoked after the element is disposed in the case where provider.future
has yet to complete.
Implementation
@override
void onData(AsyncData<T> value, {bool seamless = false}) {
if (!_streamController.isClosed) {
// The controller might be closed if onData is executed post dispose. Cf onData
_streamController.add(value.value);
}
super.onData(value, seamless: seamless);
}