For more granular error handling, you can register a second ( onError ) callback within then() to handle Futures completed with errors . Here is then() ‘s signature: Future<R> then<R>(FutureOr<R> Function(T value) onValue, {Function? onError});
For more granular error handling, you can register a second ( onError ) callback within then() to handle Futures completed with errors . Here is then() ‘s signature: Future<R> then<R>(FutureOr<R> Function(T value) onValue, {Function? onError});