AssetsAudioPlayerGroup constructor

AssetsAudioPlayerGroup({
  1. bool showNotification = _DEFAULT_SHOW_NOTIFICATION,
  2. required PlayerGroupMetasCallback updateNotification,
  3. bool notificationStopEnabled = _DEFAULT_NOTIFICATION_STOP_ENABLED,
  4. PlayerGroupCallback? onNotificationOpened,
  5. PlayerGroupCallback? onNotificationPlay,
  6. PlayerGroupCallback? onNotificationPause,
  7. PlayerGroupCallback? onNotificationStop,
  8. bool respectSilentMode = _DEFAULT_RESPECT_SILENT_MODE,
  9. PlayInBackground playInBackground = _DEFAULT_PLAY_IN_BACKGROUND,
})

Implementation

AssetsAudioPlayerGroup({
  this.showNotification = _DEFAULT_SHOW_NOTIFICATION,
  required this.updateNotification,
  this.notificationStopEnabled = _DEFAULT_NOTIFICATION_STOP_ENABLED,
  this.onNotificationOpened,
  this.onNotificationPlay,
  this.onNotificationPause,
  this.onNotificationStop,
  this.respectSilentMode = _DEFAULT_RESPECT_SILENT_MODE,
  this.playInBackground = _DEFAULT_PLAY_IN_BACKGROUND,
}) {
  // default action, can be overriden using player.onErrorDo = (error, player) { ACTION };
  onErrorDo = (group, errorHandler) {
    print(errorHandler.error.message);
    errorHandler.player.stop();
  };
}