step 4 : home screen
This commit is contained in:
66
app_petty_cash/lib/screen/home/home_screen.dart
Normal file
66
app_petty_cash/lib/screen/home/home_screen.dart
Normal 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'),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user