add floating button

This commit is contained in:
Valentin CZERYBA 2024-12-07 17:10:02 +01:00
parent 1cc14277e8
commit 8c4c436241

View File

@ -194,21 +194,21 @@ class _ItemMenuState extends State<ItemMenu> with ShowErrorDialog {
// fast, so that you can just rebuild anything that needs updating rather // fast, so that you can just rebuild anything that needs updating rather
// than having to individually change instances of widgets. // than having to individually change instances of widgets.
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
// Here we take the value from the MyHomePage object that was created by // 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. // the App.build method, and use it to set our appbar title.
title: Text("${eventName}", overflow: TextOverflow.ellipsis), title: Text("${eventName}", overflow: TextOverflow.ellipsis),
backgroundColor: Colors.blue, backgroundColor: Colors.blue,
foregroundColor: Colors.white, foregroundColor: Colors.white,
leading: IconButton( leading: IconButton(
icon: Icon(Icons.arrow_back), icon: Icon(Icons.arrow_back),
onPressed: () { onPressed: () {
Navigator.push( Navigator.push(
context, MaterialPageRoute(builder: (_) => ListItemMenu())); context, MaterialPageRoute(builder: (_) => ListItemMenu()));
}, },
)), )),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Padding( Padding(
padding: const EdgeInsets.only(top: 60.0), padding: const EdgeInsets.only(top: 60.0),
@ -394,6 +394,14 @@ class _ItemMenuState extends State<ItemMenu> with ShowErrorDialog {
], ],
) )
], ],
))); ),
),
floatingActionButton: FloatingActionButton(
onPressed: () {},
backgroundColor: Colors.blue,
tooltip: 'Recherche',
child: const Icon(Icons.edit, color: Colors.white),
),
);
} }
} }