MyFlipRotateTimer class

PUBLIC WIDGET: MyFlipRotateTimer

Displays a timer (either as a countdown or showing the current time in 12h/24h mode) using card-styled digits. Only hours, minutes, seconds (plus AM/PM in 12h mode) are shown. Callback functions are provided for when the seconds, minutes, hours, or AM/PM flip. In current time mode, if a custom time (as a TimeFlipEvent) is provided, it is used as the start, and then incremented by one second on every tick.

Inheritance

Constructors

MyFlipRotateTimer({Key? key, DisplayMode displayMode = DisplayMode.countdown, Duration initialDuration = const Duration(seconds: 60), AnimationMode animationMode = AnimationMode.flip, TextStyle digitTextStyle = const TextStyle(fontSize: 40, fontWeight: FontWeight.bold, color: Colors.white), double cardWidth = 40, double cardHeight = 60, Duration digitAnimDuration = const Duration(milliseconds: 600), VoidCallback? onComplete, ValueChanged<TimeFlipEvent>? onSecondFlip, ValueChanged<TimeFlipEvent>? onMinuteFlip, ValueChanged<TimeFlipEvent>? onHourFlip, ValueChanged<TimeFlipEvent>? onAmPmFlip, TimeFlipEvent? customTime, BoxDecoration? cardDecoration})
const

Properties

animationMode → AnimationMode
final
cardDecoration → BoxDecoration?
Custom decoration for each digit card.
final
cardHeight → double
final
cardWidth → double
final
customTime → TimeFlipEvent?
In current time mode, if provided, overrides the system clock.
final
digitAnimDuration → Duration
final
digitTextStyle → TextStyle
final
displayMode → DisplayMode
final
hashCode → int
The hash code for this object.
no setterinherited
initialDuration → Duration
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onAmPmFlip → ValueChanged<TimeFlipEvent>?
final
onComplete → VoidCallback?
final
onHourFlip → ValueChanged<TimeFlipEvent>?
final
onMinuteFlip → ValueChanged<TimeFlipEvent>?
final
onSecondFlip → ValueChanged<TimeFlipEvent>?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _MyFlipRotateTimerState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited