This commit is contained in:
2026-03-20 17:16:22 +03:00
parent 2bba77bff2
commit 08d5077132
+8 -6
View File
@@ -64,14 +64,12 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
} }
void _scrollToSearch() { void _scrollToSearch() {
Future.delayed(const Duration(milliseconds: 300), () {
if (!_scrollController.hasClients) return; if (!_scrollController.hasClients) return;
_scrollController.animateTo( _scrollController.animateTo(
180.0, // approximate height of balance card — puts search bar at top 320.0,
duration: const Duration(milliseconds: 400), duration: const Duration(milliseconds: 300),
curve: Curves.easeInOut, curve: Curves.easeOut,
); );
});
} }
@override @override
@@ -141,11 +139,15 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
_BudgetProgress(spent: monthExpense, budget: budget, currencyInfo: currencyInfo), _BudgetProgress(spent: monthExpense, budget: budget, currencyInfo: currencyInfo),
], ],
const SizedBox(height: 24), const SizedBox(height: 24),
_SearchBar( GestureDetector(
onTap: _scrollToSearch,
behavior: HitTestBehavior.translucent,
child: _SearchBar(
controller: _searchController, controller: _searchController,
focusNode: _searchFocusNode, focusNode: _searchFocusNode,
ref: ref, ref: ref,
), ),
),
const SizedBox(height: 12), const SizedBox(height: 12),
_FilterChips(selected: filter, ref: ref), _FilterChips(selected: filter, ref: ref),
const SizedBox(height: 20), const SizedBox(height: 20),