AudioSource class abstract
Specifies a source of audio to be played. Audio sources are composable using the subclasses of this class. The same AudioSource instance should not be used simultaneously by more than one AudioPlayer.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sequence
→ List<
IndexedAudioSource> -
no setter
-
shuffleIndices
→ List<
int> -
no setter
Methods
-
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
Static Methods
-
asset(
String assetPath, {String? package, dynamic tag}) → UriAudioSource - Convenience method to create an audio source for an asset.
-
file(
String filePath, {dynamic tag}) → UriAudioSource - Convenience method to create an audio source for a file.
-
uri(
Uri uri, {Map< String, String> ? headers, dynamic tag}) → UriAudioSource - Creates an AudioSource from a Uri with optional headers by attempting to guess the type of stream. On iOS, this uses Apple's SDK to automatically detect the stream type. On Android, the type of stream will be guessed from the extension.