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