WheelDisplay class

Internal widget that handles the layout and rendering of the wheel components.

Inheritance

Constructors

WheelDisplay({Key? key, required SpinnerWheel config, required Animation<double> animation, required List<WheelSegment> segments, required WheelGeometry geometry, required double startRotation, required double endRotation, List<ImageLoadState> imageStates = const [], int? highlightIndex, Animation<double>? indicatorTick, bool clockwise = true, String? semanticsValue, VoidCallback? onCenterTap, VoidCallback? onDragStart, void onDragUpdate(Offset position, Offset delta, double size)?, void onDragEnd(Velocity velocity, double size)?, double minSize = 100.0, double maxSize = double.infinity, double aspectRatio = 1.0})
Creates a WheelDisplay.
const

Properties

animation → Animation<double>
The (already curved) animation driving the wheel's rotation.
final
aspectRatio → double
Aspect ratio for the wheel (default 1.0).
final
clockwise → bool
Whether the wheel is turning clockwise (sets the flick direction).
final
config → SpinnerWheel
The wheel's configuration.
final
endRotation → double
The target end rotation angle.
final
geometry → WheelGeometry
The angular layout of segments.
final
hashCode → int
The hash code for this object.
no setterinherited
highlightIndex → int?
The slice to highlight, if any.
final
imageStates → List<ImageLoadState>
The image loading state of each segment.
final
indicatorTick → Animation<double>?
Runs from 0 to 1 each time the indicator should flick.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxSize → double
Maximum allowed size for the wheel.
final
minSize → double
Minimum allowed size for the wheel.
final
onCenterTap → VoidCallback?
Called when the center is tapped, or null if tapping does nothing.
final
onDragEnd → void Function(Velocity velocity, double size)?
Called when a drag ends, with the release velocity.
final
onDragStart → VoidCallback?
Called when a drag on the wheel starts.
final
onDragUpdate → void Function(Offset position, Offset delta, double size)?
Called as a drag moves, with the pointer position and movement in the wheel's coordinates and the wheel's size.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
segments → List<WheelSegment>
The list of segments to draw.
final
semanticsValue → String?
The wheel's current state for screen readers.
final
startRotation → double
The starting rotation angle.
final

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
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, 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

Constants

fallbackSize → const double
Size used when neither the width nor the height is constrained.