showSyncResultNotification static method

Future<void> showSyncResultNotification({
  1. required String title,
  2. required String body,
  3. bool isSuccess = true,
})

Mostra notificação de resultado da sincronização

Implementation

static Future<void> showSyncResultNotification({
  required String title,
  required String body,
  bool isSuccess = true,
}) async {
  try {
    final syncConfig = _getSyncConfig();
    if (syncConfig == null || !syncConfig.enableNotifications) {
      return;
    }

    await SyncNotificationService.instance.showNotification(
      title: title,
      message: body,
      notificationId: SyncConstants.syncNotificationId,
    );
  } catch (e) {
    SyncUtils.debugLog('Erro ao mostrar notificação de resultado: $e', tag: 'BackgroundSyncService');
  }
}