WebBluetoothConverters class
Some converters to convert from Dart objects to native js object expected by some API calls.
You shouldn't have to do this manually as the library should take care of it when it is needed.
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
castConverter<
T> (Object input) → T -
Convert an incoming js object to
T
using a basic cast.2 This method is used for the convertJSObjectToList method by default. Replace it if something more specific is required. -
convertJSDataViewToByteData(
Object jsObject) → ByteData - Convert the js DataView object to a dart ByteData. They're basically the same object (down to the api), but it helps to have the data in a native friendly data.
-
convertJSObjectToList<
T> (Object list, [T converter(Object)?]) → List< T> -
Convert a js list that is a basic js object to a List with type
T
.list
is the js object to convert to a list. All the entries in the original list will be copied over. -
convertJsObjectToMap<
K, V> (Object map, {K keyConverter(Object)?, V valueConverter(Object)?}) → Map< K, V> -
Convert a js map that is a basic js object to a Map with key
K
and valueV
. -
convertUint8ListToJSArrayBuffer(
Uint8List data) → Object - Convert a Dart Uint8List to a js Uint8Array. Both are almost the same data type, but the web api doesn't like the Uint8List.