NotificationService class

Service for managing audio playback notifications

Constructors

NotificationService.new()
Creates a new notification service

Properties

actionStream Stream<String>
Gets the stream of notification actions
no setter
hashCode int
The hash code for this object.
no setterinherited
onActionReceived NotificationActionCallback
Sets the callback for handling notification actions
no getter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Disposes of resources
hideNotification() Future<bool>
Hides the playback notification
initialize({required String channelId, required String channelName, String? channelDescription, int notificationId = 1, String? smallIconName}) Future<bool>
Initializes the notification service
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
showPlaybackNotification({required String title, String? artist, String? album, String? artUri, required bool isPlaying, int position = 0, int duration = 0, bool showControls = true}) Future<bool>
Shows a playback notification
toString() String
A string representation of this object.
inherited
updatePlaybackState(PlaybackState state) Future<bool>
Updates the playback notification with the current state

Operators

operator ==(Object other) bool
The equality operator.
inherited