main.dart 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import 'package:firebase_core/firebase_core.dart';
  2. import 'package:flutter/material.dart';
  3. import 'firebase_options.dart';
  4. import 'push_notifications_initializer.dart';
  5. import 'package:physigo/logIn.dart';
  6. import 'package:physigo/profilePage.dart';
  7. import 'package:physigo/widgets/rankingNavigation.dart';
  8. import 'package:physigo/SignupPage.dart';
  9. import 'package:physigo/menu/main_page.dart';
  10. import 'package:physigo/welcomeScreen.dart';
  11. void main() async {
  12. WidgetsFlutterBinding.ensureInitialized();
  13. await Firebase.initializeApp(
  14. options: DefaultFirebaseOptions.currentPlatform,
  15. );
  16. handleMessages();
  17. runApp(const PhysiGo());
  18. }
  19. class PhysiGo extends StatelessWidget {
  20. const PhysiGo({Key? key}) : super(key: key);
  21. @override
  22. Widget build(BuildContext context) {
  23. return MaterialApp(
  24. title: 'PhisyGo',
  25. theme: ThemeData(
  26. primarySwatch: Colors.blueGrey,
  27. ),
  28. initialRoute: '/mainPage',
  29. routes: {
  30. '/': (context) => MyHomePage(title: ''),
  31. '/register': (context) => SignupPage(),
  32. //'/register2': (context) => RegisterScreen2(title: ''),
  33. //'/register3': (context) => RegisterScreen3(title: ''),
  34. '/login': (context) => LogIn(title: ''),
  35. '/profilePage': (context) => ProfilePage(title: ''),
  36. '/mainPage': (context) => MainPage()
  37. },
  38. //home: const MyHomePage(title: 'Flutter Demo Home Page'),
  39. );
  40. }
  41. }