node_interop.util library

Utility functions for Dart <> JS interoperability.




util Util


callConstructor(Object constr, List<Object> arguments) → dynamic
callMethod(Object o, String method, List<Object> args) → dynamic
dartify<T>(Object jsObject) → T
Returns Dart representation from JS Object. [...]
futureToPromise<T>(Future<T> future) Promise
Creates JS Promise which is resolved when future completes. [...]
getProperty(Object o, Object name) → dynamic
hasProperty(Object o, Object name) bool
instanceof(Object o, Object type) bool
Check whether o is an instance of type. [...]
jsify(Object dartObject) → dynamic
Returns the JS representation from Dart Object. [...]
newObject() → dynamic
promiseToFuture<T>(Promise promise) Future<T>
Creates Dart Future which completes when promise is resolved or rejected. [...]
setProperty(Object o, Object name, Object value) → dynamic