sendBackupProgressNotification function
Implementation
Future<void> sendBackupProgressNotification(
double progress, String currentFile) async {
try {
// WICHTIG: Verwende den gemeinsamen Kanal
await AwesomeNotifications().createNotification(
content: NotificationContent(
id: 10,
channelKey: 'mbg_all_notifications',
title: 'Backup wird erstellt',
body: 'Fortschritt: ${(progress * 100).round()}% - $currentFile',
notificationLayout: NotificationLayout.ProgressBar,
progress: progress,
),
);
} catch (e) {
debugPrint(
'Fehler beim Senden der Backup-Fortschrittsbenachrichtigung: $e');
}
}