TickingMode enum
Represents the mode of ticking. It can be millisecond, second, minute, or hour. This is used to determine when to rebuild the widget. For example, if the mode is set to TickingMode.second, the widget will rebuild every second. If the mode is set to TickingMode.minute, the widget will rebuild every minute. If the mode is set to TickingMode.hour, the widget will rebuild every hour. If the mode is set to TickingMode.millisecond, the widget will rebuild every millisecond. The default mode is TickingMode.second. The mode can be changed at runtime using TickingInterface.setMode method.
Constructors
- TickingMode()
-
const
Values
- millisecond → const TickingMode
-
Represents the mode when the widget should rebuild every millisecond. This is the most frequent mode and should be used with caution. This mode is not recommended for most use cases.
- second → const TickingMode
-
Represents the mode when the widget should rebuild every second. This is the most common mode and is the default mode. This mode is recommended for most use cases. This is useful for building stopwatches and countdowns.
- minute → const TickingMode
-
Represents the mode when the widget should rebuild every minute. This mode is recommended for use cases where the widget needs to be updated every minute. This is useful for building clocks and timers.
- hour → const TickingMode
-
Represents the mode when the widget should rebuild every hour. This mode is recommended for use cases where the widget needs to be updated every hour. This is useful for building clocks and timers.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- isHour → bool
-
Returns true if the mode is TickingMode.hour.
no setter
- isMillisecond → bool
-
Returns true if the mode is TickingMode.millisecond.
no setter
- isMinute → bool
-
Returns true if the mode is TickingMode.minute.
no setter
- isSecond → bool
-
Returns true if the mode is TickingMode.second.
no setter
- 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<
TickingMode> - A constant List of the values in this enum, in order of their declaration.