From 8c4c436241ba83a967b03bd56b5eb8ba443328ad Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Sat, 7 Dec 2024 17:10:02 +0100 Subject: [PATCH] add floating button --- covas_mobile/lib/pages/ItemMenu.dart | 40 +++++++++++++++++----------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/covas_mobile/lib/pages/ItemMenu.dart b/covas_mobile/lib/pages/ItemMenu.dart index e991885..be0c762 100644 --- a/covas_mobile/lib/pages/ItemMenu.dart +++ b/covas_mobile/lib/pages/ItemMenu.dart @@ -194,21 +194,21 @@ class _ItemMenuState extends State with ShowErrorDialog { // fast, so that you can just rebuild anything that needs updating rather // than having to individually change instances of widgets. return Scaffold( - appBar: AppBar( - // Here we take the value from the MyHomePage object that was created by - // the App.build method, and use it to set our appbar title. - title: Text("${eventName}", overflow: TextOverflow.ellipsis), - backgroundColor: Colors.blue, - foregroundColor: Colors.white, - leading: IconButton( - icon: Icon(Icons.arrow_back), - onPressed: () { - Navigator.push( - context, MaterialPageRoute(builder: (_) => ListItemMenu())); - }, - )), - body: SingleChildScrollView( - child: Column( + appBar: AppBar( + // Here we take the value from the MyHomePage object that was created by + // the App.build method, and use it to set our appbar title. + title: Text("${eventName}", overflow: TextOverflow.ellipsis), + backgroundColor: Colors.blue, + foregroundColor: Colors.white, + leading: IconButton( + icon: Icon(Icons.arrow_back), + onPressed: () { + Navigator.push( + context, MaterialPageRoute(builder: (_) => ListItemMenu())); + }, + )), + body: SingleChildScrollView( + child: Column( children: [ Padding( padding: const EdgeInsets.only(top: 60.0), @@ -394,6 +394,14 @@ class _ItemMenuState extends State with ShowErrorDialog { ], ) ], - ))); + ), + ), + floatingActionButton: FloatingActionButton( + onPressed: () {}, + backgroundColor: Colors.blue, + tooltip: 'Recherche', + child: const Icon(Icons.edit, color: Colors.white), + ), + ); } }