LuckyWheel constructor
const
LuckyWheel({
- Key? key,
- required WheelConfig config,
- WheelController? controller,
- double? width,
- double? height,
- AlignmentGeometry alignment = Alignment.topLeft,
- VoidCallback? onStart,
- LuckyButtonTapCallback? onButtonTap,
- ValueChanged<
LuckyResult< ? onEnd,WheelPrize> > - ValueChanged<
LuckyPhase> ? onPhaseChanged, - ValueChanged<
int> ? onSectorPassed, - ValueChanged<
LuckyImageError> ? onImageError, - VoidCallback? onReady,
- LuckyHooks hooks = const LuckyHooks(),
- List<
LuckyLayer< layers = const [],WheelLayout, WheelFrame> > - LuckyRenderer<
WheelConfig, WheelLayout, WheelFrame, LuckyResult< ? renderer,WheelPrize> > - Widget overlayBuilder(
- BuildContext context,
- LuckySurfaceData<
WheelConfig, WheelLayout, WheelFrame> data
- LuckyPerformanceOptions performance = const LuckyPerformanceOptions(),
- LuckyTextScaling textScaling = LuckyTextScaling.none,
- String? semanticsLabel,
- String semanticsValueBuilder(
- LuckyPhase phase,
- LuckyResult<
WheelPrize> ? result
创建转盘,结构变化在减速期间延后到本局结束应用。
Implementation
const LuckyWheel(
{super.key,
required this.config,
this.controller,
this.width,
this.height,
this.alignment = Alignment.topLeft,
this.onStart,
this.onButtonTap,
this.onEnd,
this.onPhaseChanged,
this.onSectorPassed,
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});