copyWith method

SlotPayline copyWith({
  1. List<int>? rowOffsets,
  2. Color? color,
  3. double? width,
})

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

Implementation

SlotPayline copyWith({List<int>? rowOffsets, Color? color, double? width}) =>
    SlotPayline(rowOffsets ?? this.rowOffsets,
        color: color ?? this.color, width: width ?? this.width);