diff --git a/lib/Pages/Settings/settings.dart b/lib/Pages/Settings/settings.dart index b5e4e96..e48d6bd 100644 --- a/lib/Pages/Settings/settings.dart +++ b/lib/Pages/Settings/settings.dart @@ -191,7 +191,7 @@ class _SettingsState extends State { ); Widget _versionNumber(final ThemeData theme) => Align( - alignment: Alignment.bottomRight, + alignment: Alignment.bottomLeft, child: Text( 'Version 0.0.0+0', style: theme.textTheme.bodySmall?.copyWith( diff --git a/lib/Pages/home_page.dart b/lib/Pages/home_page.dart index daff145..62d413c 100644 --- a/lib/Pages/home_page.dart +++ b/lib/Pages/home_page.dart @@ -1,5 +1,6 @@ import 'package:dropdown_search/dropdown_search.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_expandable_fab/flutter_expandable_fab.dart'; import 'package:routemaster/routemaster.dart'; /// Eine Seite, die als Container für die verschiedenen Tabs der App dient. @@ -46,11 +47,13 @@ class _HomePageState extends State { ), bottomNavigationBar: _bottomNav(tabPage), + + floatingActionButtonLocation: ExpandableFab.location, + floatingActionButton: _floatingActionButton(), ); } - Widget _bottomNav(final TabPageState tabPage) => - BottomNavigationBar( + Widget _bottomNav(final TabPageState tabPage) => BottomNavigationBar( currentIndex: tabPage.index, onTap: tabPage.controller.animateTo, items: const [ @@ -63,25 +66,52 @@ class _HomePageState extends State { ], ); - Widget _accountSelect() => - DropdownSearch( - items: - (final String filter, final LoadProps? infiniteScrollProps) => + 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, - ), - ), - ), + 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), ), - ); + ), + ), + ); + + Widget _floatingActionButton() => ExpandableFab( + openButtonBuilder: RotateFloatingActionButtonBuilder( + child: const Icon(Icons.add), + ), + type: ExpandableFabType.up, + childrenAnimation: ExpandableFabAnimation.none, + distance: 70, + children: const [ + Row( + children: [ + Text('Neue Transaktion'), + SizedBox(width: 20), + FloatingActionButton.small( + heroTag: null, + onPressed: null, + child: Icon(Icons.add), + ), + ], + ), + Row( + children: [ + Text('Neues Konto'), + SizedBox(width: 20), + FloatingActionButton.small( + heroTag: null, + onPressed: null, + child: Icon(Icons.account_balance_wallet), + ), + ], + ), + ], + ); }