Created
September 5, 2022 08:12
-
-
Save vijayinyoutube/5eb55a3469cc5274567fb54d9cae6bc7 to your computer and use it in GitHub Desktop.
Simple home page file containing navigation btns for first and second page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text(widget.title), | |
), | |
body: Center( | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: [ | |
ElevatedButton( | |
child: const Text('First page'), | |
onPressed: () => Navigator.pushNamed(context, '/firstpage')), | |
ElevatedButton( | |
child: const Text('Second page'), | |
onPressed: () => Navigator.pushNamed(context, '/secondpage')), | |
], | |
)), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment