import 'package:flutter/material.dart';
import 'home_screen.dart';
class MainScreen extends StatelessWidget {
const MainScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("The Navigation"),
centerTitle: true,
),
drawer: Drawer(
child: Column(
children: [
const UserAccountsDrawerHeader(
accountName: Text("Name"),
accountEmail: Text("[email protected]"),
),
ListTile(
leading: const Icon(Icons.person),
title: const Text("Profile"),
onTap: () {
Navigator.pop(context);
Navigator.pushNamed(context, '/profile');
},
),
ListTile(
leading: const Icon(Icons.settings),
title: const Text("Settings"),
onTap: () {
Navigator.pop(context);
Navigator.pushNamed(context, '/settings');
},
),
ListTile(
leading: const Icon(Icons.help),
title: const Text("Help"),
onTap: () {
Navigator.pop(context);
Navigator.pushNamed(context, '/help');
},
),
],
),
),
body: const HomeScreen(),
);
}
}1 views