Sound class

A single sound to play.

Constructors

Sound({required String path, required SoundType soundType, required bool destroy, double volume = 0.7, bool looping = false, Duration loopingStart = Duration.zero, SoundPosition position = unpanned, bool paused = false, LoadMode loadMode = LoadMode.memory})
Create an instance.
const

Properties

destroy bool
Whether or not this sound should be destroyed after playing.
final
hashCode int
Get a hash code which can safely be used to check equality.
no setteroverride
internalUri String
Get an internal URI for this sound.
no setter
loadMode → LoadMode
The mode to use when loading this sound.
final
looping bool
Whether this sound should loop.
final
loopingStart Duration
The point where this sound should start loading.
final
path String
The asset path to use.
final
paused bool
Whether this sound should start paused.
final
position SoundPosition
The position for this sound.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
soundType SoundType
The type of the sound to play.
final
volume double
The volume to play path at.
final

Methods

copyWith({String? path, bool? destroy, SoundType? soundType, double? volume, bool? looping, Duration? loopingStart, SoundPosition? position, bool? paused, LoadMode? loadMode}) Sound
Copy this sound to a new instance.
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