OnObservePolicy enum

Behavior when the bloc is observed, either via stream.listen or by observing computed properties (such as state, etc.) inside a MobX reaction

Inheritance

Constructors

OnObservePolicy()
const

Values

reloadAlways → const OnObservePolicy

Always reload when the bloc is observed, even if there is a value from a fresh source available.

reloadIfCached → const OnObservePolicy

Reload only if the value is cached (or there is no value). If there is a fresh value already available, the bloc will not reload.

reloadIfEmpty → const OnObservePolicy

Reload only if there is no value. If there is an existing fresh or cache value, the bloc will not be reloaded when it is observed.

reloadNever → const OnObservePolicy

Never reload the bloc when it is observed. Useful if you prefer to control when the bloc reloads manually.

Note that if the key changed while the bloc was unobserved, a KeyUpdate event will still be added to the bloc once it is observed.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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

Constants

values → const List<OnObservePolicy>
A constant List of the values in this enum, in order of their declaration.