WheelOptions class

Constructors

WheelOptions({ScrollPhysics? physics, double diameterRatio = 2.0, double perspective = 0.003, double offAxisFraction = 0.0, bool useMagnifier = true, double magnification = 1.2, double overAndUnderCenterOpacity = 1.0, double itemExtent = 30, double squeeze = 1.0, bool renderChildrenOutsideViewport = false, Clip clipBehavior = Clip.hardEdge, String? restorationId, ScrollBehavior? scrollBehavior})
const
WheelOptions.cupertino({double diameterRatio = 1.07, Color? backgroundColor, double offAxisFraction = 0.0, bool useMagnifier = true, double magnification = 1.1, double squeeze = 1.45, double itemExtent = 30, Widget? selectionOverlay = const CupertinoPickerDefaultSelectionOverlay()})
const
WheelOptions.custom({ScrollPhysics? physics, double diameterRatio = 2.0, double perspective = 0.003, double offAxisFraction = 0.0, bool useMagnifier = false, double magnification = 1.0, double overAndUnderCenterOpacity = 1.0, double itemExtent = 30, double squeeze = 1.0, bool renderChildrenOutsideViewport = false, Clip clipBehavior = Clip.hardEdge, String? restorationId, ScrollBehavior? scrollBehavior, Widget? selectionOverlay, Color? backgroundColor, bool isCupertino = false})
const

Properties

backgroundColor Color?
isCupertino=true生效
final
clipBehavior Clip
isCupertino=false生效
final
diameterRatio double
半径大小,越大则越平面,越小则间距越大
final
hashCode int
The hash code for this object.
no setterinherited
isCupertino bool
是否使用ios 样式
final
itemExtent double
wheel子item高度
final
magnification double
放大倍率
final
offAxisFraction double
选中item偏移
final
overAndUnderCenterOpacity double
isCupertino=false生效
final
perspective double
表示车轮水平偏离中心的程度 范围0,0.01 isCupertino=false生效
final
physics ScrollPhysics?
ScrollPhysics
final
renderChildrenOutsideViewport bool
isCupertino=false生效
final
restorationId String?
isCupertino=false生效
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollBehavior ScrollBehavior?
isCupertino=false生效
final
selectionOverlay Widget?
isCupertino=true生效
final
squeeze double
上下间距默认为1.45 数越小 间距越大
final
useMagnifier bool
是否启用放大镜
final

Methods

copyWith({double? itemExtent, double? diameterRatio, double? offAxisFraction, double? perspective, double? magnification, bool? useMagnifier, double? squeeze, ScrollPhysics? physics, Widget? selectionOverlay, Color? backgroundColor, bool? isCupertino, double? overAndUnderCenterOpacity, bool? renderChildrenOutsideViewport, Clip? clipBehavior, ScrollBehavior? scrollBehavior, String? restorationId}) WheelOptions
merge([WheelOptions? options]) WheelOptions
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited