This commit is contained in:
2026-05-09 11:03:12 +02:00
parent 45d49b38f7
commit fbb21dd8a4

View File

@@ -27,6 +27,7 @@ class _SharedMobileUploadScreenState extends State<SharedMobileUploadScreen> {
// 2. STATO DI CARICAMENTO GLOBALE // 2. STATO DI CARICAMENTO GLOBALE
bool _isUploading = false; bool _isUploading = false;
bool _isProcessingLocal = false;
// Funzione magica per capire se è un'immagine o un PDF dall'estensione // Funzione magica per capire se è un'immagine o un PDF dall'estensione
bool _isImage(String path) { bool _isImage(String path) {
@@ -242,11 +243,10 @@ class _SharedMobileUploadScreenState extends State<SharedMobileUploadScreen> {
), ),
// --- OVERLAY DI CARICAMENTO --- // --- OVERLAY DI CARICAMENTO ---
if (_isUploading) if (_isUploading || _isProcessingLocal)
Container( Container(
// Usa il metodo non deprecato che hai giustamente suggerito!
color: Colors.black.withValues(alpha: 0.5), color: Colors.black.withValues(alpha: 0.5),
child: const Center( child: Center(
child: Card( child: Card(
child: Padding( child: Padding(
padding: EdgeInsets.all(24.0), padding: EdgeInsets.all(24.0),
@@ -256,7 +256,9 @@ class _SharedMobileUploadScreenState extends State<SharedMobileUploadScreen> {
CircularProgressIndicator(), CircularProgressIndicator(),
SizedBox(height: 16), SizedBox(height: 16),
Text( Text(
"Caricamento in corso...", _isUploading
? "Invio in corso..."
: "Elaborazione foto...",
style: TextStyle(fontWeight: FontWeight.bold), style: TextStyle(fontWeight: FontWeight.bold),
), ),
], ],