step 7 : ui login, transaksi, user sesuai wireframe

This commit is contained in:
sindhu
2024-01-15 12:10:15 +07:00
parent 71085788cd
commit 95df7d4c5b
13 changed files with 1151 additions and 303 deletions

View File

@@ -1,65 +1,28 @@
import 'package:app_petty_cash/app/route.dart';
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
class HomeScreen extends StatelessWidget {
import '../../app/constant.dart';
import '../../widget/custom_drawer.dart';
class HomeScreen extends HookConsumerWidget {
const HomeScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Home Screen'),
Widget build(BuildContext context, WidgetRef ref) {
return Padding(
padding: EdgeInsets.only(
top: Constant.getActualYPhone(context: context, y: 30),
),
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);
},
),
],
child: Scaffold(
appBar: AppBar(
title: Text('Home Screen'),
),
drawer: CustomDrawer(),
body: SafeArea(
child: Center(
child: Text('Home Screen Content'),
),
),
),
body: Center(
child: Text('Home Screen Content'),
),
);
}