diff --git a/covas_mobile/lib/classes/notification_service.dart b/covas_mobile/lib/classes/notification_service.dart index c7a6f6e..3c4bb0c 100644 --- a/covas_mobile/lib/classes/notification_service.dart +++ b/covas_mobile/lib/classes/notification_service.dart @@ -2,6 +2,10 @@ import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:timezone/timezone.dart' as tz; import 'package:timezone/data/latest_all.dart' as tz; +import 'package:flutter_localizations/flutter_localizations.dart'; +import 'package:flutter_gen/gen_l10n/app_localizations.dart'; +import 'package:provider/provider.dart'; + class NotificationService { static final FlutterLocalNotificationsPlugin _notificationsPlugin = FlutterLocalNotificationsPlugin(); @@ -65,8 +69,8 @@ class NotificationService { const NotificationDetails( android: AndroidNotificationDetails( 'events_channel', - 'Évènements', - channelDescription: 'Notifications des évènements favoris', + 'Events', + channelDescription: 'Favorite event notifications', importance: Importance.high, priority: Priority.high, ), @@ -80,25 +84,6 @@ class NotificationService { ); } - /// Notification immédiate (debug) - static Future showTestNotification() async { - await _notificationsPlugin.show( - 0, - "Test Notification", - "Ceci est une notification de debug", - const NotificationDetails( - android: AndroidNotificationDetails( - 'debug_channel', - 'Debug Notifications', - channelDescription: 'Notifications de test pour debug', - importance: Importance.max, - priority: Priority.high, - ), - iOS: DarwinNotificationDetails(), - ), - ); - } - /// Annule une notification planifiée static Future cancel(String eventId) async { await _notificationsPlugin.cancel(eventId.hashCode);