Flutter app for Asset Management
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

46 lignes
1.3 KiB

  1. import 'package:flutter/material.dart';
  2. import 'package:flutter/services.dart';
  3. import 'home.dart';
  4. import 'stocking.dart';
  5. import 'asset_logs.dart';
  6. import 'package:image_picker/image_picker.dart';
  7. import 'asset_details.dart';
  8. import 'util/utils.dart';
  9. import 'package:shared_preferences/shared_preferences.dart';
  10. final picker = ImagePicker();
  11. Util util = new Util();
  12. SharedPreferences prefs;
  13. void main()async {
  14. WidgetsFlutterBinding.ensureInitialized();
  15. // SharedPreferences.setMockInitialValues({});
  16. prefs = await SharedPreferences.getInstance();
  17. SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp])
  18. .then((_) {
  19. runApp(new MyApp());
  20. });
  21. }
  22. class MyApp extends StatelessWidget {
  23. // This widget is the root of your application.
  24. @override
  25. Widget build(BuildContext context) {
  26. return MaterialApp(
  27. debugShowCheckedModeBanner: false,
  28. debugShowMaterialGrid: false,
  29. title: 'AssetStocks',
  30. theme: ThemeData(
  31. primarySwatch: Colors.blue,
  32. visualDensity: VisualDensity.adaptivePlatformDensity,
  33. ),
  34. home: Home(),
  35. routes: {
  36. '/home': (context) => new Home(),
  37. '/stocking': (context) => new Stocking(),
  38. '/details': (context) => new AssetDetails(),
  39. '/logs' : (context) => new AssetLogs(),
  40. },
  41. );
  42. }
  43. }