sendSyncProgressNotification function

Future<void> sendSyncProgressNotification(
  1. double progress,
  2. String currentInspection
)

Implementation

Future<void> sendSyncProgressNotification(
    double progress, String currentInspection) async {
  try {
    // WICHTIG: Verwende den gemeinsamen Kanal
    await AwesomeNotifications().createNotification(
      content: NotificationContent(
        id: 20,
        channelKey: 'mbg_all_notifications',
        title: 'Synchronisierung läuft',
        body: 'Fortschritt: ${(progress * 100).round()}% - $currentInspection',
        notificationLayout: NotificationLayout.ProgressBar,
        progress: progress,
      ),
    );
  } catch (e) {
    debugPrint('Fehler beim Senden der Sync-Fortschrittsbenachrichtigung: $e');
  }
}