HotReloadableDefinition<T extends Object> class

Creates an instance of a cached value that should be re-instantiated once _hotReloadCounter changes. Useful for hot reload.

Constructors

HotReloadableDefinition(T create(T setValue(T)))
Creates an instance of a cached value that will be re-instantiated once _hotReloadCounter changes. Useful for hot reload.

Properties

create → T Function(T setValue(T))
Callback to instantiate the cached value.
final
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
Retrieves the value if _hotReloadCounter is equal to _counter, otherwise uses the provided create to instantiate and return the new _value.
no setter

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

incrementCounter() → void
Increases _hotReloadCounter by one, call it if you want to re-instantiated all GraphQL elements (type and field definitions) that use HotReloadableDefinition