Refactoring - Version OK
This commit is contained in:
@@ -234,11 +234,11 @@ class _InscriptionEventDialogState extends State<InscriptionEventDialog> {
|
||||
border: Border.all(color: Colors.orange[200]!),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
child: Row(
|
||||
child: const Row(
|
||||
children: [
|
||||
const Icon(Icons.warning, color: Colors.orange),
|
||||
const SizedBox(width: 12),
|
||||
const Expanded(
|
||||
Icon(Icons.warning, color: Colors.orange),
|
||||
SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'Êtes-vous sûr de vouloir vous désinscrire de cet événement ?',
|
||||
style: TextStyle(fontSize: 14),
|
||||
@@ -292,9 +292,9 @@ class _InscriptionEventDialogState extends State<InscriptionEventDialog> {
|
||||
void _submitForm() {
|
||||
if (widget.isInscrit) {
|
||||
// Désinscription
|
||||
context.read<EvenementsBloc>().add(DesinscrireEvenement(widget.evenement.id!));
|
||||
context.read<EvenementsBloc>().add(DesinscrireEvenement(widget.evenement.id!.toString()));
|
||||
Navigator.pop(context);
|
||||
|
||||
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('Désinscription réussie'),
|
||||
@@ -304,7 +304,7 @@ class _InscriptionEventDialogState extends State<InscriptionEventDialog> {
|
||||
} else {
|
||||
// Inscription
|
||||
context.read<EvenementsBloc>().add(
|
||||
InscrireEvenement(widget.evenement.id!),
|
||||
InscrireEvenement(widget.evenement.id!.toString()),
|
||||
);
|
||||
Navigator.pop(context);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user