FutureSnapshot<T>.error constructor
const
FutureSnapshot<T>.error (
- Object error, [
- StackTrace? stackTrace
Creates an FutureSnapshot in error state.
The parameter error
cannot be null
.
Implementation
const FutureSnapshot.error(
Object error, [
this.stackTrace,
// ignore: prefer_initializing_formals
]) : error = error,
data = null,
state = AsyncSnapshotState.error;