Skip to content

Instantly share code, notes, and snippets.

@TarunNagaSai
Created January 19, 2023 18:48
Show Gist options
  • Select an option

  • Save TarunNagaSai/c1c4c389cc548ced7042711734a504a3 to your computer and use it in GitHub Desktop.

Select an option

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.
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