WheelWidget class

WheelWidget: Main widget of the wheel with BLoC state management This widget can be exported and used in other projects

Inheritance

Constructors

WheelWidget({Key? key, required List<WheelSegment> segments, double? wheelSize = 300, double? animationSpeed, bool? showSpinButton = true, bool? showPointer = true, double? pointerOffset = 16, double? spinButtonOffset = 16, bool? removeSpinButtonOffset = false, Color? pointerColor = Colors.black, bool? animatePointerColor = true, void onFinish(WheelSegment result)?, bool? enableTapToSpin = true, bool? showCenterDot = true, bool? showWheelBorder = false, Color? wheelBorderColor = Colors.white, double? wheelBorderWidth = 4.0, TextStyle? segmentTextStyle = const TextStyle(color: Colors.white, fontSize: 18, fontWeight: FontWeight.bold), double? segmentFontSize = 18, FontWeight? segmentFontWeight = FontWeight.bold, Color? segmentTextColor = Colors.white, bool? showWheelShadow = true, double? wheelShadowBlur = 20.0, double? wheelShadowOffsetX = 0, double? wheelShadowOffsetY = 10.0, Color? wheelShadowColor = Colors.black26, String? spinButtonText = 'Spin!', TextStyle? spinButtonTextStyle = const TextStyle(fontSize: 18, color: Colors.white), Color? spinButtonColor = Colors.blue, Widget? spinButtonIcon = const Icon(Icons.arrow_forward), Curve? spinCurve = Curves.easeOutQuart, double? initialAngle = 2 * pi, double? segmentGap = 0.0, Widget? centerWidget, void onSpinning(double progress)?, Widget? customSpinButton, Widget? customPointer, VoidCallback? onSpinStart, VoidCallback? onSpinEnd})
const

Properties

animatePointerColor bool?
final
animationSpeed double?
final
centerWidget Widget?
final
customPointer Widget?
final
customSpinButton Widget?
final
enableTapToSpin bool?
final
hashCode int
The hash code for this object.
no setterinherited
initialAngle double?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onFinish → void Function(WheelSegment result)?
final
onSpinEnd VoidCallback?
final
onSpinning → void Function(double progress)?
final
onSpinStart VoidCallback?
final
pointerColor Color?
final
pointerOffset double?
final
removeSpinButtonOffset bool?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
segmentFontSize double?
final
segmentFontWeight FontWeight?
final
segmentGap double?
final
segments List<WheelSegment>
final
segmentTextColor Color?
final
segmentTextStyle TextStyle?
final
showCenterDot bool?
final
showPointer bool?
final
showSpinButton bool?
final
showWheelBorder bool?
final
showWheelShadow bool?
final
spinButtonColor Color?
final
spinButtonIcon Widget?
final
spinButtonOffset double?
final
spinButtonText String?
final
spinButtonTextStyle TextStyle?
final
spinCurve Curve?
final
wheelBorderColor Color?
final
wheelBorderWidth double?
final
wheelShadowBlur double?
final
wheelShadowColor Color?
final
wheelShadowOffsetX double?
final
wheelShadowOffsetY double?
final
wheelSize double?
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