StateExtension class
Methods
-
changeModel<T>(Symbol key, T value)
→ void
-
Change the data of the model with the given key.
Throws an assertion error if the model is read-only.
-
find<T>()
→ T
-
Find the data of the given type from the context. Does not listen
to the data changes.
-
findMessenger<T>()
→ T
-
Find the stored data somewhere in the ancestor DataMessenger descendants.
Throws an assertion error if the data is not found.
-
findModel<T>(Symbol key)
→ T
-
Find the data of the given type from the context.
Throws an assertion error if the data is not found.
-
findProperty<T>(Symbol key)
→ ModelProperty<T>
-
Find the property of the given type from the context.
Throws an assertion error if the data is not found.
-
findRoot<T>()
→ T
-
Find the root data of the given type from the context.
Throws an assertion error if the data is not found.
-
maybeChangeModel<T>(Symbol key, T value)
→ void
-
Optionally change the data of the model with the given key.
Ignores if the model is read-only.
-
maybeFind<T>()
→ T?
-
Optionally find the data of the given type from the context.
-
maybeFindMessenger<T>()
→ T?
-
Find the DataMessenger that holds all of the data with the given type from the context.
-
maybeFindModel<T>(Symbol key)
→ T?
-
Optionally find the data of the given type from the context.
Returns null if the data is not found.
-
maybeFindProperty<T>(Symbol key)
→ ModelProperty<T>?
-
Optionally find the property of the given type from the context.
Returns null if the data is not found.
-
maybeFindRoot<T>()
→ T?
-
Optionally find the root data of the given type from the context.
-
maybeModel<T>(Symbol key)
→ T?
-
Optionally find the data of the given type from the context.
Returns null if the data is not found.
-
maybeOf<T>()
→ T?
-
Optionally find and listen to data changes of the data with the given type from the context.
-
maybeProperty<T>(Symbol key)
→ ModelProperty<T>?
-
Optionally find and listen to property changes of the data with the given type from the context.
Returns null if the data is not found.
-
model<T>(Symbol key)
→ T
-
Find the data of the given type from the context.
Throws an assertion error if the data is not found.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
of<T>()
→ T
-
Find and listen to data changes of the data with the given type from the context.
-
property<T>(Symbol key)
→ ModelProperty<T>
-
Find and listen to property changes of the data with the given type from the context.
Throws an assertion error if the data is not found.
-
toString()
→ String
-
A string representation of this object.
inherited