Player constructor

Player({
  1. int? id,
  2. required PlayerMedia media,
  3. bool? autoPlay,
  4. bool? once,
  5. 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);
}