LuckyGameView<C extends Object, L extends LuckyLayout, F extends LuckyFrame, R extends LuckyResult<Object?> > constructor
const
LuckyGameView<C extends Object, L extends LuckyLayout, F extends LuckyFrame, R extends LuckyResult<Object?> > ({
- Key? key,
- required LuckyGame<
C, L, F, R> game, - required C config,
- LuckyController<
C, L, F, R> ? controller, - LuckyRenderer<
C, L, F, R> ? renderer, - double? width,
- double? height,
- AlignmentGeometry alignment = Alignment.topLeft,
- VoidCallback? onStart,
- LuckyButtonTapCallback? onButtonTap,
- ValueChanged<
int> ? onItemTap, - ValueChanged<
R> ? onEnd, - ValueChanged<
LuckyPhase> ? onPhaseChanged, - void onItemPassed()?,
- ValueChanged<
LuckyImageError> ? onImageError, - VoidCallback? onReady,
- LuckyHooks hooks = const LuckyHooks(),
- List<
LuckyLayer< layers = const [],L, F> > - LuckyPerformanceOptions performance = const LuckyPerformanceOptions(),
- LuckyTextScaling textScaling = LuckyTextScaling.none,
- String? semanticsLabel,
- String semanticsValueBuilder(
- LuckyPhase phase,
- R? result
创建宿主;未给宽高时要求父约束有界,外部控制器归调用者释放。
Implementation
const LuckyGameView(
{super.key,
required this.game,
required this.config,
this.controller,
this.renderer,
this.width,
this.height,
this.alignment = Alignment.topLeft,
this.onStart,
this.onButtonTap,
this.onItemTap,
this.onEnd,
this.onPhaseChanged,
this.onItemPassed,
this.onImageError,
this.onReady,
this.hooks = const LuckyHooks(),
this.layers = const [],
this.performance = const LuckyPerformanceOptions(),
this.textScaling = LuckyTextScaling.none,
this.semanticsLabel,
this.semanticsValueBuilder});