Flutter Tutorial - How To Navigate to New Screen and Back | Navigator Push/Pop Routes

Sdílet
Vložit
  • čas přidán 28. 07. 2024
  • Use Flutter push and pop operations to navigate to a new screen and back by using the Flutter navigator and push with data and arguments and pop routes.
    Click here to Subscribe to Johannes Milke: czcams.com/users/JohannesMilke...
    👉 12 Week Flutter Training | heyflutter.com
    👉 Flutter Masterclass Courses | heyflutter.com/masterclass
    Source Code | github.com/JohannesMilke/navi...
    My Courses | heyflutter.com
    Follow Newsletter | johannesmilke.com/#/newsletter
    SUBSCRIBE HERE
    bit.ly/JohannesMilke
    SUPPORT & SPONSOR ME
    github.com/sponsors/JohannesM...
    RESOURCES
    Scaffold For Beginners Tutorial: • Flutter Tutorial - Sca...
    Passing Data Between Screens & Widgets Tutorial: • Flutter Tutorial - Pas...
    Hello World Flutter App Tutorial: • Flutter Tutorial - Hel...
    Press Back Again To Exit App Tutorial: • Flutter Tutorial - Pre...
    Page Transition Animation Tutorial: • Flutter Tutorial - Pag...
    AppBar Tutorial: • Flutter Tutorial - App...
    User Profile Page UI Tutorial: • Flutter Tutorial - Use...
    Share Texts, Images, Files Tutorial: • Flutter Tutorial - Sha...
    Image Slider Tutorial: • Flutter Tutorial - Bui...
    Take Screenshots Of Screen Tutorial: • Flutter Tutorial - Tak...
    Download File From Firebase Storage Tutorial: • Flutter Tutorial - Dow...
    Settings Page UI Tutorial: • Flutter Tutorial - App...
    SVG Images Tutorial: • Flutter Tutorial - How...
    Set Screen Background Image Tutorial: • Flutter Tutorial - Set...
    Cached Network Image Tutorial: • Flutter Tutorial - Cac...
    Compress Video Tutorial: • Flutter Tutorial - Com...
    Video Player Tutorial: • Flutter Tutorial - Vid...
    Drop Files Into Dropzone Tutorial: • Flutter Tutorial - Dra...
    TIMELINE
    0:00 Introduction Navigate to New Screen and Back
    0:30 Push Route / Navigate To New Screen
    2:14 Push Route With Data & Parameters
    4:11 Pop Route / Navigate Back To Last Screen
    5:09 Pop Route With Data To Return Data From Screen
    SHARE | SUBSCRIBE | LIKE FOR MORE VIDEOS LIKE THIS
    *********
    SOCIAL MEDIA: Follow Us :-)
    Twitter | / heyflutter_
    Linkedin | / heyflutter
    LEARN MORE
    SOURCE CODE | github.com/JohannesMilke
    ARTICLES | / johannesmilke
    PLAYLISTS
    All Flutter Videos | • Flutter Tutorial - Flu...
    Widgets - Flutter | • Flutter Tutorial - Flu...
    Plugins - Flutter | • Flutter Tutorial - Flu...
    Animations - Flutter | • Flutter Tutorial - Tra...
    Designs - Flutter | • Flutter Tutorial - Flu...
    Firebase - Flutter | • Flutter Tutorial - Pag...
    State Management - Flutter | • Flutter Tutorial - Riv...
    CREDITS
    Copyright song "Corporate Technology" by scottholmesmusic.com
    #Flutter #Tutorial #JohannesMilke
    LIKE & SHARE & ACTIVATE THE BELL
    Thanks For Watching :-)
    bit.ly/JohannesMilke
  • Věda a technologie

