onError property
A callback that will be called when the future completes with an error.
This callback is triggered when the AsyncSnapshot.connectionState is ConnectionState.done and AsyncSnapshot.hasError is true.
Implementation
final void Function(AsyncSnapshot<List<T>>)? onError;