call clear funktion everywhere where it is useful, moved add button from home to user defined list (helpful for using the clearSelectedItems function)

This commit is contained in:
2023-05-15 11:24:20 +02:00
parent 3a50d7f1bc
commit 7062aef03b
2 changed files with 45 additions and 39 deletions
-13
View File
@@ -58,19 +58,6 @@ class _MyHomePageState extends State<MyHomePage> {
body: Center(
child: widgetOptions.elementAt(_selectedIndex),
),
floatingActionButton: _selectedIndex == 3 // Wenn der ausgewählte Index 3 ist, also auf dem Profil-Widget
? null // Zeigt keinen Button an
: FloatingActionButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddScreen(initialIndex: _selectedIndex)),
);
},
tooltip: "Add",
child: const Icon(Icons.add),
),
bottomNavigationBar: BottomNavigationBar(
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(