| 12345678910111213141516171819202122232425262728293031323334353637 |
- import 'package:flutter/material.dart';
- import 'package:physigo/walking/walking_permission.dart';
- class MainPage extends StatefulWidget {
- const MainPage({Key? key}) : super(key: key);
- @override
- State<MainPage> createState() => _MainPage();
- }
- class _MainPage extends State<MainPage> {
- @override
- Widget build(BuildContext context) {
- final arguments = (ModalRoute.of(context)?.settings.arguments ?? <String, dynamic>{}) as Map;
- final String id = arguments['uid'];
- print(id);
- return Scaffold(
- appBar: AppBar(
- title: const Text('Welcome Back!'),
- leading: GestureDetector(
- onTap: () {
- print('going to profile page');
- Navigator.pushNamed(context, '/profilePage',
- arguments: {'id': id},
- );
- },
- child: Icon(
- Icons.account_circle_rounded, // add custom icons also
- ),
- ),
- ),
- body: WalkingPermission()
- );
- }
- }
|