import 'package:flutter/material.dart'; Widget buildDrawer(BuildContext context) { return Drawer( child: ListView( padding: EdgeInsets.zero, children: [ 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 }, ), ], ), ); }