Komentáře • 71

  • @HeyFlutter
    @HeyFlutter  Před rokem

    This might help you :)
    👉 12 Week Flutter Training from Newbie to Expert: heyflutter.com
    Source Code: github.com/JohannesMilke/clone_github_repo_example

  • @emirdikyol8213
    @emirdikyol8213 Před 2 lety +2

    It's an amazing tutorial. Your narrative style is perfect. Thank you very much. Keep going.

  • @alexsmith9754
    @alexsmith9754 Před 2 lety +1

    Great explain easy to understand.
    Thank you for you sharing ❤️

  • @better_notes182
    @better_notes182 Před 2 měsíci +1

    On point, no time wasted. Great video! ❤

    • @HeyFlutter
      @HeyFlutter  Před 2 měsíci +1

      Glad to hear that, Thank you @better_notes182! 😊

  • @soispasbet6073
    @soispasbet6073 Před 3 lety +1

    You help me a lot with your videos ! Thanks !

  • @enverkilic9226
    @enverkilic9226 Před 2 lety

    Thanks Johannes, really easy guide to understand such things , thanks for your efforts....

  • @cfcr.8090
    @cfcr.8090 Před 2 lety

    Quality Content , Thank you Johannes !

  • @excellencemichel4875
    @excellencemichel4875 Před 3 lety +1

    Thank you for all @Johannes

  • @eNONO-ot4zh
    @eNONO-ot4zh Před 3 lety

    nice explication. I understood well this time. thank

  • @rei-vh4ud
    @rei-vh4ud Před 2 lety +1

    hi Johannes, thank you for this tutorial! May I know how to preserve states of widget when navigating using this method?

  • @programmerjowo
    @programmerjowo Před 3 lety

    thanks for this very detail tutorial

  • @muhammadjunaidbashir8873

    sirrrr what a way of presenting,,,,,really appreciative great

  • @jk-or7hy
    @jk-or7hy Před 2 lety

    Thanks for helpful video.
    How can I go directly into first screen from third screen ? is it possible ? Thanks

  • @akshayr6067
    @akshayr6067 Před 3 lety

    Thank you very much 🙏

  • @chaitanyapawar5483
    @chaitanyapawar5483 Před 2 lety

    Very nicely explained sir 🙂

  • @shriramsrinivasan6560
    @shriramsrinivasan6560 Před 2 lety

    Hi Johannes Mike, Thanks for the wonderful Video, While reading the Navigator.push() documentation, it could see that Navigator.push() returns a Future event, Generally in flutter, we would add "await" keyword when a function call returns a Future Event, Why don't we add any await keyword before any Navigator.push commands ?

  • @mojtabasaebi6096
    @mojtabasaebi6096 Před 2 lety

    i like that thank you alot

  • @whitebracket
    @whitebracket Před rokem

    Thank you ! direct to the goal !

    • @HeyFlutter
      @HeyFlutter  Před rokem

      Glad it was helpful, whitebracket! 🙂

  • @kamalCode
    @kamalCode Před 3 lety +3

    Sir, please flutter navigation 2.0

  • @amandwivedi7413
    @amandwivedi7413 Před 2 lety

    Sir, how can I navigate to same page ? Like selecting menu button

  • @Sofien_Steve
    @Sofien_Steve Před 7 měsíci

    simple and clear, thank you :D !

    • @HeyFlutter
      @HeyFlutter  Před 7 měsíci

      Glad to hear that, Thank you @sofienbenktib8970! 😊

  • @edwardphilipguarin6460

    Hi! sir,, I follow your instructions in Pop,, but I got an error: Error: A non-null value must be returned since the return type 'Future' doesn't allow null. PS: please help me to debug this. Tnx

  • @abdullahsaid8561
    @abdullahsaid8561 Před 2 lety

    what happen if my second screen is black. what is the cause

  • @hammedmessi9286
    @hammedmessi9286 Před rokem

    It;s an amazing tutorial

  • @amirraja7628
    @amirraja7628 Před 3 lety

    Sir please 🙏🙏🙏 tell me if I want to pop 3 values back how can I do ? Please sir I'm stuck from last 3 days I have watched all ur videos but not found any solution

  • @Raufle1
    @Raufle1 Před 2 lety

    print('Really Short, simple, sweet and smooth Thanks'),

  • @muhammadafzal237
    @muhammadafzal237 Před 2 lety

    Nice

  • @santhoshs9086
    @santhoshs9086 Před 3 lety

    put video for how to improve flutter web app scrolling performance.I was run my app in chrome the scroll performance not smooth , i behaviour like sloth. so pls ready these type videos

  • @AmericanuNarcis
    @AmericanuNarcis Před 2 lety

    Novadays ,i chuckled a bit

  • @caioandrade998
    @caioandrade998 Před rokem

    THANKS!!!!!!

  • @michaelotu9723
    @michaelotu9723 Před 2 lety

    Thumbs up man..

  • @alieid6254
    @alieid6254 Před 2 lety +1

    Hey man i need your help here , i have been struggling with this, when i use navigator.puah i doesn't show back button on the next page app bar what is the issue , can you help here??

    • @alieid6254
      @alieid6254 Před 2 lety

      @@HeyFlutter yes , no leading initialized on the second page i only have the app bar and it has nothing but the title and still no back button

  • @kgetgamingentertainmenttec8243

    HI i got an error saying the arguement type jsObject cant be assigned to the parameter type BuildContext context has a red line under it in ElevatedButton part of my code

    • @HeyFlutter
      @HeyFlutter  Před rokem +1

      Thank You Kirubel Berhanu! Follow this link: stackoverflow.com/questions/53406548/error-dart-the-argument-type-context-cant-be-assigned-to-the-parameter-typ
      I hope you will get your answer 🙂

    • @kgetgamingentertainmenttec8243
      @kgetgamingentertainmenttec8243 Před rokem

      @@HeyFlutter Thank you for the reply i have solved it already

  • @shakeelakthar3429
    @shakeelakthar3429 Před rokem

    When i click device back button from third screen, its going to first screen, but it has to go to second screen. what should I do?

    • @HeyFlutter
      @HeyFlutter  Před rokem

      Thank You Shakeel Akthar! Follow this link: stackoverflow.com/questions/55265782/android-back-button-keep-bring-me-back-to-first-screen-when-its-pressed-and-didn
      I hope you will get your answer 🙂

  • @Tech1st
    @Tech1st Před 3 lety +1

    We need getX tutorials

  • @messiisthebest
    @messiisthebest Před rokem

    but in my case , without pressing a button , I am navigating to 2nd screen although I push navigation on onpressed function

    • @HeyFlutter
      @HeyFlutter  Před rokem

      Thank you MESSI, make sure to follow the tutorial step by step 🙂

  • @hamzahawat8092
    @hamzahawat8092 Před 3 měsíci

    I have an error !_debugLocked is not true when i want to back to the Previous screen
    How can i solve it
    Im sorry but my english is not very good

    • @HeyFlutter
      @HeyFlutter  Před 3 měsíci

      Thank You @hamzahawat8092! Follow this link: stackoverflow.com/questions/55618717/error-thrown-on-navigator-pop-until-debuglocked-is-not-true
      I hope you will get your answer 🙂

  • @wonabe9799
    @wonabe9799 Před 2 lety

    When I click on the back button of the navigation bar it pop's previous page how to stop that

    • @HeyFlutter
      @HeyFlutter  Před 2 lety

      Thank You wona be!! Follow this link: stackoverflow.com/questions/45916658/how-to-deactivate-or-override-the-android-back-button-in-flutter
      I hope you will get your answer 🙂

    • @wonabe9799
      @wonabe9799 Před 2 lety

      @@HeyFlutter thanks for your help sir

  • @starynight419
    @starynight419 Před rokem

    can you pop multiple data in flutter?

    • @HeyFlutter
      @HeyFlutter  Před rokem

      Thank You Stary Night! Follow this link: stackoverflow.com/questions/57370739/how-do-i-pass-more-than-one-values-using-navigator-pop-method-in-flutter
      I hope you will get your answer 🙂

  • @TheAmazingPlankton
    @TheAmazingPlankton Před 2 lety +1

    Is this the way to navigate after "Google sign in"/firebase screen to the "Home-screen"? I am a noob, sorry 😔

    • @TheAmazingPlankton
      @TheAmazingPlankton Před 2 lety

      @@HeyFlutter thank you. How can I usw the navigator. Push without a button...? I mean a delayed switch to another screen.

  • @Akhi.yt45
    @Akhi.yt45 Před rokem

    Thank you so much sir love you 👏❤️‍🔥❤️‍🔥

  • @abdullahsaid8561
    @abdullahsaid8561 Před 2 lety

    i got a lot of errors from just copying what u did

  • @canpietaybek
    @canpietaybek Před rokem

    Alles sehr gut gemacht bruder! mach weiter, vielleicht versuch doch mal auch ein deutsches video?? DANKE

    • @HeyFlutter
      @HeyFlutter  Před rokem +1

      Thanks for the idea, Can Piet! 🙂 I have added it to my list of ideas for future videos!

    • @canpietaybek
      @canpietaybek Před rokem +1

      @@HeyFlutter thx alot

  • @hashankannangara8723
    @hashankannangara8723 Před 3 lety

    😎😍🤘

  • @moehamdan1001
    @moehamdan1001 Před 3 lety

    Any tutorials for camera filters and masks faces like Snapchat

  • @padalaharshitagoud3621

    onTap: () {
    print("Edit Profile");
    Navigator.push(
    context,
    MaterialPageRoute(
    builder: (context) => Second page()));
    ->This is my first page
    TextButton(
    onPressed: () => {
    Navigator.pop(context,'Continue'),
    Navigator.push(context, MaterialPageRoute(builder: (context) => FirstPage())),
    },
    ->This is my second page
    when I click on back button of first page it's showing Second page again.
    Can you help me with this?

  • @simpleengineering2766
    @simpleengineering2766 Před 3 lety +1

    flutter sikhai

  • @mdshahidali3132
    @mdshahidali3132 Před 3 lety

    Nice Video , But Without Animation No Any App Like Much Better For User Experience So When You Create A Next Any Topic Video Please Use Professional Animation Who Not Use AnyOne in Video Please Sir .
    Thanking You .