feat: Intégration d'un système complet d'alertes et de notifications par email
Cette mise à jour majeure introduit un système de notifications robuste, centré sur la création d'alertes et l'envoi d'emails via des Cloud Functions. Elle inclut la gestion des préférences utilisateur, la création automatique d'alertes lors d'événements critiques et une nouvelle interface dédiée.
**Backend (Cloud Functions) :**
- **Nouveau service d'alerting (`createAlert`, `processEquipmentValidation`) :**
- `createAlert` : Nouvelle fonction pour créer une alerte. Elle détermine les utilisateurs à notifier (admins, workforce d'événement) et gère la persistance dans Firestore.
- `processEquipmentValidation` : Endpoint appelé lors de la validation du matériel (chargement/déchargement). Il analyse l'état de l'équipement (`LOST`, `MISSING`, `DAMAGED`) et crée automatiquement les alertes correspondantes.
- **Système d'envoi d'emails (`sendAlertEmail`, `sendDailyDigest`) :**
- `sendAlertEmail` : Cloud Function `onCall` pour envoyer un email d'alerte individuel. Elle respecte les préférences de notification de l'utilisateur (canal email, type d'alerte).
- `sendDailyDigest` : Tâche planifiée (tous les jours à 8h) qui envoie un email récapitulatif des alertes non lues des dernières 24 heures aux utilisateurs concernés.
- Ajout de templates HTML (`base-template`, `alert-individual`, `alert-digest`) avec `Handlebars` pour des emails riches.
- Configuration centralisée du SMTP via des variables d'environnement (`.env`).
- **Triggers Firestore (`onEventCreated`, `onEventUpdated`) :**
- Des triggers créent désormais des alertes d'information lorsqu'un événement est créé ou que de nouveaux membres sont ajoutés à la workforce.
- **Règles Firestore :**
- Mises à jour pour autoriser les utilisateurs authentifiés à créer et modifier leurs propres alertes (marquer comme lue, supprimer), tout en sécurisant les accès.
**Frontend (Flutter) :**
- **Nouvel `AlertService` et `EmailService` :**
- `AlertService` : Centralise la logique de création, lecture et gestion des alertes côté client en appelant les nouvelles Cloud Functions.
- `EmailService` : Service pour déclencher l'envoi d'emails via la fonction `sendAlertEmail`. Il contient la logique pour déterminer si une notification doit être immédiate (critique) ou différée (digest).
- **Nouvelle page de Notifications (`/alerts`) :**
- Interface dédiée pour lister toutes les alertes de l'utilisateur, avec des onglets pour filtrer par catégorie (Toutes, Événement, Maintenance, Équipement).
- Permet de marquer les alertes comme lues, de les supprimer et de tout marquer comme lu.
- **Intégration dans l'UI :**
- Ajout d'un badge de notification dans la `CustomAppBar` affichant le nombre d'alertes non lues en temps réel.
- Le `AutoLoginWrapper` gère désormais la redirection vers des routes profondes (ex: `/alerts`) depuis une URL.
- **Gestion des Préférences de Notification :**
- Ajout d'un widget `NotificationPreferencesWidget` dans la page "Mon Compte".
- Les utilisateurs peuvent désormais activer/désactiver les notifications par email, ainsi que filtrer par type d'alerte (événements, maintenance, etc.).
- Le `UserModel` et `LocalUserProvider` ont été étendus pour gérer ce nouveau modèle de préférences.
- **Création d'alertes contextuelles :**
- Le service `EventFormService` crée maintenant automatiquement une alerte lorsqu'un événement est créé ou modifié.
- La page de préparation d'événement (`EventPreparationPage`) appelle `processEquipmentValidation` à la fin de chaque étape pour une détection automatisée des anomalies.
**Dépendances et CI/CD :**
- Ajout des dépendances `cloud_functions` et `timeago` (Flutter), et `nodemailer`, `handlebars`, `dotenv` (Node.js).
- Ajout de scripts de déploiement PowerShell (`deploy_functions.ps1`, `deploy_firestore_rules.ps1`) pour simplifier les mises en production.
This commit is contained in:
234
em2rp/lib/views/widgets/alert_item.dart
Normal file
234
em2rp/lib/views/widgets/alert_item.dart
Normal file
@@ -0,0 +1,234 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:em2rp/models/alert_model.dart';
|
||||
// import 'package:timeago/timeago.dart' as timeago; // TODO: Ajouter dépendance dans pubspec.yaml
|
||||
|
||||
/// Widget pour afficher une alerte individuelle
|
||||
class AlertItem extends StatelessWidget {
|
||||
final AlertModel alert;
|
||||
final VoidCallback? onTap;
|
||||
final VoidCallback? onMarkAsRead;
|
||||
final VoidCallback? onDelete;
|
||||
|
||||
const AlertItem({
|
||||
super.key,
|
||||
required this.alert,
|
||||
this.onTap,
|
||||
this.onMarkAsRead,
|
||||
this.onDelete,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Dismissible(
|
||||
key: Key(alert.id),
|
||||
background: _buildSwipeBackground(
|
||||
Colors.blue,
|
||||
Icons.check,
|
||||
Alignment.centerLeft,
|
||||
),
|
||||
secondaryBackground: _buildSwipeBackground(
|
||||
Colors.red,
|
||||
Icons.delete,
|
||||
Alignment.centerRight,
|
||||
),
|
||||
confirmDismiss: (direction) async {
|
||||
if (direction == DismissDirection.startToEnd) {
|
||||
// Swipe vers la droite = marquer comme lu
|
||||
onMarkAsRead?.call();
|
||||
return false; // Ne pas supprimer le widget
|
||||
} else {
|
||||
// Swipe vers la gauche = supprimer
|
||||
return await _confirmDelete(context);
|
||||
}
|
||||
},
|
||||
child: Card(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
color: alert.isRead ? Colors.white : Colors.blue.shade50,
|
||||
elevation: alert.isRead ? 1 : 2,
|
||||
child: ListTile(
|
||||
leading: _buildIcon(),
|
||||
title: Text(
|
||||
alert.message,
|
||||
style: TextStyle(
|
||||
fontWeight: alert.isRead ? FontWeight.normal : FontWeight.bold,
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
subtitle: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
_formatDate(alert.createdAt),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.grey.shade600,
|
||||
),
|
||||
),
|
||||
if (alert.isResolved) ...[
|
||||
const SizedBox(height: 4),
|
||||
Row(
|
||||
children: [
|
||||
Icon(Icons.check_circle, size: 14, color: Colors.green),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
'Résolu',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.green,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
trailing: !alert.isRead
|
||||
? Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: _getSeverityColor(alert.severity),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Text(
|
||||
'Nouveau',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 11,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
onTap: onTap,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildSwipeBackground(Color color, IconData icon, Alignment alignment) {
|
||||
return Container(
|
||||
color: color,
|
||||
alignment: alignment,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Icon(icon, color: Colors.white, size: 28),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildIcon() {
|
||||
IconData iconData;
|
||||
Color iconColor;
|
||||
|
||||
switch (alert.type) {
|
||||
case AlertType.eventCreated:
|
||||
case AlertType.eventModified:
|
||||
case AlertType.eventAssigned:
|
||||
iconData = Icons.event;
|
||||
iconColor = Colors.blue;
|
||||
break;
|
||||
case AlertType.workforceAdded:
|
||||
iconData = Icons.group_add;
|
||||
iconColor = Colors.green;
|
||||
break;
|
||||
case AlertType.eventCancelled:
|
||||
iconData = Icons.event_busy;
|
||||
iconColor = Colors.red;
|
||||
break;
|
||||
case AlertType.maintenanceDue:
|
||||
case AlertType.maintenanceReminder:
|
||||
iconData = Icons.build;
|
||||
iconColor = Colors.orange;
|
||||
break;
|
||||
case AlertType.lost:
|
||||
iconData = Icons.error;
|
||||
iconColor = Colors.red;
|
||||
break;
|
||||
case AlertType.equipmentMissing:
|
||||
iconData = Icons.warning;
|
||||
iconColor = Colors.orange;
|
||||
break;
|
||||
case AlertType.lowStock:
|
||||
iconData = Icons.inventory_2;
|
||||
iconColor = Colors.orange;
|
||||
break;
|
||||
case AlertType.conflict:
|
||||
iconData = Icons.error_outline;
|
||||
iconColor = Colors.red;
|
||||
break;
|
||||
case AlertType.quantityMismatch:
|
||||
iconData = Icons.compare_arrows;
|
||||
iconColor = Colors.orange;
|
||||
break;
|
||||
case AlertType.damaged:
|
||||
iconData = Icons.broken_image;
|
||||
iconColor = Colors.red;
|
||||
break;
|
||||
}
|
||||
|
||||
return Container(
|
||||
width: 40,
|
||||
height: 40,
|
||||
decoration: BoxDecoration(
|
||||
color: iconColor.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Icon(iconData, color: iconColor, size: 24),
|
||||
);
|
||||
}
|
||||
|
||||
Color _getSeverityColor(AlertSeverity severity) {
|
||||
switch (severity) {
|
||||
case AlertSeverity.info:
|
||||
return Colors.blue;
|
||||
case AlertSeverity.warning:
|
||||
return Colors.orange;
|
||||
case AlertSeverity.critical:
|
||||
return Colors.red;
|
||||
}
|
||||
}
|
||||
|
||||
String _formatDate(DateTime date) {
|
||||
// TODO: Utiliser timeago une fois la dépendance ajoutée
|
||||
final now = DateTime.now();
|
||||
final difference = now.difference(date);
|
||||
|
||||
if (difference.inSeconds < 60) {
|
||||
return 'À l\'instant';
|
||||
} else if (difference.inMinutes < 60) {
|
||||
return 'Il y a ${difference.inMinutes} min';
|
||||
} else if (difference.inHours < 24) {
|
||||
return 'Il y a ${difference.inHours}h';
|
||||
} else if (difference.inDays < 7) {
|
||||
return 'Il y a ${difference.inDays}j';
|
||||
} else {
|
||||
return '${date.day}/${date.month}/${date.year}';
|
||||
}
|
||||
}
|
||||
|
||||
Future<bool> _confirmDelete(BuildContext context) async {
|
||||
return await showDialog<bool>(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: const Text('Supprimer l\'alerte ?'),
|
||||
content: const Text('Cette action est irréversible.'),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(false),
|
||||
child: const Text('Annuler'),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(true);
|
||||
onDelete?.call();
|
||||
},
|
||||
style: TextButton.styleFrom(foregroundColor: Colors.red),
|
||||
child: const Text('Supprimer'),
|
||||
),
|
||||
],
|
||||
),
|
||||
) ??
|
||||
false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ import 'package:provider/provider.dart';
|
||||
import 'package:em2rp/providers/local_user_provider.dart';
|
||||
import 'package:em2rp/utils/colors.dart';
|
||||
|
||||
import '../notification_badge.dart' show NotificationBadge;
|
||||
|
||||
class CustomAppBar extends StatefulWidget implements PreferredSizeWidget {
|
||||
final String title;
|
||||
final List<Widget>? actions;
|
||||
@@ -29,6 +31,7 @@ class _CustomAppBarState extends State<CustomAppBar> {
|
||||
title: Text(widget.title),
|
||||
backgroundColor: AppColors.rouge,
|
||||
actions: [
|
||||
NotificationBadge(),
|
||||
if (widget.showLogoutButton)
|
||||
IconButton(
|
||||
icon: const Icon(Icons.logout, color: AppColors.blanc),
|
||||
|
||||
43
em2rp/lib/views/widgets/notification_badge.dart
Normal file
43
em2rp/lib/views/widgets/notification_badge.dart
Normal file
@@ -0,0 +1,43 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:em2rp/services/alert_service.dart';
|
||||
import 'package:em2rp/providers/local_user_provider.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
/// Badge de notifications dans l'AppBar
|
||||
class NotificationBadge extends StatelessWidget {
|
||||
const NotificationBadge({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final localUserProvider = context.watch<LocalUserProvider>();
|
||||
final userId = localUserProvider.currentUser?.uid;
|
||||
|
||||
if (userId == null) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return StreamBuilder<int>(
|
||||
stream: AlertService().unreadCountStreamForUser(userId),
|
||||
builder: (context, snapshot) {
|
||||
final count = snapshot.data ?? 0;
|
||||
|
||||
return Badge(
|
||||
label: Text('$count'),
|
||||
isLabelVisible: count > 0,
|
||||
backgroundColor: Colors.red,
|
||||
textColor: Colors.white,
|
||||
child: IconButton(
|
||||
icon: const Icon(Icons.notifications),
|
||||
onPressed: () => _openAlertsPage(context),
|
||||
tooltip: 'Notifications',
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
void _openAlertsPage(BuildContext context) {
|
||||
Navigator.of(context).pushNamed('/alerts');
|
||||
}
|
||||
}
|
||||
|
||||
264
em2rp/lib/views/widgets/notification_preferences_widget.dart
Normal file
264
em2rp/lib/views/widgets/notification_preferences_widget.dart
Normal file
@@ -0,0 +1,264 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:em2rp/models/notification_preferences_model.dart';
|
||||
import 'package:em2rp/providers/local_user_provider.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
/// Widget pour afficher et modifier les préférences de notifications
|
||||
class NotificationPreferencesWidget extends StatefulWidget {
|
||||
const NotificationPreferencesWidget({super.key});
|
||||
|
||||
@override
|
||||
State<NotificationPreferencesWidget> createState() => _NotificationPreferencesWidgetState();
|
||||
}
|
||||
|
||||
class _NotificationPreferencesWidgetState extends State<NotificationPreferencesWidget> {
|
||||
// État local pour feedback immédiat
|
||||
NotificationPreferences? _localPrefs;
|
||||
bool _isSaving = false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Consumer<LocalUserProvider>(
|
||||
builder: (context, userProvider, _) {
|
||||
final user = userProvider.currentUser;
|
||||
if (user == null) return const SizedBox.shrink();
|
||||
|
||||
// Utiliser les prefs locales si disponibles, sinon les prefs du user
|
||||
final prefs = _localPrefs ?? user.notificationPreferences ?? NotificationPreferences.defaults();
|
||||
|
||||
return Card(
|
||||
elevation: 2,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Titre section
|
||||
Row(
|
||||
children: [
|
||||
Icon(Icons.notifications, color: Theme.of(context).primaryColor),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'Préférences de notifications',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Theme.of(context).primaryColor,
|
||||
),
|
||||
),
|
||||
if (_isSaving) ...[
|
||||
const SizedBox(width: 8),
|
||||
const SizedBox(
|
||||
width: 16,
|
||||
height: 16,
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
'Choisissez comment vous souhaitez être notifié',
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: Colors.grey.shade600,
|
||||
),
|
||||
),
|
||||
const Divider(height: 24),
|
||||
|
||||
// Canaux de notification
|
||||
Text(
|
||||
'Canaux de notification',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.grey.shade700,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
|
||||
_buildSwitchTile(
|
||||
context,
|
||||
title: 'Notifications in-app',
|
||||
subtitle: 'Alertes dans l\'application',
|
||||
value: prefs.inAppEnabled,
|
||||
icon: Icons.app_settings_alt,
|
||||
onChanged: (value) => _updatePrefs(
|
||||
context,
|
||||
prefs.copyWith(inAppEnabled: value),
|
||||
),
|
||||
),
|
||||
|
||||
_buildSwitchTile(
|
||||
context,
|
||||
title: 'Notifications email',
|
||||
subtitle: 'Recevoir des emails',
|
||||
value: prefs.emailEnabled,
|
||||
icon: Icons.email,
|
||||
onChanged: (value) => _updatePrefs(
|
||||
context,
|
||||
prefs.copyWith(emailEnabled: value),
|
||||
),
|
||||
),
|
||||
|
||||
_buildSwitchTile(
|
||||
context,
|
||||
title: 'Notifications push',
|
||||
subtitle: 'Notifications navigateur',
|
||||
value: prefs.pushEnabled,
|
||||
icon: Icons.notifications_active,
|
||||
onChanged: (value) => _updatePrefs(
|
||||
context,
|
||||
prefs.copyWith(pushEnabled: value),
|
||||
),
|
||||
),
|
||||
|
||||
const Divider(height: 24),
|
||||
|
||||
// Types de notifications
|
||||
Text(
|
||||
'Types de notifications',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.grey.shade700,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
|
||||
_buildSwitchTile(
|
||||
context,
|
||||
title: 'Événements',
|
||||
subtitle: 'Création, modification, assignations',
|
||||
value: prefs.eventsNotifications,
|
||||
icon: Icons.event,
|
||||
onChanged: (value) => _updatePrefs(
|
||||
context,
|
||||
prefs.copyWith(eventsNotifications: value),
|
||||
),
|
||||
),
|
||||
|
||||
_buildSwitchTile(
|
||||
context,
|
||||
title: 'Maintenance',
|
||||
subtitle: 'Rappels de maintenance',
|
||||
value: prefs.maintenanceNotifications,
|
||||
icon: Icons.build,
|
||||
onChanged: (value) => _updatePrefs(
|
||||
context,
|
||||
prefs.copyWith(maintenanceNotifications: value),
|
||||
),
|
||||
),
|
||||
|
||||
_buildSwitchTile(
|
||||
context,
|
||||
title: 'Stock',
|
||||
subtitle: 'Stock faible, quantités',
|
||||
value: prefs.stockNotifications,
|
||||
icon: Icons.inventory_2,
|
||||
onChanged: (value) => _updatePrefs(
|
||||
context,
|
||||
prefs.copyWith(stockNotifications: value),
|
||||
),
|
||||
),
|
||||
|
||||
_buildSwitchTile(
|
||||
context,
|
||||
title: 'Équipement',
|
||||
subtitle: 'Perdu, manquant, conflits',
|
||||
value: prefs.equipmentNotifications,
|
||||
icon: Icons.warning,
|
||||
onChanged: (value) => _updatePrefs(
|
||||
context,
|
||||
prefs.copyWith(equipmentNotifications: value),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildSwitchTile(
|
||||
BuildContext context, {
|
||||
required String title,
|
||||
required String subtitle,
|
||||
required bool value,
|
||||
required IconData icon,
|
||||
required ValueChanged<bool> onChanged,
|
||||
}) {
|
||||
return SwitchListTile(
|
||||
secondary: Icon(icon, color: value ? Theme.of(context).primaryColor : Colors.grey),
|
||||
title: Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
subtitle,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.grey.shade600,
|
||||
),
|
||||
),
|
||||
value: value,
|
||||
onChanged: _isSaving ? null : onChanged, // Désactiver pendant sauvegarde
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
inactiveThumbColor: Colors.grey.shade400, // Couleur visible quand OFF
|
||||
inactiveTrackColor: Colors.grey.shade300, // Track visible quand OFF
|
||||
contentPadding: EdgeInsets.zero,
|
||||
dense: true,
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _updatePrefs(BuildContext context, NotificationPreferences newPrefs) async {
|
||||
// Mise à jour locale immédiate pour feedback visuel
|
||||
setState(() {
|
||||
_localPrefs = newPrefs;
|
||||
_isSaving = true;
|
||||
});
|
||||
|
||||
final userProvider = context.read<LocalUserProvider>();
|
||||
|
||||
try {
|
||||
await userProvider.updateNotificationPreferences(newPrefs);
|
||||
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_isSaving = false;
|
||||
_localPrefs = null; // Revenir aux prefs du provider
|
||||
});
|
||||
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('Préférences enregistrées'),
|
||||
backgroundColor: Colors.green,
|
||||
duration: Duration(seconds: 2),
|
||||
),
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_isSaving = false;
|
||||
_localPrefs = null; // Rollback en cas d'erreur
|
||||
});
|
||||
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('Erreur : $e'),
|
||||
backgroundColor: Colors.red,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user