| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- import 'package:flutter/material.dart';
- import 'package:flutter/widgets.dart';
- class MyHomePage extends StatefulWidget {
- const MyHomePage({Key? key, required this.title}) : super(key: key);
- final String title;
- @override
- State<MyHomePage> createState() => _MyHomePageState();
- }
- class _MyHomePageState extends State<MyHomePage> {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- appBar: AppBar(
- title: const Text('Welcome to PhysiGo'),
- ),
- body: Center(
- child: Column(
- children: <Widget>[
- const SizedBox(height: 30),
- Image.asset(
- 'assets/teamlogo.png',
- width: 260,
- ),
- const SizedBox(height: 30),
- ElevatedButton(
- // Within the `FirstScreen` widget
- onPressed: () {
- // Navigate to the second screen using a named route.
- Navigator.pushNamed(context, '/register');
- },
- child: Text('Register'),
- ),
- ElevatedButton(
- onPressed: () {
- Navigator.pushNamed(context, '/login');
- },
- child: const Text('Log In'),
- )
- ],
- ),
- ),
- );
- }
- }
|