feat(features): refontes adhesions/admin/auth/backup/contributions/dashboard/epargne/events

- adhesions : bloc complet avec events/states/model, dialogs paiement/rejet
- admin : users bloc, user management list/detail pages
- authentication : bloc + keycloak auth service + webview
- backup : bloc complet, repository, models
- contributions : bloc + widgets + export
- dashboard : widgets connectés (activities, events, notifications, search)
  + charts + monitoring + shortcuts
- epargne : repository, transactions, dialogs
- events : bloc complet, pages (detail, connected, wrapper), models
This commit is contained in:
dahoud
2026-04-15 20:26:48 +00:00
parent 45dcd2171e
commit 120434aba0
36 changed files with 903 additions and 1411 deletions

View File

@@ -3,6 +3,8 @@
library create_event_dialog;
import 'package:flutter/material.dart';
import '../../../../shared/design_system/tokens/module_colors.dart';
import '../../../../shared/design_system/tokens/color_tokens.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:intl/intl.dart';
import '../../bloc/evenements_bloc.dart';
@@ -55,7 +57,7 @@ class _CreateEventDialogState extends State<CreateEventDialog> {
if (state is EvenementsError) {
setState(() => _createSent = false);
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text(state.message), backgroundColor: Colors.red),
SnackBar(content: Text(state.message), backgroundColor: ColorTokens.error),
);
return;
}
@@ -65,7 +67,7 @@ class _CreateEventDialogState extends State<CreateEventDialog> {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('Événement créé avec succès'),
backgroundColor: Colors.green,
backgroundColor: ColorTokens.success,
),
);
}
@@ -81,7 +83,7 @@ class _CreateEventDialogState extends State<CreateEventDialog> {
Container(
padding: const EdgeInsets.all(16),
decoration: const BoxDecoration(
color: Color(0xFF3B82F6),
color: ModuleColors.evenements,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(4),
topRight: Radius.circular(4),
@@ -152,25 +154,32 @@ class _CreateEventDialogState extends State<CreateEventDialog> {
const SizedBox(height: 12),
// Type d'événement
DropdownButtonFormField<TypeEvenement>(
value: _selectedType,
decoration: const InputDecoration(
labelText: 'Type d\'événement *',
border: OutlineInputBorder(),
prefixIcon: Icon(Icons.category),
),
items: TypeEvenement.values.map((type) {
return DropdownMenuItem(
value: type,
child: Text(_getTypeLabel(type)),
);
}).toList(),
onChanged: (value) {
setState(() {
_selectedType = value!;
});
},
),
Builder(builder: (context) {
final scheme = Theme.of(context).colorScheme;
return DropdownButtonFormField<TypeEvenement>(
value: _selectedType,
isExpanded: true,
menuMaxHeight: 220,
dropdownColor: scheme.surface,
style: Theme.of(context).textTheme.bodyLarge?.copyWith(color: scheme.onSurface),
decoration: const InputDecoration(
labelText: 'Type d\'événement *',
border: OutlineInputBorder(),
prefixIcon: Icon(Icons.category),
),
items: TypeEvenement.values.map((type) {
return DropdownMenuItem(
value: type,
child: Text(_getTypeLabel(type), overflow: TextOverflow.ellipsis, style: TextStyle(color: scheme.onSurface)),
);
}).toList(),
onChanged: (value) {
setState(() {
_selectedType = value!;
});
},
);
}),
const SizedBox(height: 16),
// Dates
@@ -296,8 +305,8 @@ class _CreateEventDialogState extends State<CreateEventDialog> {
Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.grey[100],
border: Border(top: BorderSide(color: Colors.grey[300]!)),
color: Theme.of(context).colorScheme.surfaceContainerHighest,
border: Border(top: BorderSide(color: Theme.of(context).colorScheme.outline)),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
@@ -310,7 +319,7 @@ class _CreateEventDialogState extends State<CreateEventDialog> {
ElevatedButton(
onPressed: _submitForm,
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF3B82F6),
backgroundColor: ModuleColors.evenements,
foregroundColor: Colors.white,
),
child: const Text('Créer l\'événement'),
@@ -331,7 +340,7 @@ class _CreateEventDialogState extends State<CreateEventDialog> {
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: Color(0xFF3B82F6),
color: ModuleColors.evenements,
),
);
}