flutter, method how to return future code example
Example: flutter future return error
// Catch it with catchError()
return Future.error("This is the error", StackTrace.fromString("This is its trace"));
// Catch it with catchError()
return Future.error("This is the error", StackTrace.fromString("This is its trace"));