copyWith method

SlotOptions copyWith({
  1. SlotMode? mode,
  2. int? direction,
  3. double? rowSpacing,
  4. double? colSpacing,
  5. double? cellAspectRatio,
  6. LuckyMotionOptions? motion,
})

返回仅替换非 null 参数的副本;例如 value.copyWith() 保留全部配置。

Implementation

SlotOptions copyWith(
        {SlotMode? mode,
        int? direction,
        double? rowSpacing,
        double? colSpacing,
        double? cellAspectRatio,
        LuckyMotionOptions? motion}) =>
    SlotOptions(
        mode: mode ?? this.mode,
        direction: direction ?? this.direction,
        rowSpacing: rowSpacing ?? this.rowSpacing,
        colSpacing: colSpacing ?? this.colSpacing,
        cellAspectRatio: cellAspectRatio ?? this.cellAspectRatio,
        motion: motion ?? this.motion);