LuckyLots constructor
const
LuckyLots({
- Key? key,
- required LotsConfig config,
- LotsController? controller,
- LuckyRenderer<
LotsConfig, LotsLayout, LotsFrame, LuckyResult< ? renderer,LotsStick> > - double? width,
- double? height,
- AlignmentGeometry alignment = Alignment.topLeft,
- VoidCallback? onStart,
- LuckyButtonTapCallback? onButtonTap,
- ValueChanged<
int> ? onItemTap, - ValueChanged<
LuckyResult< ? onEnd,LotsStick> > - ValueChanged<
LuckyPhase> ? onPhaseChanged, - ValueChanged<
LuckyImageError> ? onImageError, - VoidCallback? onReady,
- LuckyHooks hooks = const LuckyHooks(),
- List<
LuckyLayer< layers = const [],LotsLayout, LotsFrame> > - LuckyPerformanceOptions performance = const LuckyPerformanceOptions(),
- LuckyTextScaling textScaling = LuckyTextScaling.none,
- String? semanticsLabel,
- String semanticsValueBuilder(
- LuckyPhase phase,
- LuckyResult<
LotsStick> ? result
创建组件;宽高为空时使用有界父约束,点按开始只通知回调。
Implementation
const LuckyLots(
{super.key,
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.onImageError,
this.onReady,
this.hooks = const LuckyHooks(),
this.layers = const [],
this.performance = const LuckyPerformanceOptions(),
this.textScaling = LuckyTextScaling.none,
this.semanticsLabel,
this.semanticsValueBuilder});