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:
99
build-prod.ps1
Normal file
99
build-prod.ps1
Normal file
@@ -0,0 +1,99 @@
|
||||
# ====================================================================
|
||||
# Script de build Production pour AfterWork
|
||||
# ====================================================================
|
||||
# Ce script compile l'application Flutter pour la production
|
||||
# avec les variables d'environnement appropriées.
|
||||
# ====================================================================
|
||||
|
||||
param(
|
||||
[ValidateSet("apk", "appbundle", "ios", "web")]
|
||||
[string]$Target = "apk",
|
||||
|
||||
[string]$ApiUrl = "https://api.lions.dev/afterwork",
|
||||
|
||||
[ValidateSet("development", "staging", "production")]
|
||||
[string]$Environment = "production"
|
||||
)
|
||||
|
||||
Write-Host "=====================================================================" -ForegroundColor Cyan
|
||||
Write-Host " AfterWork - Build Production" -ForegroundColor Cyan
|
||||
Write-Host "=====================================================================" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
Write-Host "Configuration:" -ForegroundColor Yellow
|
||||
Write-Host " - Target: $Target" -ForegroundColor White
|
||||
Write-Host " - API URL: $ApiUrl" -ForegroundColor White
|
||||
Write-Host " - Environment: $Environment" -ForegroundColor White
|
||||
Write-Host ""
|
||||
|
||||
# Nettoyage
|
||||
Write-Host "[1/4] Nettoyage..." -ForegroundColor Green
|
||||
flutter clean
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Erreur lors du nettoyage" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Récupération des dépendances
|
||||
Write-Host "[2/4] Récupération des dépendances..." -ForegroundColor Green
|
||||
flutter pub get
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Erreur lors de la récupération des dépendances" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Build
|
||||
Write-Host "[3/4] Build $Target..." -ForegroundColor Green
|
||||
|
||||
$dartDefines = @(
|
||||
"API_BASE_URL=$ApiUrl",
|
||||
"ENVIRONMENT=$Environment",
|
||||
"DEBUG_MODE=false"
|
||||
)
|
||||
|
||||
$dartDefineArg = $dartDefines | ForEach-Object { "--dart-define=$_" }
|
||||
|
||||
switch ($Target) {
|
||||
"apk" {
|
||||
flutter build apk --release @dartDefineArg --split-per-abi
|
||||
}
|
||||
"appbundle" {
|
||||
flutter build appbundle --release @dartDefineArg
|
||||
}
|
||||
"ios" {
|
||||
flutter build ios --release @dartDefineArg
|
||||
}
|
||||
"web" {
|
||||
flutter build web --release @dartDefineArg
|
||||
}
|
||||
}
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Erreur lors du build" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Résumé
|
||||
Write-Host ""
|
||||
Write-Host "[4/4] Build terminé avec succès !" -ForegroundColor Green
|
||||
Write-Host ""
|
||||
Write-Host "Artefacts générés:" -ForegroundColor Yellow
|
||||
|
||||
switch ($Target) {
|
||||
"apk" {
|
||||
Write-Host " - build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk" -ForegroundColor White
|
||||
Write-Host " - build/app/outputs/flutter-apk/app-arm64-v8a-release.apk" -ForegroundColor White
|
||||
Write-Host " - build/app/outputs/flutter-apk/app-x86_64-release.apk" -ForegroundColor White
|
||||
}
|
||||
"appbundle" {
|
||||
Write-Host " - build/app/outputs/bundle/release/app-release.aab" -ForegroundColor White
|
||||
}
|
||||
"ios" {
|
||||
Write-Host " - build/ios/ipa/afterwork.ipa" -ForegroundColor White
|
||||
}
|
||||
"web" {
|
||||
Write-Host " - build/web/" -ForegroundColor White
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "=====================================================================" -ForegroundColor Cyan
|
||||
Reference in New Issue
Block a user