JSUtilsInterface class abstract

An interface to make sure supported and unsupported version have the same methods.

It also enables the ability to create a test mock version of the UTILS interface to help with simulating the responses from the browser and thus allowing for testing.

Implementers

Constructors

JSUtilsInterface()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

allowInterop<F extends Function>(F f) → F
Use JS utils to allow for interop from dart functions into js code.
callConstructor(Object constr, List<Object?>? arguments) → dynamic
Use JS utils to call a constructor of a class.
callMethod(Object o, String method, List<Object?> args) → dynamic
Use JS utils to call a method of a js object.
getProperty(Object o, Object name) → dynamic
Use JS utils to get the property of a js object.
hasProperty(Object o, Object name) → bool
Use JS utils to check if a js object has a property.
instanceof(Object? o, Object type) → bool
Use JS utils to use instance of on a js object.
newObject() → dynamic
Use JS utils to create a new empty js object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
promiseToFuture<T>(Object jsPromise) → Future<T>
Use JS utils to convert a js promise into a dart Future.
setProperty(Object o, Object name, Object? value) → dynamic
Use JS utils to set a property of a js object.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited