AudioPool class

An AudioPool is a provider of AudioPlayers that leaves them pre-loaded to minimize delays.

All AudioPlayers loaded are for the same sound. If you want multiple sounds use multiple AudioPool. Use this class if you'd like have extremely quick firing, repetitive and simultaneous sounds, like shooting a laser in a fast-paced spaceship game.

Properties

hashCode int
The hash code for this object.
no setterinherited
maxPlayers int
Max and min numbers of players.
final
minPlayers int
Max and min numbers of players.
final
repeating bool
If the pool is repeating.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sound String
The path of the sound of this pool.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start({double volume = 1.0}) Future<Stoppable>
Starts playing the audio, returns a function that can stop the audio.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

create(String sound, {bool? repeating, int? maxPlayers, int? minPlayers = 1, String? prefix}) Future<AudioPool>
Creates an AudioPool instance with the given parameters.