| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- import 'package:firebase_core/firebase_core.dart';
- import 'package:flutter/material.dart';
- import 'package:latlong2/latlong.dart';
- import 'navigation/navigation_page.dart';
- import 'navigation/challenge_page.dart';
- import 'firebase_options.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: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [Center(
- child: 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')),
- ),
- Center(
- child: TextButton(
- onPressed: () {
- Navigator.push(
- context,
- MaterialPageRoute(
- // Example on how to use NavigationPage
- builder: (context) => const ChallengePage(),
- ),
- );
- },
- child: const Text('Challenges')),
- ),],
- )
- );
- }
- }
|