Obj<T> class

A base-class that store a value of T.

You can create a new Obj:

// usign the `Obj` class
final strObj = Obj<String>("initial value");
final intObj = Obj<int>(0);
final userObj = Obj<User>(User());

You can get the value:

// usign a `value` getter
print(strObj.value);
// or using the callable
print(strObj());
// or using `toString` implicit
print("$intObj");

You can set a new value:

// usign a `value` setter
strObj.value = "change value";
// or using the callable
strObj("change value");
Mixed in types
Implementers
Available Extensions

Constructors

Obj(T value)
A base-class that store a value of T.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value ↔ T
getter/setter pairoverride

Methods

call([T? val]) → T
Gets and/or sets to value like a function
inherited
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