LuckyLots constructor

const LuckyLots({
  1. Key? key,
  2. required LotsConfig config,
  3. LotsController? controller,
  4. LuckyRenderer<LotsConfig, LotsLayout, LotsFrame, LuckyResult<LotsStick>>? renderer,
  5. double? width,
  6. double? height,
  7. AlignmentGeometry alignment = Alignment.topLeft,
  8. VoidCallback? onStart,
  9. LuckyButtonTapCallback? onButtonTap,
  10. ValueChanged<int>? onItemTap,
  11. ValueChanged<LuckyResult<LotsStick>>? onEnd,
  12. ValueChanged<LuckyPhase>? onPhaseChanged,
  13. ValueChanged<LuckyImageError>? onImageError,
  14. VoidCallback? onReady,
  15. LuckyHooks hooks = const LuckyHooks(),
  16. List<LuckyLayer<LotsLayout, LotsFrame>> layers = const [],
  17. LuckyPerformanceOptions performance = const LuckyPerformanceOptions(),
  18. LuckyTextScaling textScaling = LuckyTextScaling.none,
  19. String? semanticsLabel,
  20. String semanticsValueBuilder(
    1. LuckyPhase phase,
    2. 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});