Future.sync(
dynamic computation()
)

Creates a future containing the result of immediately calling computation.

If calling computation throws, the returned future is completed with the error.

If calling computation returns a Future, completion of the created future will wait until the returned future completes, and will then complete with the same result.

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