asAsync property

Future<T> get asAsync

Casts a value to a Future wrap the value in a Future if it is synchronous.

Implementation

Future<T> get asAsync {
  return this is Future<T> ? this as Future<T> : Future<T>.value(this);
}