Sound class abstract

A single sound to play.

Implementers

Constructors

Sound({required bool destroy, double volume = 0.7, bool looping = false, Duration loopingStart = Duration.zero, SoundPosition position = unpanned, bool paused = false, double relativePlaySpeed = 1.0})
Create an instance.
const

Properties

destroy → bool
Whether or not this sound should be destroyed after playing.
final
hashCode → int
The hash code for this object.
no setterinherited
internalUri → String
The internal URI which refers to this sound.
no setter
looping → bool
Whether this sound should loop.
final
loopingStart → Duration
The point where this sound should start loading.
final
paused → bool
Whether this sound should start paused.
final
position → SoundPosition
The position for this sound.
final
relativePlaySpeed → double
The playback rate to use.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
volume → double
The volume to play at.
final

Methods

copyWith({bool? destroy, double? volume, bool? looping, Duration? loopingStart, SoundPosition? position, bool? paused, double? relativePlaySpeed}) → Sound
Return a new copy of this sound with the provided settings.
load() → Future<AudioSource>
Load an AudioSource from this Sound.
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.
inherited