AudioTrack class

Model representing an audio track with metadata.

Constructors

AudioTrack({required String id, required String title, required String subtitle, required Duration duration, required EditorAudio audio, EditorImage? image, double volume = 1.0, bool loop = false, Duration? audioStartTime, Duration? audioEndTime, Duration? startTime, Duration? endTime, double volumeBalance = 0.0})
Creates an instance of AudioTrack.

Properties

audio → EditorAudio
Audio source that should be played for this track.
final
audioEndTime → Duration?
The end time offset within the audio file.
final
audioStartTime → Duration?
The start time offset within the audio file.
final
duration → Duration
Duration of the audio track.
final
endTime ↔ Duration?
The end time of the selected audio track in the video.
getter/setter pair
formattedDuration → String
Returns a formatted duration string (e.g., "3:45").
no setter
hashCode → int
The hash code for this object.
no setteroverride
id → String
Unique identifier for the audio track.
final
image → EditorImage?
Optional artwork associated with the track.
final
loop → bool
Whether to loop the audio if it is shorter than the time range.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
startTime ↔ Duration?
The start time of the selected audio track in the video.
getter/setter pair
subtitle → String
Subtitle like the artist or creator of the audio track.
final
title → String
Name/title of the audio track.
final
volume → double
Volume multiplier for this audio track.
final
volumeBalance ↔ double
The balance between the original audio and the overlay track. A value of 1.0 means only the overlay (this track) is audible. A value of -1.0 means only the original audio is audible.
getter/setter pair

Methods

copyWith({String? id, String? title, String? subtitle, Duration? duration, EditorImage? image, EditorAudio? audio, double? volume, bool? enableLoop, bool? loop, Duration? audioStartTime, Duration? audioEndTime, Duration? startTime, Duration? endTime, double? volumeBalance}) → AudioTrack
Creates a copy of this AudioTrack with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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