Skip to content

JSPromiseToFuture<T extends JSAny?>

extension JSPromiseToFuture<T extends JSAny?> on JSPromise<T>

Conversions from JSPromise to Future.

Properties

toDart extension no setter

Future<T> get toDart

A Future that either completes with the result of the resolved JSPromise or propagates the error that the JSPromise rejected with.

If the JSPromise is rejected with a null or undefined value, a NullRejectionException will be thrown.

Available on JSPromise<T extends JSAny?>, provided by the JSPromiseToFuture<T extends JSAny?> extension

Implementation
dart
external Future<T> get toDart;