NotificationAudioPlugin class

Main class for notification audio plugin functionality

Constructors

NotificationAudioPlugin()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyAudioFile({required String sourcePath, required String fileName}) Future<String?>
Copy audio file from external source to app directory
deleteAudio({required String fileName}) Future<Map<String, dynamic>?>
Delete audio file
downloadAudio({required String audioUrl, required String fileName}) Future<Map<String, dynamic>?>
Download and save an audio file from URL
downloadAudioWithProgress({required String audioUrl, required String fileName, required dynamic onProgress(int progress, int bytesDownloaded, int totalBytes)}) Future<Map<String, dynamic>?>
Download audio file with progress tracking
exportSettings() Future<String?>
Export settings as JSON
getAudioSettings() Future<Map<String, dynamic>?>
Get current audio settings
importSettings({required String settings}) Future<Map<String, dynamic>?>
Import settings from JSON
listAudioFiles() Future<List<Map<String, dynamic>>?>
List all downloaded audio files
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
playAudio({required String audioUri}) Future<Map<String, dynamic>?>
Play audio file from URI
resetSettings() Future<Map<String, dynamic>?>
Reset all settings to defaults
setAudio({required String audioUrl, required String fileName}) Future<Map<String, dynamic>?>
Download audio and set as notification sound
setEnabled({required bool enabled}) Future<Map<String, dynamic>?>
Enable or disable custom audio notifications
setPackageName({required String packageName}) Future<Map<String, dynamic>?>
Set package name for notifications (default: com.binimise.staff.generic)
setVolume({required double volume}) Future<Map<String, dynamic>?>
Set audio volume (0.0 to 1.0)
startAlarm({String? audioPath, String? audioUrl}) Future<Map<String, dynamic>?>
Start alarm service with native audio playback
stopAlarm() Future<Map<String, dynamic>?>
Stop alarm service
stopAudio() Future<Map<String, dynamic>?>
Stop audio playback
toString() String
A string representation of this object.
inherited

Operators

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