| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- import 'package:firebase_core/firebase_core.dart';
- import 'package:flutter/material.dart';
- import 'package:latlong2/latlong.dart';
- import 'navigation/navigation_page.dart';
- import 'firebase_options.dart';
- import 'package:physigo/exercises/exercises_validation/exercise_validation_page.dart';
- void main() async {
- WidgetsFlutterBinding.ensureInitialized();
- await Firebase.initializeApp(
- options: DefaultFirebaseOptions.currentPlatform,
- );
- runApp(const PhysiGo());
- }
- class PhysiGo extends StatelessWidget {
- const PhysiGo({Key? key}) : super(key: key);
- @override
- Widget build(BuildContext context) {
- return MaterialApp(
- title: 'PhysiGo',
- theme: ThemeData(
- primarySwatch: Colors.blue,
- ),
- home: const HomePage(),
- );
- }
- }
- class HomePage extends StatelessWidget {
- const HomePage({Key? key}) : super(key: key);
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- body: Center(
- child: Column(
- children: [
- TextButton(
- onPressed: () {
- Navigator.push(
- context,
- MaterialPageRoute(
- // Example on how to use NavigationPage
- builder: (context) => NavigationPage(
- destination: LatLng(51.78036111980833, 19.451262207821234),
- ),
- ),
- );
- },
- child: const Text('Navigation'),
- ),
- TextButton(
- onPressed: () {
- Navigator.push(
- context,
- MaterialPageRoute(
- builder: (context) => ExerciseValidationPage(),
- ),
- );
- },
- child: const Text('Exercise Validation'),
- ),
- ],
- ),
- ),
- );
- }
- }
|