copyWith method
返回替换指定字段的副本;例如 lever.copyWith(side: LeverSide.left)。
Implementation
LeverOptions copyWith(
{LeverSide? side,
double? widthFactor,
double? pullThreshold,
Duration? springBack,
bool? autoPlay,
Duration? staggerStop,
Color? knobColor,
Color? shaftColor}) =>
LeverOptions(
side: side ?? this.side,
widthFactor: widthFactor ?? this.widthFactor,
pullThreshold: pullThreshold ?? this.pullThreshold,
springBack: springBack ?? this.springBack,
autoPlay: autoPlay ?? this.autoPlay,
staggerStop: staggerStop ?? this.staggerStop,
knobColor: knobColor ?? this.knobColor,
shaftColor: shaftColor ?? this.shaftColor);