diff --git a/lib/Pages/home_page.dart b/lib/Pages/home_page.dart index 87594b4..daff145 100644 --- a/lib/Pages/home_page.dart +++ b/lib/Pages/home_page.dart @@ -28,26 +28,7 @@ class _HomePageState extends State { titleSpacing: 0, title: Padding( padding: const EdgeInsets.symmetric(horizontal: 12), - child: DropdownSearch( - items: - (final String filter, final LoadProps? infiniteScrollProps) => - ['Konto 1', 'Konto 2', 'Konto 3', 'Konto 4'], - selectedItem: selected, - onChanged: (final String? value) => - setState(() => selected = value!), - popupProps: const PopupProps.menu( - showSearchBox: true, - searchFieldProps: TextFieldProps( - decoration: InputDecoration( - hintText: 'Suchen...', - contentPadding: EdgeInsets.symmetric( - horizontal: 12, - vertical: 8, - ), - ), - ), - ), - ), + child: _accountSelect(), ), ), @@ -64,11 +45,12 @@ class _HomePageState extends State { ), ), - bottomNavigationBar: _buildBottomNav(tabPage), + bottomNavigationBar: _bottomNav(tabPage), ); } - Widget _buildBottomNav(final TabPageState tabPage) => BottomNavigationBar( + Widget _bottomNav(final TabPageState tabPage) => + BottomNavigationBar( currentIndex: tabPage.index, onTap: tabPage.controller.animateTo, items: const [ @@ -80,4 +62,26 @@ class _HomePageState extends State { ), ], ); + + Widget _accountSelect() => + DropdownSearch( + items: + (final String filter, final LoadProps? infiniteScrollProps) => + ['Konto 1', 'Konto 2', 'Konto 3', 'Konto 4'], + selectedItem: selected, + onChanged: (final String? value) => + setState(() => selected = value!), + popupProps: const PopupProps.menu( + showSearchBox: true, + searchFieldProps: TextFieldProps( + decoration: InputDecoration( + hintText: 'Suchen...', + contentPadding: EdgeInsets.symmetric( + horizontal: 12, + vertical: 8, + ), + ), + ), + ), + ); }