WheelSegment class

Represents a single slice or segment of the spinning wheel.

Constructors

WheelSegment(String label, int value, {Color? color, String? path, Image? image, double? probability})
Creates a new WheelSegment.

Properties

color Color
The background color of the segment. If not provided, a random color is selected.
final
hashCode int
The hash code for this object.
no setterinherited
image Image?
The loaded ui.Image object, usually populated by the loader.
final
label String
The text displayed on the segment.
final
path String?
The path to an image icon displayed on the segment. Supports both local asset paths and network URLs.
final
probability double?
Weighted probability for this segment to be selected (0.0 to 1.0). If null, it defaults to equal distribution sharing the remaining probability.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value int
The numeric value associated with this segment (e.g., prize amount).
final

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