Created
January 19, 2023 18:48
-
-
Save TarunNagaSai/c1c4c389cc548ced7042711734a504a3 to your computer and use it in GitHub Desktop.
this is the opening screen of the app with had a button to redirect to the second screen.
This file contains hidden or 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:get/route_manager.dart'; | |
| import 'package:no_internet_configuration/core/routes.dart'; | |
| class HomeScreen extends StatelessWidget { | |
| const HomeScreen({super.key}); | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| appBar: AppBar( | |
| title: const Text( | |
| "Home Screen", | |
| ), | |
| ), | |
| body: Center( | |
| child: ElevatedButton( | |
| onPressed: () { | |
| Get.toNamed( | |
| GetRoutes.secondScreen, | |
| ); | |
| }, | |
| child: const Text( | |
| "Go to second screen", | |
| ), | |
| ), | |
| ), | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment