ImMap class

A wrapper for maps with both keys and values of Object types.

Use ImMap to safely transfer maps between isolates.

Inheritance

Constructors

ImMap(Map<ImType<Object>, ImType<Object>> _map)
Creates an ImMap with the provided map of wrapped objects.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
unwrap → Map<Object, Object>
Returns the original Dart value by unwrapping this instance.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDecodedMap<K extends Object, V extends Object>() → Map<K, V>
Converts the wrapped ImMap to a Dart Map of type <K, V>.
toMap<K extends ImType<Object>, V extends ImType<Object>>() → Map<K, V>
Converts the internal wrapped map to a Dart map. The map keys and values are cast to the specified ImType types.
toString() → String
A string representation of this object.
override
toUnwrappedMap<K extends Object, V extends Object>() → Map<K, V>
Converts the wrapped ImMap to a Dart Map of type <K, V>.

Operators

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

Static Methods

wrap<K extends Object?, V extends Object?>(Map<K, V> object) → ImMap
Converts a plain Dart object into its corresponding ImMap instance.
override