GridConfig class final
九宫格配置;默认三行三列,奖品顺序决定高亮巡游顺序。
- Annotations
Constructors
-
GridConfig({int rows = kLuckyGridDefaultDimension, int cols = kLuckyGridDefaultDimension, List<
LuckyBoxBlock> blocks = const [], List<GridPrize> prizes = const [], List<GridButton> buttons = const [], GridOptions options = const GridOptions(), GridStyle style = const GridStyle(), LuckyCellStyle activeStyle = const LuckyCellStyle(background: LuckyFill.color(kLuckyGridActiveBackground))}) -
创建配置;列表由调用方保持不可变。
const
Properties
- activeStyle → LuckyCellStyle
-
激活样式;背景、阴影、边框和前景整体替换,圆角和文字非空覆盖。
final
-
blocks
→ List<
LuckyBoxBlock> -
由外向内的背景块。
final
-
按点击顺序排列的按钮格。
final
- cols → int
-
列数,非正值生成空布局。
final
- hashCode → int
-
与配置相等性一致的哈希值。
no setteroverride
- options → GridOptions
-
布局与动画参数。
final
-
prizes
→ List<
GridPrize> -
按巡游顺序排列的奖品格。
final
- rows → int
-
行数,非正值生成空布局。
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → GridStyle
-
普通格子默认样式。
final
Methods
-
copyWith(
{int? rows, int? cols, List< LuckyBoxBlock> ? blocks, List<GridPrize> ? prizes, List<GridButton> ? buttons, GridOptions? options, GridStyle? style, LuckyCellStyle? activeStyle}) → GridConfig -
返回替换非空参数的副本,例如
value.copyWith()保留配置。 -
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 -
按所有配置字段比较。
override