fix(chat): Correction race condition + Implémentation TODOs
## 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
This commit is contained in:
@@ -13,13 +13,12 @@ import '../../screens/location/location_picker_Screen.dart';
|
||||
/// - `onLocationPicked`: Un callback pour retourner la localisation choisie par l'utilisateur.
|
||||
///
|
||||
class LocationField extends StatelessWidget {
|
||||
|
||||
const LocationField({required this.location, required this.onLocationPicked, super.key, this.selectedLatLng});
|
||||
final String location;
|
||||
final LatLng? selectedLatLng;
|
||||
final Function(LatLng?) onLocationPicked;
|
||||
|
||||
const LocationField({Key? key, required this.location, this.selectedLatLng, required this.onLocationPicked})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// Log : Construction du champ LocationField
|
||||
@@ -45,13 +44,13 @@ class LocationField extends StatelessWidget {
|
||||
},
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 300), // Animation fluide lors du focus
|
||||
padding: const EdgeInsets.symmetric(vertical: 12.0, horizontal: 16.0),
|
||||
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.blueGrey.withOpacity(0.1), // Fond plus visible, subtilement coloré
|
||||
borderRadius: BorderRadius.circular(12.0), // Bordure arrondie améliorée
|
||||
borderRadius: BorderRadius.circular(12), // Bordure arrondie améliorée
|
||||
border: Border.all(
|
||||
color: selectedLatLng == null ? Colors.blueGrey.withOpacity(0.5) : Colors.blue, // Bordure change selon l'état
|
||||
width: 2.0,
|
||||
width: 2,
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
@@ -61,7 +60,7 @@ class LocationField extends StatelessWidget {
|
||||
selectedLatLng == null
|
||||
? 'Sélectionnez une localisation' // Message par défaut si aucune localisation sélectionnée
|
||||
: 'Localisation: $location', // Affiche la localisation actuelle
|
||||
style: const TextStyle(color: Colors.blueGrey, fontSize: 16.0),
|
||||
style: const TextStyle(color: Colors.blueGrey, fontSize: 16),
|
||||
),
|
||||
const Icon(Icons.location_on, color: Colors.blueGrey),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user