RouletteGroup class

Describe a total roulette

Constructors

RouletteGroup(List<RouletteUnit> units)
Create a roulette group with given units.
RouletteGroup.uniform(int itemCount, {IndexBuilder<String?>? textBuilder, IndexBuilder<Color>? colorBuilder, IndexBuilder<TextStyle?>? textStyleBuilder})
Helper function to create a even RouletteGroup. itemCount is the number of items in the group. textBuilder is a function that return the text of the unit. colorBuilder is a function that return the color of the unit. textStyleBuilder is a function that return the text style of the unit.
factory
RouletteGroup.uniformIcons(int itemCount, {IndexBuilder<IconData>? iconBuilder, IndexBuilder<Color>? colorBuilder, IndexBuilder<TextStyle>? styleBuilder})
Helper function to create a even RouletteGroup. itemCount is the number of items in the group. iconBuilder is a function that return the icon of the unit. colorBuilder is a function that return the color of the unit.
factory
RouletteGroup.uniformImages(int itemCount, {required IndexBuilder<ImageProvider<Object>> imageBuilder, IndexBuilder<Color>? colorBuilder, IndexBuilder<String?>? textBuilder, IndexBuilder<TextStyle>? styleBuilder})
Helper function to create a even RouletteGroup. itemCount is the number of items in the group. imageBuilder is a function that return the image of the unit. colorBuilder is a function that return the color of the unit.
factory

Properties

divide int
Parts count of units.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
totalWeights double
Total weights count of the units
latefinal
units List<RouletteUnit>
RouletteUnits of this group
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