Kasir Grosir: starter Flutter POS (scaffold awal)
This commit is contained in:
66
lib/main.dart
Normal file
66
lib/main.dart
Normal file
@@ -0,0 +1,66 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'widgets/app_drawer.dart';
|
||||
import 'widgets/template_screen.dart';
|
||||
import 'screens/dashboard.dart';
|
||||
import 'screens/pos.dart';
|
||||
import 'screens/products.dart';
|
||||
import 'screens/customers.dart';
|
||||
import 'screens/suppliers.dart';
|
||||
import 'screens/purchase_orders.dart';
|
||||
import 'screens/accounts_receivable.dart';
|
||||
import 'screens/inventory.dart';
|
||||
import 'screens/reports.dart';
|
||||
import 'screens/settings.dart';
|
||||
import 'screens/users.dart';
|
||||
import 'screens/utilities.dart';
|
||||
|
||||
void main() {
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: 'Kasir Grosir - Starter',
|
||||
theme: ThemeData(
|
||||
primarySwatch: Colors.indigo,
|
||||
),
|
||||
home: const HomePage(),
|
||||
routes: {
|
||||
'/dashboard': (_) => const DashboardScreen(),
|
||||
'/pos': (_) => const PosScreen(),
|
||||
'/products': (_) => const ProductsScreen(),
|
||||
'/customers': (_) => const CustomersScreen(),
|
||||
'/suppliers': (_) => const SuppliersScreen(),
|
||||
'/purchase_orders': (_) => const PurchaseOrdersScreen(),
|
||||
'/ar': (_) => const AccountsReceivableScreen(),
|
||||
'/inventory': (_) => const InventoryScreen(),
|
||||
'/reports': (_) => const ReportsScreen(),
|
||||
'/settings': (_) => const SettingsScreen(),
|
||||
'/users': (_) => const UsersScreen(),
|
||||
'/utilities': (_) => const UtilitiesScreen(),
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class HomePage extends StatelessWidget {
|
||||
const HomePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TemplateScreen(
|
||||
title: 'Kasir Grosir - Home',
|
||||
drawer: const AppDrawer(),
|
||||
body: const Center(child: Text('Selamat datang di Kasir Grosir - pilih menu dari drawer')),
|
||||
actions: const [
|
||||
IconButton(onPressed: _noop, icon: Icon(Icons.search)),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
static void _noop() {}
|
||||
}
|
||||
Reference in New Issue
Block a user