Skip to content

JoinCODED/Task-Flutter-Navigation-Signin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sign in Page ✅

ISignin

🍋 Instructions

  1. Fork and clone this into your development folder.
  2. Install the go_router package.
flutter pub add go_router
  1. Import your package in your main.dart file.
import 'package:go_router/go_router.dart';
  1. Create your routes so the home_screen.dart be the main screen and signed_in.dart on the path /signin.
  2. Replace the MaterialApp with a MaterialApp.router.
  3. In your signed_in.dart page, create a variable to hold the username.
  4. Fix the constructor for the signed_in.dart widget.
  5. In your main.dart /signin route, pass the username as a String.
  6. In your home_screen.dart ElevatedButton onPressed method, check if the password is equal to the String 12345 and then navigate the user to the /signed_in page and pass the username as extra.
  7. In your signed_in.dart display a welcome message in the Text widget with the username we got.

🤼‍♂️ No coming back

After the user is signed in, we don't want him to be able to go back to the signin form.

Open the go_router docs and explore the go method instead of the push method.

Push to Github

git add .
git commit -m "your message"
git push

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published