Initial upload: fin65-mobile

This commit is contained in:
Abderrahim-Mouhcine
2026-08-16 19:59:55 +01:00
commit 46558a5ec8
242 changed files with 16334 additions and 0 deletions
@@ -0,0 +1,33 @@
# FIN65 - Fix local_auth minimal
Ce correctif répond à l'erreur :
```text
No named parameter with the name 'stickyAuth'
```
Ta version installée de `local_auth` accepte l'appel direct, mais pas `stickyAuth`.
Le script remplace l'appel par la version minimale :
```dart
return await _localAuth.authenticate(
localizedReason: 'Déverrouiller FIN65',
biometricOnly: true,
);
```
## Utilisation
Décompresse puis lance :
```powershell
.\fix_local_auth_minimal.bat
```
Ensuite :
```powershell
cd D:\07-Logiciels\20-FIN65\fin65_mobile
flutter run
```
@@ -0,0 +1,4 @@
@echo off
setlocal
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0fix_local_auth_minimal.bat.ps1"
@@ -0,0 +1,59 @@
$MobileDir = "D:\07-Logiciels\20-FIN65\fin65_mobile"
$SecurityService = Join-Path $MobileDir "lib\services\security_service.dart"
Write-Host ""
Write-Host "=========================================="
Write-Host " FIN65 - Fix local_auth minimal"
Write-Host "=========================================="
Write-Host ""
if (!(Test-Path $SecurityService)) {
Write-Host "[ERREUR] Fichier introuvable : $SecurityService" -ForegroundColor Red
Read-Host "Appuie sur Entree pour fermer"
exit 1
}
$Stamp = Get-Date -Format "yyyyMMdd_HHmmss"
Copy-Item $SecurityService "$SecurityService.before_local_auth_minimal_fix_$Stamp.bak" -Force
Write-Host "Sauvegarde : $SecurityService.before_local_auth_minimal_fix_$Stamp.bak"
$text = Get-Content $SecurityService -Raw
# Corrige l'appel local_auth vers la forme la plus compatible avec la version installee :
# pas de options:, pas de stickyAuth:, pas de useErrorDialogs:.
# On garde biometricOnly, que ta version semble accepter.
$pattern = "(?ms)return await _localAuth\.authenticate\(\s*localizedReason:\s*'Déverrouiller FIN65',.*?\);"
$replacement = @"
return await _localAuth.authenticate(
localizedReason: 'Déverrouiller FIN65',
biometricOnly: true,
);
"@
$newText = [regex]::Replace($text, $pattern, $replacement)
if ($newText -eq $text) {
Write-Host "[ATTENTION] Aucun bloc authenticate remplace. Affichage des lignes concernees :" -ForegroundColor Yellow
Select-String -Path $SecurityService -Pattern "authenticate|biometricOnly|stickyAuth|useErrorDialogs|AuthenticationOptions" | ForEach-Object { Write-Host $_.Line }
} else {
Set-Content -Path $SecurityService -Value $newText -Encoding UTF8
Write-Host "security_service.dart corrige."
}
Write-Host ""
Write-Host "Verification :"
Select-String -Path $SecurityService -Pattern "authenticate|biometricOnly|stickyAuth|useErrorDialogs|AuthenticationOptions" | ForEach-Object { Write-Host $_.Line }
Set-Location $MobileDir
Write-Host ""
Write-Host "Nettoyage Flutter..."
flutter clean
flutter pub get
Write-Host ""
Write-Host "Fix local_auth minimal termine."
Write-Host "Relance maintenant :"
Write-Host "flutter run"
Write-Host ""
Read-Host "Appuie sur Entree pour fermer"