FortuneWidget class abstract

A FortuneWidget visualizes (random) selection processes by iterating over a list of items before settling on a selected item.

See also:

Implemented types
Implementers

Constructors

FortuneWidget()

Properties

animateFirst bool
Determines if this widget animates during its first build.
no setter
curve Curve
The type of curve to use for easing the animation when selected changes.
no setter
duration Duration
The animation duration used for FortuneCurve.spin within FortuneWidget instances.
no setter
hashCode int
The hash code for this object.
no setterinherited
indicators List<FortuneIndicator>
The list of indicators is rendered on top of the underlying FortuneWidget. These can be used to visualize the position of the selected item.
no setter
items List<FortuneItem>
A list of FortuneItems to be shown within this FortuneWidget.
no setter
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onAnimationEnd VoidCallback?
Called when this widget's animation ends. Useful for enabling other widgets after the animation ends.
no setter
onAnimationStart VoidCallback?
Called when this widget starts an animation. Useful for disabling other widgets during the animation.
no setter
onFling VoidCallback?
Called when a fling gesture is detected by the active physics.
no setter
physics PanPhysics
The behavior used for handling pan events on this widget.
no setter
rotationCount int
The number of times a FortuneWidget rotates around all items before it settles on the selected value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selected Stream<int>
A stream notifying this widget that a new value within items was selected.Used by FortuneWidgets to align indicators on the selected item.
no setter
styleStrategy StyleStrategy
The strategy to use for styling individual items when they have no dedicated FortuneItem.style.
no setter

Methods

createElement() Element
Inflates this configuration to a concrete instance.
inherited
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}) 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

Constants

kDefaultDuration → const Duration
The default value for duration (currently 5 seconds).
kDefaultRotationCount → const int
The default value for rotationCount (currently 100).