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.

Constructors

AudioPool(String sound, {bool repeating: false, int maxPlayers: 1, int minPlayers: 1, String prefix: 'audio/sfx/'})

Properties

availablePlayers List<AudioPlayer>
read / write
cache AudioCache
read / write
currentPlayers Map<String, AudioPlayer>
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
maxPlayers int
read / write
minPlayers int
read / write
repeating bool
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
sound String
read / write

Methods

init() Future
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
start({double volume: 1.0}) Future<Stoppable>
toString() String
Returns a string representation of this object.
inherited

Operators

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