ZenithContextX extension
Ergonomic helpers so widgets can access the current ZenithContainer directly from a BuildContext without a verbose ZenithScope.of call.
- on
Properties
- container → ZenithContainer
-
Available on BuildContext, provided by the ZenithContextX extension
Resolves the current ZenithContainer from the nearest ZenithScope.no setter
Methods
-
select<
T, R> (ZenithNode< T> node, R selector(T state)) → R -
Available on BuildContext, provided by the ZenithContextX extension
Selects a field fromnode, registering zone auto-subscription. -
selectNode<
T, R> (ZenithNode< T> node, R selector(T state)) → R -
Available on BuildContext, provided by the ZenithContextX extension
Selects a field fromnode, registering zone auto-subscription. -
watch<
T> (ZenithNode< T> node) → T -
Available on BuildContext, provided by the ZenithContextX extension
Evaluates and registers auto-subscription fornodeif called inside a ZenithBuilder or ZenithConsumerWidget. -
watchNode<
T> (ZenithNode< T> node) → T -
Available on BuildContext, provided by the ZenithContextX extension
Evaluates and registers auto-subscription fornodeif called inside a ZenithBuilder or ZenithConsumerWidget. -
zenith<
T> (ZenithKey< T> key, T factory(ZenithRef ref)) → ZenithNode<T> -
Available on BuildContext, provided by the ZenithContextX extension
Type-safe helper to read or create a node using a ZenithKey.