Created
May 10, 2023 11:18
-
-
Save rubywai/2dc0b2ef2a1ce6e435218c69b61af4d1 to your computer and use it in GitHub Desktop.
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
import 'package:flutter/material.dart'; | |
import 'package:flutter_ui_lesson/screens/second_screen.dart'; | |
class FirstScreen extends StatelessWidget { | |
const FirstScreen({Key? key}) : super(key: key); | |
// | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar(title: const Text('First Screen'),), | |
body: Center( | |
child: ElevatedButton( | |
child: const Text('Go to second screen'), | |
onPressed: (){ | |
Navigator.push(context, | |
MaterialPageRoute(builder: (context) => const SecondScreen())); | |
}, | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment