copyWith method

UMediaNote copyWith({
  1. Duration? position,
  2. Duration? end,
  3. bool clearEnd = false,
  4. String? text,
  5. Color? color,
})

Copy with some fields changed.

Implementation

UMediaNote copyWith({Duration? position, Duration? end, bool clearEnd = false, String? text, Color? color}) => UMediaNote(
  id: id,
  position: position ?? this.position,
  end: clearEnd ? null : (end ?? this.end),
  text: text ?? this.text,
  color: color ?? this.color,
  createdAt: createdAt,
  updatedAt: DateTime.now(),
  extra: extra,
);