LeverOptions constructor
const
LeverOptions({})
创建参数;宽度比例须为正,阈值须在 0 到 1 之间。
Implementation
const LeverOptions(
{this.side = LeverSide.right,
this.widthFactor = 0.18,
this.pullThreshold = 0.6,
this.springBack = _defaultDuration,
this.autoPlay = true,
this.staggerStop = _defaultDuration,
this.knobColor = const Color(0xFFE53935),
this.shaftColor = const Color(0xFF9E9E9E)})
: assert(widthFactor > 0),
assert(pullThreshold >= 0 && pullThreshold <= 1);