From 50d811eb69d978381ff604694c74f327db4c76ac Mon Sep 17 00:00:00 2001 From: kolo Date: Sat, 21 Mar 2026 00:41:55 +0300 Subject: [PATCH] update --- lib/features/add_transaction/screen.dart | 120 +++++++++++++---------- 1 file changed, 67 insertions(+), 53 deletions(-) diff --git a/lib/features/add_transaction/screen.dart b/lib/features/add_transaction/screen.dart index 70134ba..2641492 100644 --- a/lib/features/add_transaction/screen.dart +++ b/lib/features/add_transaction/screen.dart @@ -360,65 +360,79 @@ class _AddTransactionScreenState extends ConsumerState _SectionLabel('Date'), const SizedBox(height: 8), - GestureDetector( - onTap: _pickDate, - child: Container( - padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14), - decoration: BoxDecoration( - color: Theme.of(context).colorScheme.surface, - borderRadius: BorderRadius.circular(12), - border: isDark ? null : Border.all(color: const Color(0xFFCCCCDD), width: 1), - ), - child: Row( - children: [ - Icon( - Icons.calendar_today_rounded, - size: 18, - color: Theme.of(context).colorScheme.onSurface.withOpacity(0.6), - ), - const SizedBox(width: 10), - Text( - DateFormat('MMMM d, yyyy').format(_selectedDate), - style: Theme.of(context).textTheme.bodyMedium?.copyWith( - color: Theme.of(context).colorScheme.onSurface, - fontWeight: FontWeight.w500, + Row( + children: [ + // DATE column + Expanded( + child: GestureDetector( + onTap: _pickDate, + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14), + decoration: BoxDecoration( + color: Theme.of(context).colorScheme.surface, + borderRadius: BorderRadius.circular(12), + border: isDark + ? null + : Border.all(color: const Color(0xFFCCCCDD), width: 1), + ), + child: Row( + children: [ + Icon( + Icons.calendar_today_rounded, + size: 16, + color: Theme.of(context).colorScheme.onSurface.withOpacity(0.6), + ), + const SizedBox(width: 8), + Expanded( + child: Text( + DateFormat('MMM d, yyyy').format(_selectedDate), + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + color: Theme.of(context).colorScheme.onSurface, + fontWeight: FontWeight.w500, + ), + overflow: TextOverflow.ellipsis, + ), + ), + ], ), ), - ], + ), ), - ), - ), - const SizedBox(height: 12), - - _SectionLabel('Time'), - const SizedBox(height: 8), - GestureDetector( - onTap: _pickTime, - child: Container( - padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14), - decoration: BoxDecoration( - color: Theme.of(context).colorScheme.surface, - borderRadius: BorderRadius.circular(12), - border: isDark ? null : Border.all(color: const Color(0xFFCCCCDD), width: 1), - ), - child: Row( - children: [ - Icon( - Icons.access_time_rounded, - size: 18, - color: Theme.of(context).colorScheme.onSurface.withOpacity(0.6), - ), - const SizedBox(width: 10), - Text( - _selectedTime.format(context), - style: Theme.of(context).textTheme.bodyMedium?.copyWith( - color: Theme.of(context).colorScheme.onSurface, - fontWeight: FontWeight.w500, + const SizedBox(width: 12), + // TIME column + Expanded( + child: GestureDetector( + onTap: _pickTime, + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14), + decoration: BoxDecoration( + color: Theme.of(context).colorScheme.surface, + borderRadius: BorderRadius.circular(12), + border: isDark + ? null + : Border.all(color: const Color(0xFFCCCCDD), width: 1), + ), + child: Row( + children: [ + Icon( + Icons.access_time_rounded, + size: 16, + color: Theme.of(context).colorScheme.onSurface.withOpacity(0.6), + ), + const SizedBox(width: 8), + Text( + _selectedTime.format(context), + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + color: Theme.of(context).colorScheme.onSurface, + fontWeight: FontWeight.w500, + ), + ), + ], ), ), - ], + ), ), - ), + ], ), const SizedBox(height: 20),