AssetsAudioPlayerGroup constructor

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

Implementation

AssetsAudioPlayerGroup({
  this.showNotification = _defaultShowNotification,
  required this.updateNotification,
  this.notificationStopEnabled = _defaultNotificationStopEnabled,
  this.onNotificationOpened,
  this.onNotificationPlay,
  this.onNotificationPause,
  this.onNotificationStop,
  this.respectSilentMode = _defaultRespectSilentMode,
  this.playInBackground = _defaultPlayInBackground,
}) {
  // default action, can be overriden using player.onErrorDo = (error, player) { ACTION };
  onErrorDo = (group, errorHandler) {
    if (kDebugMode) {
      print(errorHandler.error.message);
    }
    errorHandler.player.stop();
  };
}