52 lines
1.3 KiB
Dart
Raw Normal View History

2024-12-30 22:14:46 +01:00
import 'package:flutter/material.dart';
2024-12-30 22:51:47 +01:00
import 'alert.dart';
2024-12-30 22:14:46 +01:00
2024-12-30 22:51:47 +01:00
class MyDrawer extends StatelessWidget with ShowAlertDialog {
2024-12-30 22:14:46 +01:00
@override
Widget build(BuildContext context) {
return Drawer(
child: ListView(
padding: EdgeInsets.zero,
children: [
// Drawer Header
DrawerHeader(
decoration: BoxDecoration(
color: Colors.blue,
),
child: Text(
'Menu',
style: TextStyle(
color: Colors.white,
fontSize: 24,
),
),
),
// Drawer Items
ListTile(
leading: Icon(Icons.home),
title: Text('Home'),
onTap: () {
Navigator.pop(context); // Close the drawer
},
),
ListTile(
leading: Icon(Icons.settings),
title: Text('Settings'),
onTap: () {
Navigator.pop(context); // Close the drawer
},
),
ListTile(
leading: Icon(Icons.info),
title: Text('About'),
onTap: () {
2024-12-30 22:51:47 +01:00
showAlertDialog(
context, 'About', "Version 0.0.1"); // Close the drawer
2024-12-30 22:14:46 +01:00
},
),
],
),
);
}
}