TickerModeData class
Immutable compound values that describe the effective ticker behavior for a subtree.
Instances of this class are produced by TickerMode.valuesOf and TickerMode.getValuesNotifier and reflect the values that apply at a given location in the widget tree after taking ancestor TickerMode widgets into account.
Semantics of the fields:
- enabled: A ticker is considered enabled only if all ancestor TickerMode.enabled values and the local TickerMode.enabled are true (logical AND). When false, tickers are muted (time still elapses but callbacks are not invoked).
- forceFrames: When true, tickers in the subtree request frames using SchedulerBinding.scheduleForcedFrame while active. This value is combined across ancestors using logical OR, so any ancestor requesting forced frames enables it for the subtree.
For most widgets, reading these values is unnecessary; mixins such as SingleTickerProviderStateMixin and TickerProviderStateMixin apply them automatically to the Tickers they vend. Use this class when you need to observe or react to ticker policy explicitly.
- Annotations
Constructors
- TickerModeData({required bool enabled, required bool forceFrames})
-
Creates a TickerModeData.
const
Properties
- enabled → bool
-
Whether tickers are enabled (not muted) for the subtree.
final
- forceFrames → bool
-
Whether tickers should request forced frames while active.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- 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.
override
Constants
- fallback → const TickerModeData
- Fallback values used when there is no ancestor TickerMode.