SingletonRef<T> class
A SingletonRef is a reference that always returns a new instance.
- Inheritance
-
- Object
- TransientRef<
T> - SingletonRef
Constructors
- SingletonRef(T create())
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- instance → T
-
Returns the singleton instance of
T.no setteroverride - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
) → T -
Equivalent to calling the instance getter.
inherited
-
freeze(
) → void -
Disables overriding.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
overrideWith(
T create()) → void -
Sets the function used to create instances.
Throws a StateError if
thishas been frozen.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited