FamilyNotifier<T, F, P extends BaseProvider<BaseNotifier<T> , T> > class
final
The family notifier manages a map of notifiers, one for each parameter. They are created lazily when the parameter is accessed for the first time.
T
is the type of one element of the family.
F
is the type of the family parameter.
P
is the type of the child provider.
- Mixed in types
-
- RebuildableNotifier<
Map< F, T> , void>
- RebuildableNotifier<
Constructors
-
FamilyNotifier(ChildFamilyBuilder<
T, F, P> _familyBuilder, {String describeState(T state)?})
Properties
- customDebugLabel → String?
-
Override this to provide a custom debug label.
no setterinherited
- debugLabel → String
-
A label to be used in debug messages and
by the
RefenaTracingPage
.no setterinherited -
dependencies
→ Set<
BaseNotifier> -
A collection of notifiers that this notifier depends on.
finalinherited
-
dependents
→ Set<
BaseNotifier> -
A collection of notifiers that depend on this notifier.
They will be disposed when this notifier is disposed.
finalinherited
- disposed → bool
-
Whether this notifier is disposed.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isWidget → bool
-
Whether this Rebuildable is an
ElementRebuildable
. This is a workaround for the fact thatElementRebuildable
is in refena_flutter so we cannot refer it from here.no setterinherited -
provider
→ BaseProvider<
BaseNotifier< ?Map< , Map<F, T> >F, T> > -
The provider that created this notifier.
This is only available after the initialization.
no setterinherited
- requireBuildContext → bool
-
If this is true, initializing must be done by ViewModelBuilder of the refena_flutter package.
This flag is needed to throw an exception if the user forgets to use ViewModelBuilder.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
↔ Map<
F, T> -
Gets the current state.
getter/setter pairinherited
Methods
-
addListener(
Rebuildable rebuildable, ListenerConfig< Map< config) → voidF, T> > -
inherited
-
cleanupListeners(
) → void -
inherited
-
describeState(
Map< F, T> state) → String - Override this to provide a customized description of the state. This is used by the built-in observers for improved logging.
-
dispose(
) → void - This is called on Ref.dispose. You can override this method to dispose resources.
-
disposeParam(
F param, LabeledReference? debugOrigin) → void -
getListeners(
) → List< Rebuildable> -
inherited
-
getStream(
) → Stream< NotifierEvent< Map< >F, T> > -
inherited
-
init(
) → Map< F, T> - Initializes the state of the notifier. This method is called only once and as soon as the notifier is accessed the first time.
-
initParam(
F param) → void -
internalSetup(
ProxyRef ref, BaseProvider< BaseNotifier< ? provider) → voidMap< , Map<F, T> >F, T> > -
Handles the actual initialization of the notifier.
Calls init internally.
inherited
-
isParamInitialized(
F param) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListenerTarget(
BaseNotifier notifier) → void -
Only for
ElementRebuildable
. Noop for others. Notifies that a newBaseNotifier
is being listened. This should be called within a build method so it can unwatch old notifiers in the next microtask.inherited -
onDisposeWidget(
) → void -
Only for
ElementRebuildable
. Noop for others. Allows for further cleanup logic.inherited -
postInit(
) → void - Override this to provide a custom post initialization. The initial state is already set at this point.
-
rebuild(
ChangeEvent? changeEvent, RebuildEvent? rebuildEvent) → void -
Schedules a rebuild in the next microtask.
inherited
-
rebuildImmediately(
LabeledReference debugOrigin) → void -
Rebuilds the notifier immediately.
override
-
removeListener(
Rebuildable rebuildable) → void -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateShouldNotify(
Map< F, T> prev, Map<F, T> next) → bool -
Override this if you want to a different kind of equality.
inherited
Operators
-
operator ==(
Object other) → bool -
Subclasses should not override this method.
It is used internally by dependencies and dependents.
inherited