File size: 1,894 Bytes
87a2e39 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
import 'package:flutter/material.dart';
Widget buildDrawer(BuildContext context) {
return Drawer(
child: ListView(
padding: EdgeInsets.zero,
children: <Widget>[
DrawerHeader(
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [Colors.lightGreen, Colors.grey],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const CircleAvatar(
radius: 30,
backgroundColor: Colors.white,
child: Icon(Icons.person, size: 35, color: Colors.grey),
),
const SizedBox(height: 10),
Text(
'Parent',
style: TextStyle(
color: Colors.white,
fontSize: 18,
fontWeight: FontWeight.bold,
),
),
],
),
),
ListTile(
leading: const Icon(Icons.settings_rounded),
title: const Text('Paramètre'),
onTap: () {
Navigator.pop(context);
//Navigation vers les paramètres
},
),
ListTile(
leading: const Icon(Icons.help_outline_rounded),
title: const Text('Aide'),
onTap: () {
Navigator.pop(context);
//Navigation vers l'aide'
},
),
const Divider(),
ListTile(
leading: const Icon(Icons.logout_rounded),
title: const Text('Déconnexion'),
onTap: () {
Navigator.pop(context);
//Navigation vers la sortir
},
),
],
),
);
}
|