PageScopedValueRef class

Page's ScopedValueRef.

This can be extended with an extension to add a method to handle ScopedValue that stores a value per page.

PageのScopedValueRef

これをextensionで拡張することでページごとに値を保存するScopedValueを扱うメソッドを追加することができます。

extension RefWatchExtensions on PageScopedValueRef {
  T watch<T extends Listenable>(
    T Function() callback, {
    List<Object> keys = const [],
  }) {
    return getScopedValue<T, _WatchValue<T>>(
      () => _WatchValue<T>(callback: callback, keys: keys),
      listen: true,
    );
  }
}
Inheritance
Implemented types
Available Extensions
Annotations

Properties

context BuildContext
BuildContext of the associated widget.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getAlreadyExistsScopedValue<TResult, TScopedValue extends ScopedValue<TResult>>({Object? name, bool listen = false, bool recursive = true}) → TResult?
Obtains a TScopedValue already stored in ScopedValueContainer.
inherited
getScopedValue<TResult, TScopedValue extends ScopedValue<TResult>>(TScopedValue provider(Ref ref), {void onInit(ScopedValueState<TResult, TScopedValue> state)?, void onUpdate(ScopedValueState<TResult, TScopedValue> state)?, bool listen = false, Object? name}) → TResult
A method that returns the value of TResult while creating, saving, and managing the state of TScopedValue.
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