OHO-26(Exam Break)

This commit is contained in:
lokeshramchand-ctrl 2025-08-28 14:15:12 +05:30
parent 394da30b82
commit 999c8f135f

View file

@ -161,7 +161,7 @@ class _EmailTransactionDialogState extends State<EmailTransactionDialog>
setState(() { setState(() {
_loading = false; _loading = false;
_syncedCount = data['count']; _syncedCount = data['count'];
_status = "✅ Synced $_syncedCount transactions successfully!"; _status = "Synced";
}); });
_rotationController.stop(); _rotationController.stop();
@ -173,21 +173,21 @@ class _EmailTransactionDialogState extends State<EmailTransactionDialog>
} else { } else {
setState(() { setState(() {
_loading = false; _loading = false;
_status = "❌ Sync failed: Unexpected response format"; _status = " Sync failed: Unexpected response format";
}); });
_rotationController.stop(); _rotationController.stop();
} }
} else { } else {
setState(() { setState(() {
_loading = false; _loading = false;
_status = "❌ Backend error: ${response.body}"; _status = "Backend error: ${response.body}";
}); });
_rotationController.stop(); _rotationController.stop();
} }
} catch (error) { } catch (error) {
setState(() { setState(() {
_loading = false; _loading = false;
_status = "⚠️ Network or unexpected error: $error"; _status = "Network error: $error";
}); });
_rotationController.stop(); _rotationController.stop();
} }
@ -509,11 +509,7 @@ class _EmailTransactionDialogState extends State<EmailTransactionDialog>
), ),
), ),
child: Icon( child: Icon(
isSuccess Icons.check_circle_rounded,
? Icons.check_circle_rounded
: isError
? Icons.error_rounded
: Icons.info_rounded,
color: color:
isSuccess isSuccess
? Colors.green ? Colors.green
@ -579,14 +575,9 @@ class _EmailTransactionDialogState extends State<EmailTransactionDialog>
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Icon(
Icons.refresh_rounded,
color: Colors.white,
size: context.responsiveWidth(20),
),
SizedBox(width: context.responsiveWidth(8)), SizedBox(width: context.responsiveWidth(8)),
Text( Text(
"Retry Sync", "Update",
style: GoogleFonts.inter( style: GoogleFonts.inter(
color: Colors.white, color: Colors.white,
fontSize: context.responsiveText(14), fontSize: context.responsiveText(14),