feat: Mise à jour des interfaces mobiles v3.2.3

- Amélioration des interfaces utilisateur sur mobile
- Optimisation de la responsivité des composants Flutter
- Mise à jour des widgets de chat et communication
- Amélioration des formulaires et tableaux
- Ajout de nouveaux composants pour l'administration
- Optimisation des thèmes et styles visuels

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-02 20:35:40 +02:00
parent 4153f73ace
commit f7baa7492c
106 changed files with 88501 additions and 88280 deletions

View File

@@ -30,7 +30,7 @@ class DotsPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
final paint = Paint()
..color = Colors.white.withOpacity(0.5)
..color = Colors.white.withValues(alpha: 0.5)
..style = PaintingStyle.fill;
final random = math.Random(42); // Seed fixe pour consistance
@@ -331,7 +331,6 @@ class _LoginPageState extends State<LoginPage> {
// Utiliser l'instance globale de userRepository
final theme = Theme.of(context);
final size = MediaQuery.of(context).size;
// Les permissions sont maintenant gérées dans splash_page
// On n'a plus besoin de ces vérifications ici
@@ -432,8 +431,8 @@ class _LoginPageState extends State<LoginPage> {
child: Card(
elevation: 8,
shadowColor: _loginType == 'user'
? Colors.green.withOpacity(0.5)
: Colors.red.withOpacity(0.5),
? Colors.green.withValues(alpha: 0.5)
: Colors.red.withValues(alpha: 0.5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16.0)),
child: Padding(
@@ -474,7 +473,7 @@ class _LoginPageState extends State<LoginPage> {
'Bienvenue sur GEOSECTOR',
style: theme.textTheme.bodyLarge?.copyWith(
color:
theme.colorScheme.onSurface.withOpacity(0.7),
theme.colorScheme.onSurface.withValues(alpha: 0.7),
),
textAlign: TextAlign.center,
),
@@ -489,11 +488,11 @@ class _LoginPageState extends State<LoginPage> {
margin: const EdgeInsets.only(top: 16),
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: theme.colorScheme.error.withOpacity(0.1),
color: theme.colorScheme.error.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(12),
border: Border.all(
color:
theme.colorScheme.error.withOpacity(0.3),
theme.colorScheme.error.withValues(alpha: 0.3),
),
),
child: Column(
@@ -729,6 +728,7 @@ class _LoginPageState extends State<LoginPage> {
'Login: Tentative avec type: $_loginType');
// Utiliser le nouveau spinner moderne pour la connexion
if (!mounted) return;
final success = await userRepository
.loginWithSpinner(
context,
@@ -888,17 +888,17 @@ class _LoginPageState extends State<LoginPage> {
vertical: 6,
),
decoration: BoxDecoration(
color: theme.colorScheme.primary.withOpacity(0.1),
color: theme.colorScheme.primary.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: theme.colorScheme.primary.withOpacity(0.3),
color: theme.colorScheme.primary.withValues(alpha: 0.3),
width: 1,
),
),
child: Text(
'v$_appVersion',
style: theme.textTheme.bodySmall?.copyWith(
color: theme.colorScheme.primary.withOpacity(0.8),
color: theme.colorScheme.primary.withValues(alpha: 0.8),
fontSize: 12,
fontWeight: FontWeight.w500,
),

View File

@@ -28,7 +28,7 @@ class DotsPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
final paint = Paint()
..color = Colors.white.withOpacity(0.5)
..color = Colors.white.withValues(alpha: 0.5)
..style = PaintingStyle.fill;
final random = math.Random(42); // Seed fixe pour consistance
@@ -279,7 +279,6 @@ class _RegisterPageState extends State<RegisterPage> {
Widget build(BuildContext context) {
// Utiliser l'instance globale de userRepository définie dans app.dart
final theme = Theme.of(context);
final size = MediaQuery.of(context).size;
return Scaffold(
body: Stack(
@@ -328,7 +327,7 @@ class _RegisterPageState extends State<RegisterPage> {
Text(
'Enregistrez votre amicale sur GeoSector',
style: theme.textTheme.bodyLarge?.copyWith(
color: theme.colorScheme.onSurface.withOpacity(0.7),
color: theme.colorScheme.onSurface.withValues(alpha: 0.7),
),
textAlign: TextAlign.center,
),
@@ -353,10 +352,10 @@ class _RegisterPageState extends State<RegisterPage> {
margin: const EdgeInsets.only(top: 16),
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: theme.colorScheme.error.withOpacity(0.1),
color: theme.colorScheme.error.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: theme.colorScheme.error.withOpacity(0.3),
color: theme.colorScheme.error.withValues(alpha: 0.3),
),
),
child: Column(
@@ -385,7 +384,7 @@ class _RegisterPageState extends State<RegisterPage> {
ElevatedButton.icon(
onPressed: () async {
await _checkConnectivity();
if (_isConnected && mounted) {
if (_isConnected && context.mounted) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
@@ -521,7 +520,7 @@ class _RegisterPageState extends State<RegisterPage> {
color: const Color(0xFFECEFF1),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.05),
color: Colors.black.withValues(alpha: 0.05),
blurRadius: 4,
offset: const Offset(0, 2),
),
@@ -536,7 +535,7 @@ class _RegisterPageState extends State<RegisterPage> {
),
)
: DropdownButtonFormField<City>(
value: _selectedCity,
initialValue: _selectedCity,
decoration: InputDecoration(
prefixIcon: Icon(
Icons.location_city_outlined,
@@ -668,7 +667,7 @@ class _RegisterPageState extends State<RegisterPage> {
.checkConnectivity();
if (!connectivityService.isConnected) {
if (mounted) {
if (context.mounted) {
ScaffoldMessenger.of(context)
.showSnackBar(
SnackBar(
@@ -685,7 +684,7 @@ class _RegisterPageState extends State<RegisterPage> {
.checkConnectivity();
if (connectivityService
.isConnected &&
mounted) {
context.mounted) {
ScaffoldMessenger.of(
context)
.showSnackBar(
@@ -709,6 +708,7 @@ class _RegisterPageState extends State<RegisterPage> {
_captchaController.text);
if (captchaAnswer !=
_captchaNum1 + _captchaNum2) {
if (!context.mounted) return;
ScaffoldMessenger.of(context)
.showSnackBar(
const SnackBar(
@@ -783,7 +783,7 @@ class _RegisterPageState extends State<RegisterPage> {
: 'Échec de l\'inscription. Veuillez réessayer.');
if (isSuccess) {
if (mounted) {
if (context.mounted) {
// Afficher une boîte de dialogue de succès
showDialog(
context: context,
@@ -879,8 +879,7 @@ class _RegisterPageState extends State<RegisterPage> {
color: theme
.colorScheme
.onSurface
.withOpacity(
0.7),
.withValues(alpha: 0.7),
),
),
],
@@ -917,7 +916,7 @@ class _RegisterPageState extends State<RegisterPage> {
}
} else {
// Afficher le message d'erreur retourné par l'API
if (mounted) {
if (context.mounted) {
// Afficher un message d'erreur plus visible
showDialog(
context: context,
@@ -943,18 +942,20 @@ class _RegisterPageState extends State<RegisterPage> {
);
// Afficher également un SnackBar
ScaffoldMessenger.of(context)
if (context.mounted) {
ScaffoldMessenger.of(context)
.showSnackBar(
SnackBar(
content: Text(message),
backgroundColor: Colors.red,
),
);
}
}
}
} else {
// Gérer les erreurs HTTP
if (mounted) {
if (context.mounted) {
ScaffoldMessenger.of(context)
.showSnackBar(
SnackBar(
@@ -972,7 +973,7 @@ class _RegisterPageState extends State<RegisterPage> {
});
// Gérer les exceptions
if (mounted) {
if (context.mounted) {
ScaffoldMessenger.of(context)
.showSnackBar(
SnackBar(
@@ -1078,17 +1079,17 @@ class _RegisterPageState extends State<RegisterPage> {
vertical: 4,
),
decoration: BoxDecoration(
color: theme.colorScheme.primary.withOpacity(0.1),
color: theme.colorScheme.primary.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: theme.colorScheme.primary.withOpacity(0.3),
color: theme.colorScheme.primary.withValues(alpha: 0.3),
width: 1,
),
),
child: Text(
'v$_appVersion',
style: theme.textTheme.bodySmall?.copyWith(
color: theme.colorScheme.primary.withOpacity(0.8),
color: theme.colorScheme.primary.withValues(alpha: 0.8),
fontSize: 10,
fontWeight: FontWeight.w500,
),

View File

@@ -11,8 +11,8 @@ import 'package:flutter/foundation.dart' show kIsWeb;
import 'package:package_info_plus/package_info_plus.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:shared_preferences/shared_preferences.dart';
// ignore: avoid_web_libraries_in_flutter
import 'dart:html' as html if (dart.library.io) '';
// Import conditionnel pour le web
import 'package:universal_html/html.dart' as html;
class SplashPage extends StatefulWidget {
/// Action à effectuer après l'initialisation (login ou register)
@@ -32,7 +32,7 @@ class DotsPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
final paint = Paint()
..color = Colors.white.withOpacity(0.5)
..color = Colors.white.withValues(alpha: 0.5)
..style = PaintingStyle.fill;
final random = math.Random(42); // Seed fixe pour consistance
@@ -521,6 +521,8 @@ class _SplashPageState extends State<SplashPage> with SingleTickerProviderStateM
await Future.delayed(const Duration(milliseconds: 200));
if (!context.mounted) return;
switch (action) {
case 'login':
if (type == 'admin') {
@@ -617,7 +619,7 @@ class _SplashPageState extends State<SplashPage> with SingleTickerProviderStateM
'Une application puissante et intuitive de gestion de vos distributions de calendriers',
textAlign: TextAlign.center,
style: theme.textTheme.bodyLarge?.copyWith(
color: theme.colorScheme.onSurface.withOpacity(0.7),
color: theme.colorScheme.onSurface.withValues(alpha: 0.7),
fontWeight: FontWeight.w500,
),
),
@@ -637,7 +639,7 @@ class _SplashPageState extends State<SplashPage> with SingleTickerProviderStateM
borderRadius: BorderRadius.circular(10),
boxShadow: [
BoxShadow(
color: theme.colorScheme.primary.withOpacity(0.2),
color: theme.colorScheme.primary.withValues(alpha: 0.2),
blurRadius: 8,
offset: const Offset(0, 2),
),
@@ -652,7 +654,7 @@ class _SplashPageState extends State<SplashPage> with SingleTickerProviderStateM
builder: (context, value, child) {
return LinearProgressIndicator(
value: value,
backgroundColor: Colors.grey.withOpacity(0.15),
backgroundColor: Colors.grey.withValues(alpha: 0.15),
valueColor: AlwaysStoppedAnimation<Color>(
theme.colorScheme.primary,
),
@@ -682,7 +684,7 @@ class _SplashPageState extends State<SplashPage> with SingleTickerProviderStateM
_statusMessage,
key: ValueKey(_statusMessage),
style: theme.textTheme.bodyMedium?.copyWith(
color: theme.colorScheme.onSurface.withOpacity(0.7),
color: theme.colorScheme.onSurface.withValues(alpha: 0.7),
fontWeight: FontWeight.w500,
),
textAlign: TextAlign.center,
@@ -984,7 +986,7 @@ class _SplashPageState extends State<SplashPage> with SingleTickerProviderStateM
vertical: 4,
),
decoration: BoxDecoration(
color: theme.colorScheme.primary.withOpacity(0.1),
color: theme.colorScheme.primary.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: theme.colorScheme.primary,