welcomeScreen.dart 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter/widgets.dart';
  3. class MyHomePage extends StatefulWidget {
  4. const MyHomePage({Key? key, required this.title}) : super(key: key);
  5. final String title;
  6. @override
  7. State<MyHomePage> createState() => _MyHomePageState();
  8. }
  9. class _MyHomePageState extends State<MyHomePage> {
  10. @override
  11. Widget build(BuildContext context) {
  12. return Scaffold(
  13. appBar: AppBar(
  14. title: const Text('Welcome to PhysiGo'),
  15. ),
  16. body: Center(
  17. child: Column(
  18. children: <Widget>[
  19. const SizedBox(height: 30),
  20. Image.asset(
  21. 'assets/teamlogo.png',
  22. width: 260,
  23. ),
  24. const SizedBox(height: 30),
  25. ElevatedButton(
  26. // Within the `FirstScreen` widget
  27. onPressed: () {
  28. // Navigate to the second screen using a named route.
  29. Navigator.pushNamed(context, '/register');
  30. },
  31. child: Text('Register'),
  32. ),
  33. ElevatedButton(
  34. onPressed: () {
  35. Navigator.pushNamed(context, '/login');
  36. },
  37. child: const Text('Log In'),
  38. )
  39. ],
  40. ),
  41. ),
  42. );
  43. }
  44. }