AudioServiceConfig class
The configuration options to use when intializing the AudioService.
Constructors
-
AudioServiceConfig.new({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.
const
Properties
-
androidBrowsableRootExtras
→ Map<
String, dynamic> ? -
Extras to report on Android in response to an
onGetRoot
request.final - androidNotificationChannelDescription → String?
-
A description of the media notification channel, that is visible to user
in settings of your app.
final
- androidNotificationChannelId → String?
-
The ID of the media notification channel. This will default to
<YOUR_PACKAGE_NAME>.channel
where<YOUR_PACKAGE_NAME>
is your app's package name. e.g.com.mycompany.myapp.channel
.final - androidNotificationChannelName → String
-
The name of the media notification channel, that is visible to user in
settings of your app.
final
- androidNotificationClickStartsActivity → bool
-
Whether the application activity will be opened on click on notification.
final
- androidNotificationIcon → String
-
The icon resource to be used in the Android media notification, specified
like an XML resource reference. This should be a monochrome white icon on
a transparent background. The default value is
"mipmap/ic_launcher"
.final - androidNotificationOngoing → bool
-
Whether the notification can be swiped away.
final
- androidResumeOnClick → bool
-
Whether on Android a media button click wakes up the media session and
resumes playback.
final
- androidShowNotificationBadge → bool
-
Whether notification badges (also known as notification dots) should
appear on a launcher icon when the app has an active notification.
final
- androidStopForegroundOnPause → bool
-
Whether the Android service should switch to a lower priority state when
playback is paused allowing the user to swipe away the notification. Note
that while in this lower priority state, the operating system will also be
able to kill your service at any time to reclaim resources.
final
- artDownscaleHeight → int?
-
If not null, causes the artwork specified by MediaItem.artUri to be
downscaled to this maximum pixel height. If the resolution of your artwork
is particularly high, this can help to conserve memory. If specified,
artDownscaleWidth must also be specified.
final
- artDownscaleWidth → int?
-
If not null, causes the artwork specified by MediaItem.artUri to be
downscaled to this maximum pixel width. If the resolution of your artwork
is particularly high, this can help to conserve memory. If specified,
artDownscaleHeight must also be specified.
final
- fastForwardInterval → Duration
-
The interval to be used in AudioHandler.fastForward. This value will
also be used on iOS to render the skip-forward button. This value must be
positive.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- notificationColor → Color?
-
The color to use on the background of the notification on Android. This
should be a non-transparent color.
final
- preloadArtwork → bool
-
By default artworks are loaded only when the item is fed into AudioHandler.mediaItem.
final
- rewindInterval → Duration
-
The interval to be used in AudioHandler.rewind. This value will also be
used on iOS to render the skip-backward button. This value must be
positive.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited