add colors menu

This commit is contained in:
Valentin CZERYBA 2024-06-26 23:10:16 +02:00
parent 4804c8bc01
commit 581512a6da
2 changed files with 27 additions and 16 deletions

View File

@ -84,21 +84,30 @@ class _MyHomePageState extends State<ListItemMenu> {
Widget buildPosts(List<Events> posts) { Widget buildPosts(List<Events> posts) {
// ListView Builder to show data in a list // ListView Builder to show data in a list
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("Item list menu"), title: Text("Item list menu"),
), backgroundColor: Colors.blue,
body: ListView.separated( foregroundColor: Colors.white,
itemCount: posts.length, ),
itemBuilder: (context, index) { body: ListView.separated(
final post = posts[index]; itemCount: posts.length,
return ListTile( itemBuilder: (context, index) {
title: Text('${post.name!}'), subtitle: Text('${post.place!}')); final post = posts[index];
}, return ListTile(
separatorBuilder: (context, index) { title: Text('${post.name!}'), subtitle: Text('${post.place!}'));
return Divider(); },
}, separatorBuilder: (context, index) {
)); return Divider();
},
),
floatingActionButton: FloatingActionButton(
onPressed: () {},
backgroundColor: Colors.blue,
tooltip: 'Recherche',
child: const Icon(Icons.search, color: Colors.white),
),
);
} }
} }

View File

@ -154,6 +154,8 @@ class _LoginDemoState extends State<LoginDemo> with ShowErrorDialog {
backgroundColor: Colors.white, backgroundColor: Colors.white,
appBar: AppBar( appBar: AppBar(
title: Text("Login Page"), title: Text("Login Page"),
backgroundColor: Colors.blue,
foregroundColor: Colors.white,
), ),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(