From d36207bc548fd8cbca31ad8561759ff5d12878f6 Mon Sep 17 00:00:00 2001 From: Prince Date: Sat, 13 Jun 2026 00:05:47 +0200 Subject: [PATCH] minor home screen fixes --- lib/screens/home/home_screen.dart | 126 ++---------------------------- 1 file changed, 8 insertions(+), 118 deletions(-) diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index 6cc90eb..2103022 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -366,128 +366,18 @@ class _HomeScreenState extends State with TickerProviderStateMixin { children: [ if (!_isLoggedIn) _buildLoginPrompt(theme, isDark), if (_isLoggedIn) const AccountBalanceWidget(), - const SizedBox(height: 16), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ _buildSectionLabel(theme, isDark, Icons.grid_view_rounded, "Pay"), - Row( - mainAxisSize: MainAxisSize.min, - children: [ - Container( - padding: const EdgeInsets.symmetric( - horizontal: 8, - vertical: 2, - ), - decoration: BoxDecoration( - color: isDark ? const Color(0xFF1E1E1E) : Colors.white, - borderRadius: BorderRadius.circular(20), - border: Border.all( - color: isDark - ? Colors.white.withValues(alpha: 0.12) - : Colors.black.withValues(alpha: 0.08), - ), - ), - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - 'USD', - style: TextStyle( - fontSize: 11, - fontWeight: FontWeight.w600, - color: !_isZWGSelected - ? theme.colorScheme.primary - : isDark - ? Colors.white54 - : Colors.black45, - ), - ), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 4), - child: GestureDetector( - onTap: () { - setState(() { - _isZWGSelected = !_isZWGSelected; - }); - if (_isZWGSelected) { - AppSnackBar.show( - context, - 'ZWG currency not supported yet', - customContent: const Center( - child: Text('ZWG currency not supported yet'), - ), - backgroundColor: theme.colorScheme.primary, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(12), - ), - duration: const Duration(seconds: 3), - ); - } - - Future.delayed( - const Duration(milliseconds: 1000), - () { - setState(() { - _isZWGSelected = !_isZWGSelected; - }); - }, - ); - }, - child: AnimatedContainer( - duration: const Duration(milliseconds: 200), - width: 32, - height: 18, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: _isZWGSelected - ? theme.colorScheme.primary - : Colors.grey.shade300, - ), - child: AnimatedAlign( - duration: const Duration(milliseconds: 200), - alignment: _isZWGSelected - ? Alignment.centerRight - : Alignment.centerLeft, - child: Container( - width: 14, - height: 14, - margin: const EdgeInsets.all(2), - decoration: const BoxDecoration( - color: Colors.white, - shape: BoxShape.circle, - ), - ), - ), - ), - ), - ), - Text( - 'ZWG', - style: TextStyle( - fontSize: 11, - fontWeight: FontWeight.w600, - color: _isZWGSelected - ? theme.colorScheme.primary - : isDark - ? Colors.white54 - : Colors.black45, - ), - ), - ], - ), - ), - const SizedBox(width: 4), - IconButton( - icon: Icon( - Icons.refresh_rounded, - color: isDark ? Colors.white54 : Colors.black54, - size: 20, - ), - onPressed: _onRefresh, - tooltip: 'Refresh', - ), - ], + IconButton( + icon: Icon( + Icons.refresh_rounded, + color: isDark ? Colors.white54 : Colors.black54, + size: 20, + ), + onPressed: _onRefresh, + tooltip: 'Refresh', ), ], ),