Player constructor
Player({
- int? id,
- required PlayerMedia media,
- bool? autoPlay,
- bool? once,
- bool? loop,
Implementation
Player({
super.id,
required super.media,
bool? autoPlay,
bool? once,
bool? loop,
}) : player = audioplayers.AudioPlayer(),
super(
autoPlay: autoPlay ?? true,
once: once ?? false,
loop: loop ?? false) {
players.add(this);
}