stateAsync property
The current Async state
Implementation
@override
Future<T> get stateAsync async {
initialize();
await completer?.future;
if (_snapState.hasError) {
final completer = Completer<T>();
completer.completeError(
_snapState.snapError!.error,
_snapState.snapError!.stackTrace,
);
return completer.future;
}
return state;
}
Implementation
@override
set stateAsync(Future<T> value) {
if (!isInitialized) {
removeFromReactiveModel = addToActiveReactiveModels(this);
isInitialized = true;
}
setStateNullable(
(_) => value,
middleSetState: middleSetState,
stackTrace: kDebugMode ? StackTrace.current : null,
);
}