UMediaNote class

A note pinned to a moment (or a range) of a video / audio track.

Annotations

Constructors

UMediaNote({required String id, required Duration position, required DateTime createdAt, required DateTime updatedAt, Duration? end, String text = "", Color color = const Color(0xFFFFC107), Map<String, Object?> extra = const <String, Object?>{}})
const
UMediaNote.create({required Duration position, Duration? end, String text = "", Color color = const Color(0xFFFFC107)})
New note at position (optionally a range to end).
factory
UMediaNote.fromJson(Map<String, Object?> json)
Reads a note from JSON.
factory

Properties

color → Color
Main color (defaults to the theme).
final
createdAt → DateTime
When the note was created.
final
end → Duration?
End of a range note (null = a single moment).
final
extra → Map<String, Object?>
Your own data.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
Unique id.
final
isRange → bool
True when the note covers a range.
no setter
position → Duration
Where it is placed.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text → String
Text to show.
final
updatedAt → DateTime
When the note was last changed.
final

Methods

copyWith({Duration? position, Duration? end, bool clearEnd = false, String? text, Color? color}) → UMediaNote
Copy with some fields changed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
Note as JSON.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited