47 lines
1.9 KiB
Dart
47 lines
1.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'menu_tile.dart';
|
|
|
|
class AppDrawer extends StatelessWidget {
|
|
const AppDrawer({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Drawer(
|
|
child: SafeArea(
|
|
child: Column(
|
|
children: [
|
|
UserAccountsDrawerHeader(
|
|
accountName: const Text('Toko UMKM'),
|
|
accountEmail: const Text('user@contoh.com'),
|
|
currentAccountPicture: const CircleAvatar(child: Text('TK')),
|
|
),
|
|
Expanded(
|
|
child: ListView(
|
|
children: const [
|
|
MenuTile(icon: Icons.dashboard, title: 'Dashboard', route: '/dashboard'),
|
|
MenuTile(icon: Icons.point_of_sale, title: 'POS', route: '/pos'),
|
|
MenuTile(icon: Icons.inventory_2, title: 'Products', route: '/products'),
|
|
MenuTile(icon: Icons.people, title: 'Customers', route: '/customers'),
|
|
MenuTile(icon: Icons.local_shipping, title: 'Suppliers', route: '/suppliers'),
|
|
MenuTile(icon: Icons.playlist_add_check, title: 'Purchase Orders', route: '/purchase_orders'),
|
|
MenuTile(icon: Icons.money, title: 'Accounts Receivable', route: '/ar'),
|
|
MenuTile(icon: Icons.warehouse, title: 'Inventory', route: '/inventory'),
|
|
MenuTile(icon: Icons.bar_chart, title: 'Reports', route: '/reports'),
|
|
MenuTile(icon: Icons.settings, title: 'Settings', route: '/settings'),
|
|
MenuTile(icon: Icons.people_alt, title: 'Users', route: '/users'),
|
|
MenuTile(icon: Icons.build, title: 'Utilities', route: '/utilities'),
|
|
],
|
|
),
|
|
),
|
|
ListTile(
|
|
leading: const Icon(Icons.exit_to_app),
|
|
title: const Text('Logout'),
|
|
onTap: () {},
|
|
)
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|