onError method
Life-cycle for when an error 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 onError(AsyncError<T> value, {bool seamless = false}) {
if (!_streamController.isClosed) {
// The controller might be closed if onError is executed post dispose. Cf onError
_streamController.addError(value.error, value.stackTrace);
}
super.onError(value, seamless: seamless);
}