LuckyCapsuleMachine constructor
const
LuckyCapsuleMachine({
- Key? key,
- required CapsuleConfig config,
- LuckyController<
CapsuleConfig, CapsuleLayout, CapsuleFrame, LuckyResult< ? controller,CapsulePrize> > - LuckyRenderer<
CapsuleConfig, CapsuleLayout, CapsuleFrame, LuckyResult< ? renderer,CapsulePrize> > - double? width,
- double? height,
- AlignmentGeometry alignment = Alignment.topLeft,
- VoidCallback? onStart,
- LuckyButtonTapCallback? onButtonTap,
- ValueChanged<
int> ? onItemTap, - ValueChanged<
LuckyResult< ? onEnd,CapsulePrize> > - ValueChanged<
LuckyPhase> ? onPhaseChanged, - ValueChanged<
LuckyImageError> ? onImageError, - VoidCallback? onReady,
- LuckyHooks hooks = const LuckyHooks(),
- List<
LuckyLayer< layers = const [],CapsuleLayout, CapsuleFrame> > - LuckyPerformanceOptions performance = const LuckyPerformanceOptions(),
- LuckyTextScaling textScaling = LuckyTextScaling.none,
- String? semanticsLabel,
- String semanticsValueBuilder(
- LuckyPhase phase,
- LuckyResult<
CapsulePrize> ? result
创建扭蛋机;参数契约与 LuckyGameView 一致。
Implementation
const LuckyCapsuleMachine(
{super.key,
required super.config,
super.controller,
super.renderer,
super.width,
super.height,
super.alignment,
super.onStart,
super.onButtonTap,
super.onItemTap,
super.onEnd,
super.onPhaseChanged,
super.onImageError,
super.onReady,
super.hooks,
super.layers,
super.performance,
super.textScaling,
super.semanticsLabel,
super.semanticsValueBuilder})
: super(game: const CapsuleGame());