Le menu de la page principale après s'être authentifié est ok
This commit is contained in:
30
lib/presentation/widgets/custom_appbar.dart
Normal file
30
lib/presentation/widgets/custom_appbar.dart
Normal file
@@ -0,0 +1,30 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
final String title;
|
||||
final List<Widget> actions;
|
||||
|
||||
const CustomAppBar({
|
||||
Key? key,
|
||||
required this.title,
|
||||
this.actions = const [],
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppBar(
|
||||
backgroundColor: Colors.black,
|
||||
title: Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
actions: actions,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Size get preferredSize => const Size.fromHeight(56.0);
|
||||
}
|
||||
@@ -4,14 +4,25 @@ class CustomButton extends StatelessWidget {
|
||||
final String text;
|
||||
final VoidCallback onPressed;
|
||||
|
||||
const CustomButton({super.key, required this.text, required this.onPressed});
|
||||
const CustomButton({
|
||||
Key? key,
|
||||
required this.text,
|
||||
required this.onPressed,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ElevatedButton(
|
||||
onPressed: onPressed,
|
||||
style: ElevatedButton.styleFrom(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16.0),
|
||||
textStyle: const TextStyle(fontSize: 18),
|
||||
backgroundColor: Colors.blueAccent,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
child: Text(text),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
47
lib/presentation/widgets/custom_drawer.dart
Normal file
47
lib/presentation/widgets/custom_drawer.dart
Normal file
@@ -0,0 +1,47 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CustomDrawer extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Drawer(
|
||||
child: ListView(
|
||||
padding: EdgeInsets.zero,
|
||||
children: <Widget>[
|
||||
DrawerHeader(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.blueAccent,
|
||||
),
|
||||
child: Text(
|
||||
'AfterWork',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24,
|
||||
),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(Icons.home),
|
||||
title: Text('Accueil'),
|
||||
onTap: () {
|
||||
Navigator.pushNamed(context, '/home');
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(Icons.event),
|
||||
title: Text('Événements'),
|
||||
onTap: () {
|
||||
Navigator.pushNamed(context, '/event');
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(Icons.camera_alt), // Icône mise à jour pour la story
|
||||
title: Text('Story'),
|
||||
onTap: () {
|
||||
Navigator.pushNamed(context, '/story');
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user