step 4 : home screen

This commit is contained in:
sindhu
2024-01-12 14:52:17 +07:00
parent 3ae6622951
commit f323df9f0f
5 changed files with 154 additions and 133 deletions

View File

@@ -0,0 +1,66 @@
import 'package:app_petty_cash/app/route.dart';
import 'package:flutter/material.dart';
class HomeScreen extends StatelessWidget {
const HomeScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Home Screen'),
),
drawer: Drawer(
child: ListView(
padding: EdgeInsets.zero,
children: [
DrawerHeader(
decoration: BoxDecoration(
color: Colors.blue,
),
child: Text(
'Drawer Header',
style: TextStyle(
color: Colors.white,
fontSize: 24,
),
),
),
ListTile(
title: Text('Home'),
onTap: () {
// Handle navigation to Home screen
Navigator.pop(context);
Navigator.pushNamed(context, homeRoute);
},
),
ListTile(
title: Text('Transaksi'),
onTap: () {
// Handle navigation to Transaksi screen
Navigator.pop(context);
},
),
ListTile(
title: Text('User'),
onTap: () {
// Handle navigation to User screen
Navigator.pop(context);
},
),
ListTile(
title: Text('Logout'),
onTap: () {
// Handle logout logic
Navigator.pop(context);
},
),
],
),
),
body: Center(
child: Text('Home Screen Content'),
),
);
}
}