Siopas Inventory PETI for ISTW Mobile
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

69 lines
2.5 KiB

import 'package:flutter/services.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:siopas/pages/pengembalian_barang/edit.dart';
import 'package:siopas/pages/pengembalian_barang/pengembalian_index.dart';
import 'package:siopas/pages/transfer_peti/edit.dart';
import 'package:siopas/pages/transfer_peti/transfer_peti_index.dart';
import 'pages/home/main_page.dart';
import 'pages/peminjaman_barang/peminjaman_stock_page.dart';
import 'pages/peminjaman_barang/create.dart';
import 'pages/peminjaman_barang/show.dart';
import 'pages/sign_in_page.dart';
import 'pages/splash_page.dart';
import 'pages/transfer_peti/show.dart';
import 'providers/asset_status_provider.dart';
import 'providers/auth_provider.dart';
import 'providers/m_status_provider.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// SharedPreferences prefs = await SharedPreferences.getInstance();
// var email = prefs.getString("email");
// var password = prefs.getString("password");
// var token = prefs.getString("token");
// await Firebase.initializeApp();
runApp(MyApp());
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp, // Atur orientasi ke potrait
]);
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MultiProvider(
providers: [
ChangeNotifierProvider(
create: (context) => AuthProvider(),
),
ChangeNotifierProvider(
create: (context) => M_assetStatusProvider(),
),
ChangeNotifierProvider(
create: (context) => AssetStatusProvider(),
),
],
child: MaterialApp(
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
debugShowCheckedModeBanner: false,
routes: {
'/': (context) => SplashPage(),
'/sign-in': (context) => SignInPage(),
'/home': (context) => MainPage(),
'/peminjaman-barang': (context) => AssetStatusPage(),
'/peminjaman-barang/create': (context) => CreatePeminjamanBarang(),
'/pengembalian-barang': (context) => PengembalianBarangPage(),
'/pengembalian-barang/create': (context) =>
CreatePengembalianBarangPage(),
'/transfer-peti': (context) => TransferPetiPage(),
'/transfer-peti/edit': (context) => EditTransferPetiPage(),
},
),
);
}
}