## Corrections Critiques ### Race Condition - Statuts de Messages - Fix : Les icônes de statut (✓, ✓✓, ✓✓ bleu) ne s'affichaient pas - Cause : WebSocket delivery confirmations arrivaient avant messages locaux - Solution : Pattern Optimistic UI dans chat_bloc.dart - Création message temporaire immédiate - Ajout à la liste AVANT requête HTTP - Remplacement par message serveur à la réponse - Fichier : lib/presentation/state_management/chat_bloc.dart ## Implémentation TODOs (13/21) ### Social (social_header_widget.dart) - ✅ Copier lien du post dans presse-papiers - ✅ Partage natif via Share.share() - ✅ Dialogue de signalement avec 5 raisons ### Partage (share_post_dialog.dart) - ✅ Interface sélection d'amis avec checkboxes - ✅ Partage externe via Share API ### Média (media_upload_service.dart) - ✅ Parsing JSON réponse backend - ✅ Méthode deleteMedia() pour suppression - ✅ Génération miniature vidéo ### Posts (create_post_dialog.dart, edit_post_dialog.dart) - ✅ Extraction URL depuis uploads - ✅ Documentation chargement médias ### Chat (conversations_screen.dart) - ✅ Navigation vers notifications - ✅ ConversationSearchDelegate pour recherche ## Nouveaux Fichiers ### Configuration - build-prod.ps1 : Script build production avec dart-define - lib/core/constants/env_config.dart : Gestion environnements ### Documentation - TODOS_IMPLEMENTED.md : Documentation complète TODOs ## Améliorations ### Architecture - Refactoring injection de dépendances - Amélioration routing et navigation - Optimisation providers (UserProvider, FriendsProvider) ### UI/UX - Amélioration thème et couleurs - Optimisation animations - Meilleure gestion erreurs ### Services - Configuration API avec env_config - Amélioration datasources (events, users) - Optimisation modèles de données
108 lines
3.4 KiB
Dart
108 lines
3.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
import '../../../../core/constants/colors.dart';
|
|
|
|
/// [SupportSectionCard] affiche les options de support et assistance.
|
|
/// Inclut des animations, du retour haptique, et des logs détaillés pour chaque action.
|
|
class SupportSectionCard extends StatelessWidget {
|
|
const SupportSectionCard({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
debugPrint('[LOG] Initialisation de SupportSectionCard.');
|
|
|
|
return Card(
|
|
color: AppColors.cardColor.withOpacity(0.95),
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
|
elevation: 6,
|
|
shadowColor: AppColors.darkPrimary.withOpacity(0.4),
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 20),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
const Text(
|
|
'Support et Assistance',
|
|
style: TextStyle(
|
|
fontSize: 22,
|
|
fontWeight: FontWeight.bold,
|
|
color: Colors.white,
|
|
letterSpacing: 1.1,
|
|
),
|
|
),
|
|
const SizedBox(height: 10),
|
|
_buildOption(
|
|
context,
|
|
icon: Icons.help_outline,
|
|
label: 'Support et Assistance',
|
|
logMessage: 'Accès au Support et Assistance.',
|
|
),
|
|
_buildDivider(),
|
|
_buildOption(
|
|
context,
|
|
icon: Icons.article_outlined,
|
|
label: 'Conditions d\'utilisation',
|
|
logMessage: "Accès aux conditions d'utilisation.",
|
|
),
|
|
_buildDivider(),
|
|
_buildOption(
|
|
context,
|
|
icon: Icons.privacy_tip_outlined,
|
|
label: 'Politique de confidentialité',
|
|
logMessage: 'Accès à la politique de confidentialité.',
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
/// Construit chaque option de support avec une animation de feedback visuel.
|
|
Widget _buildOption(
|
|
BuildContext context, {
|
|
required IconData icon,
|
|
required String label,
|
|
required String logMessage,
|
|
}) {
|
|
return InkWell(
|
|
onTap: () {
|
|
HapticFeedback.lightImpact(); // Retour haptique léger
|
|
debugPrint('[LOG] $logMessage');
|
|
// Ajout de la navigation ou de l'action ici.
|
|
},
|
|
splashColor: AppColors.accentColor.withOpacity(0.3),
|
|
highlightColor: AppColors.cardColor.withOpacity(0.1),
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(vertical: 12),
|
|
child: Row(
|
|
children: [
|
|
Icon(icon, color: AppColors.accentColor, size: 28),
|
|
const SizedBox(width: 15),
|
|
Expanded(
|
|
child: Text(
|
|
label,
|
|
style: const TextStyle(
|
|
color: Colors.white,
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
),
|
|
),
|
|
const Icon(Icons.chevron_right, color: Colors.white70),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
/// Construit un séparateur entre les options pour une meilleure structure visuelle.
|
|
Widget _buildDivider() {
|
|
return Divider(
|
|
color: Colors.white.withOpacity(0.2),
|
|
height: 1,
|
|
indent: 16,
|
|
endIndent: 16,
|
|
);
|
|
}
|
|
}
|