withFallback method
Returns fallback if this future throws any error.
riskyOperation().withFallback(defaultValue)
Implementation
Future<T> withFallback(T fallback) => catchError((Object _) => fallback);
Returns fallback if this future throws any error.
riskyOperation().withFallback(defaultValue)
Future<T> withFallback(T fallback) => catchError((Object _) => fallback);