showProgressNotification method

Future<void> showProgressNotification({
  1. required String title,
  2. required String message,
  3. required int progress,
  4. required int maxProgress,
  5. int? notificationId,
})

Mostra uma notificação de progresso

Implementation

Future<void> showProgressNotification({
  required String title,
  required String message,
  required int progress,
  required int maxProgress,
  int? notificationId,
}) async {
  if (!isEnabled) return;

  final id = notificationId ?? _generateNotificationId();
  _activeNotifications[id] = title;

  final percentage = ((progress / maxProgress) * 100).round();

  // Para desenvolvimento, apenas log no console
  debugPrint('[Syncly Progress] $title: $message ($percentage%)');

  // Simular notificação de progresso no debug
  if (kDebugMode) {
    final progressBar = _generateProgressBar(progress, maxProgress);
    debugPrint('📊 [$title] $progressBar $percentage% - $message');
  }
}