Future<T> constructor

Future<T>(
  1. FutureOr<T> computation(
      )
    )

    Creates a future containing the result of calling computation asynchronously with Timer.run.

    If the result of executing computation throws, the returned future is completed with the error.

    If the returned value is itself a Future, completion of the created future will wait until the returned future completes, and will then complete with the same result.

    If a non-future value is returned, the returned future is completed with that value.

    Implementation

    factory Future