AudioServiceConfigMessage constructor

  1. @literal
const AudioServiceConfigMessage({
  1. bool androidResumeOnClick = true,
  2. String? androidNotificationChannelId,
  3. String androidNotificationChannelName = 'Notifications',
  4. String? androidNotificationChannelDescription,
  5. Color? notificationColor,
  6. String androidNotificationIcon = 'mipmap/ic_launcher',
  7. bool androidShowNotificationBadge = false,
  8. bool androidNotificationClickStartsActivity = true,
  9. bool androidNotificationOngoing = false,
  10. bool androidStopForegroundOnPause = true,
  11. int? artDownscaleWidth,
  12. int? artDownscaleHeight,
  13. Duration fastForwardInterval = const Duration(seconds: 10),
  14. Duration rewindInterval = const Duration(seconds: 10),
  15. bool preloadArtwork = false,
  16. Map<String, dynamic>? androidBrowsableRootExtras,
})

Implementation

@literal
const AudioServiceConfigMessage({
  this.androidResumeOnClick = true,
  this.androidNotificationChannelId,
  this.androidNotificationChannelName = 'Notifications',
  this.androidNotificationChannelDescription,
  this.notificationColor,
  this.androidNotificationIcon = 'mipmap/ic_launcher',
  this.androidShowNotificationBadge = false,
  this.androidNotificationClickStartsActivity = true,
  this.androidNotificationOngoing = false,
  this.androidStopForegroundOnPause = true,
  this.artDownscaleWidth,
  this.artDownscaleHeight,
  this.fastForwardInterval = const Duration(seconds: 10),
  this.rewindInterval = const Duration(seconds: 10),
  this.preloadArtwork = false,
  this.androidBrowsableRootExtras,
})  : assert((artDownscaleWidth != null) == (artDownscaleHeight != null)),
      assert(fastForwardInterval > Duration.zero),
      assert(rewindInterval > Duration.zero),
      assert(
        !androidNotificationOngoing || androidStopForegroundOnPause,
        'The androidNotificationOngoing will make no effect with androidStopForegroundOnPause set to false',
      );