uninav/lib/components/drawer..dart

42 lines
980 B
Dart
Raw Normal View History

2024-04-19 18:07:54 +00:00
import 'package:flutter/material.dart';
class MyDrawer extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Drawer(
child: ListView(
padding: EdgeInsets.zero,
children: [
DrawerHeader(
decoration: BoxDecoration(
color: Colors.blue,
),
child: Text(
'Menu',
style: TextStyle(
color: Colors.white,
fontSize: 24,
),
),
),
ListTile(
leading: Icon(Icons.home),
title: Text('Home'),
onTap: () {
// Handle menu item tap
},
),
ListTile(
leading: Icon(Icons.settings),
title: Text('Settings'),
onTap: () {
// Handle menu item tap
},
),
// Add more menu items as needed
],
),
);
}
}