promiseToFutureAsMap function

Future<Map<String, dynamic>?> promiseToFutureAsMap (
  1. dynamic jsPromise
)

Convert a JS Promise to a Future<Map<String, dynamic>>.

On a successful result the native JS result will be converted to a Dart Map. See convertNativeToDart_Dictionary. On a rejected promise the error is forwarded without change.

Implementation

Future<Map<String, dynamic>?> promiseToFutureAsMap(jsPromise) =>
    promiseToFuture(jsPromise).then(convertNativeToDart_Dictionary);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-html/promiseToFutureAsMap.html