Cell<T> class

A mutable container. Useful for primitives.

Implemented types
Available extensions

Constructors

Cell(T val)

Properties

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

Methods

copy() Cell<T>
Shallow copy of this Cell.
override
get() → T
Returns the inner value.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
replace(T val) → T
Replaces the inner value with the provided val and returns the original inner value.
set(T val) → void
Sets the inner value to val.
swap(covariant Cell<T> cell) → void
swaps the inner values between this cell and that cell.
toString() String
A string representation of this object.
override
update(T fn(T)) → T
Updates the contained value using fn and returns the new value

Operators

operator ==(covariant Object other) bool
The equality operator.
override