This commit is contained in:
2026-03-21 00:45:32 +03:00
parent 50d811eb69
commit c827f6e475
+31 -4
View File
@@ -163,6 +163,8 @@ class _AddTransactionScreenState extends ConsumerState<AddTransactionScreen>
} }
Future<void> _pickDate() async { Future<void> _pickDate() async {
// Note: Using showDatePicker (system bottom sheet) which cannot be resized from Flutter.
// The calendar height is controlled by the system and varies by platform.
final picked = await showDatePicker( final picked = await showDatePicker(
context: context, context: context,
initialDate: _selectedDate, initialDate: _selectedDate,
@@ -358,13 +360,23 @@ class _AddTransactionScreenState extends ConsumerState<AddTransactionScreen>
), ),
const SizedBox(height: 20), const SizedBox(height: 20),
_SectionLabel('Date'),
const SizedBox(height: 8),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// DATE column // DATE column
Expanded( Expanded(
child: GestureDetector( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Date',
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.6),
fontWeight: FontWeight.w500,
),
),
const SizedBox(height: 6),
GestureDetector(
onTap: _pickDate, onTap: _pickDate,
child: Container( child: Container(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14), padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
@@ -397,11 +409,24 @@ class _AddTransactionScreenState extends ConsumerState<AddTransactionScreen>
), ),
), ),
), ),
],
),
), ),
const SizedBox(width: 12), const SizedBox(width: 12),
// TIME column // TIME column
Expanded( Expanded(
child: GestureDetector( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Time',
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.6),
fontWeight: FontWeight.w500,
),
),
const SizedBox(height: 6),
GestureDetector(
onTap: _pickTime, onTap: _pickTime,
child: Container( child: Container(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14), padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
@@ -431,6 +456,8 @@ class _AddTransactionScreenState extends ConsumerState<AddTransactionScreen>
), ),
), ),
), ),
],
),
), ),
], ],
), ),