LuckyGrid constructor
const
LuckyGrid({
- Key? key,
- required GridConfig config,
- GridController? controller,
- double? width,
- double? height,
- AlignmentGeometry alignment = Alignment.topLeft,
- VoidCallback? onStart,
- LuckyButtonTapCallback? onButtonTap,
- ValueChanged<
int> ? onCellTap, - ValueChanged<
LuckyResult< ? onEnd,GridPrize> > - ValueChanged<
LuckyPhase> ? onPhaseChanged, - ValueChanged<
int> ? onActiveChanged, - ValueChanged<
LuckyImageError> ? onImageError, - VoidCallback? onReady,
- LuckyHooks hooks = const LuckyHooks(),
- List<
LuckyLayer< layers = const [],GridLayout, GridFrame> > - LuckyRenderer<
GridConfig, GridLayout, GridFrame, LuckyResult< ? renderer,GridPrize> > - Widget overlayBuilder(
- BuildContext context,
- LuckySurfaceData<
GridConfig, GridLayout, GridFrame> data
- LuckyPerformanceOptions performance = const LuckyPerformanceOptions(),
- LuckyTextScaling textScaling = LuckyTextScaling.none,
- String? semanticsLabel,
- String semanticsValueBuilder()?,
创建九宫格;点击按钮通过 onStart 交给调用方决定何时开始。
Implementation
const LuckyGrid(
{super.key,
required this.config,
this.controller,
this.width,
this.height,
this.alignment = Alignment.topLeft,
this.onStart,
this.onButtonTap,
this.onCellTap,
this.onEnd,
this.onPhaseChanged,
this.onActiveChanged,
this.onImageError,
this.onReady,
this.hooks = const LuckyHooks(),
this.layers = const [],
this.renderer,
this.overlayBuilder,
this.performance = const LuckyPerformanceOptions(),
this.textScaling = LuckyTextScaling.none,
this.semanticsLabel,
this.semanticsValueBuilder});