feat: integración real API-SIGMA-WEBCONTROL — login cloud con fallback offline

Flujo: POST /api/auth/empresas → POST /api/auth/login → JWT + apiKey + db_tenant.
Si la API no responde, cae silenciosamente a credenciales locales SQLite.
AuthException (credenciales incorrectas) se muestra al usuario sin fallback.
Perfil muestra badge "SIGMAC Cloud" / "Modo offline" según el modo de sesión.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Pablinux
2026-06-14 09:28:47 -05:00
co-authored by Claude Sonnet 4.6
parent 212d0bc8f2
commit 40c6f71caa
5 changed files with 281 additions and 15 deletions
+1
View File
@@ -16,6 +16,7 @@ dependencies:
sqflite_common_ffi: ^2.1.0
path: ^1.8.1
mobile_scanner: ^0.2.0
http: ^0.13.0
dev_dependencies:
flutter_test: