flatMap<R> method

FutureOr<R> flatMap<R>(
  1. FutureOr<R> transform(
    1. T value
    )
)

Implementation

FutureOr<R> flatMap<R>(FutureOr<R> Function(T value) transform) {
  if (this is Future<T>) {
    return (this as Future<T>).then(transform);
  }
  return transform(this as T);
}