AudioServiceConfig constructor
const
AudioServiceConfig({
- bool androidResumeOnClick = true,
- String? androidNotificationChannelId,
- String androidNotificationChannelName = 'Notifications',
- String? androidNotificationChannelDescription,
- Color? notificationColor,
- String androidNotificationIcon = 'mipmap/ic_launcher',
- bool androidShowNotificationBadge = false,
- bool androidNotificationClickStartsActivity = true,
- bool androidNotificationOngoing = false,
- bool androidStopForegroundOnPause = true,
- int? artDownscaleWidth,
- int? artDownscaleHeight,
- Duration fastForwardInterval = const Duration(seconds: 10),
- Duration rewindInterval = const Duration(seconds: 10),
- bool preloadArtwork = false,
- Map<
String, dynamic> ? androidBrowsableRootExtras,
Creates a configuration object.
Implementation
const AudioServiceConfig({
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(
!androidNotificationOngoing || androidStopForegroundOnPause,
'The androidNotificationOngoing will make no effect with androidStopForegroundOnPause set to false',
);