UMediaNote.create constructor

UMediaNote.create({
  1. required Duration position,
  2. Duration? end,
  3. String text = "",
  4. Color color = const Color(0xFFFFC107),
})

New note at position (optionally a range to end).

Implementation

factory UMediaNote.create({required Duration position, Duration? end, String text = "", Color color = const Color(0xFFFFC107)}) {
  final DateTime now = DateTime.now();
  return UMediaNote(id: _noteId(), position: position, end: end, text: text, color: color, createdAt: now, updatedAt: now);
}