This commit is contained in:
2026-03-20 17:16:22 +03:00
parent 2bba77bff2
commit 08d5077132
+14 -12
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( 320.0,
180.0, // approximate height of balance card — puts search bar at top duration: const Duration(milliseconds: 300),
duration: const Duration(milliseconds: 400), curve: Curves.easeOut,
curve: Curves.easeInOut, );
);
});
} }
@override @override
@@ -141,10 +139,14 @@ 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(
controller: _searchController, onTap: _scrollToSearch,
focusNode: _searchFocusNode, behavior: HitTestBehavior.translucent,
ref: ref, child: _SearchBar(
controller: _searchController,
focusNode: _searchFocusNode,
ref: ref,
),
), ),
const SizedBox(height: 12), const SizedBox(height: 12),
_FilterChips(selected: filter, ref: ref), _FilterChips(selected: filter, ref: ref),