49 lines
1.3 KiB
Dart
49 lines
1.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:get/get_core/src/get_main.dart';
|
|
import 'package:get/get_navigation/get_navigation.dart';
|
|
import 'package:uninav/map.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.map),
|
|
title: Text('Map Page'),
|
|
onTap: () {
|
|
Get.back(); // close drawer
|
|
Get.toNamed('/map');
|
|
// Handle menu item tap
|
|
},
|
|
),
|
|
ListTile(
|
|
leading: Icon(Icons.settings),
|
|
title: Text('Settings'),
|
|
onTap: () {
|
|
Get.back(); // close drawer
|
|
Get.toNamed('/settings');
|
|
// Handle menu item tap
|
|
},
|
|
),
|
|
// Add more menu items as needed
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|