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() {
Future.delayed(const Duration(milliseconds: 300), () {
if (!_scrollController.hasClients) return;
_scrollController.animateTo(
180.0, // approximate height of balance card — puts search bar at top
duration: const Duration(milliseconds: 400),
curve: Curves.easeInOut,
320.0,
duration: const Duration(milliseconds: 300),
curve: Curves.easeOut,
);
});
}
@override
@@ -141,11 +139,15 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
_BudgetProgress(spent: monthExpense, budget: budget, currencyInfo: currencyInfo),
],
const SizedBox(height: 24),
_SearchBar(
GestureDetector(
onTap: _scrollToSearch,
behavior: HitTestBehavior.translucent,
child: _SearchBar(
controller: _searchController,
focusNode: _searchFocusNode,
ref: ref,
),
),
const SizedBox(height: 12),
_FilterChips(selected: filter, ref: ref),
const SizedBox(height: 20),