Flutter Navigate to a new screen and back. Use WillPopScope and Perform Push and Pop operations #4.3

  Рет қаралды 108,137

Smartherd

Smartherd

5 жыл бұрын

Access 7000+ courses for 60 days FREE: pluralsight.pxf.io/c/1291657/...
Understand how Navigator widget manages push and pop operations to navigate to a new screen and come back. Use WillPopScope widget and use Material Navigation widgets to understand how navigation works in Flutter. In flutter one screen is known as one Route.
Next Video: • Dart & Flutter Asynchr...
Previous Video: • Flutter SQFLite Databa...
Video Code: bit.ly/2KLMSix
Complete Source code files: bit.ly/2NINczC .
.
Please donate and support my work
(If you think my free tutorials are better than paid ones :)
- Patreon: bit.ly/patreon-donate
- Paypal/Payoneer: sriyank123@gmail.com
- UPI (only for India): smartherd@okaxis
:: If you want to develop a website or a mobile app, email me your requirement at sriyank.siddhartha@gmail.com :: Free demos provided beforehand ::
- Access my premium courses: bit.ly/sriyank-courses
Free Programming courses:
- Ruby Programming: bit.ly/smyt-r
- Dart Programming: bit.ly/smyt-d
- Kotlin Programming: bit.ly/smyt-k
- Java Programming: bit.ly/smyt-j
- Kotlin Coroutines: bit.ly/smyt-coru
Free Flutter course:
- Flutter App Development: bit.ly/2Rg7EFR
Free Android courses:
- Android using Kotlin: bit.ly/smyt-ka
- Android using Java: bit.ly/smyt-ja
- Android Material Design: bit.ly/2SMJqU6
- Android Jetpack Architecture: bit.ly/yt-j
- Android Multiple Screen Support: bit.ly/smyt-mss
- Android Retrofit: bit.ly/2Ee6GHn
More free programming courses:
- bit.ly/smy-list
Check out my website:
- bit.ly/smartherd
Let's get in touch! [Sriyank Siddhartha]
LinkedIn: bit.ly/sriyank-linkedin
Facebook: bit.ly/smartherd-facebook
Instagram: bit.ly/sriyank-instagram
Twitter: bit.ly/sriyank-twitter
Github: bit.ly/smartherd-github
--- Thank you for your love and support ---

Пікірлер: 58
@matiasgomez9416
@matiasgomez9416 4 жыл бұрын
Code: 3:35 > Navigate to New Screen Navigator.push(context, MaterialPageRoute(builder: (context){ return NoteDetail(); } 7:40 > Return Last Screen leading: IconButton( icon: Icon(Icons.arrow_back), onPressed: (){ moveToLastScreen(); ), 8:28 > WillPopScore return WillPopScore( onWillPop: (){ moveToLastSreen(); }, return Scaffold( ... ); 9:35 > Return Last Screen void moveToLastScreen(){ Navigator.pop(context); }
@mohammedsadiq1567
@mohammedsadiq1567 5 жыл бұрын
Your efforts are great and they show it in your videos..
@ovalverde
@ovalverde 5 жыл бұрын
Thks a lot! was explained very well.
@zahraadelung9085
@zahraadelung9085 4 жыл бұрын
Thank you so much. As a programming learner, I've rarely heard such an understandable and clear explanation. Awesome job.
@viveks.
@viveks. 3 жыл бұрын
Same!
@rohit_mondal__
@rohit_mondal__ 4 жыл бұрын
This video really helped me a lot...Thanks!!!!!!
@omidkarami4312
@omidkarami4312 Жыл бұрын
Very well explained! Thanks mate!
@dantedt3931
@dantedt3931 2 жыл бұрын
Best explanation,thanks. Subscribed.
@karimovitche
@karimovitche 5 жыл бұрын
seriously, I can't find words, perfect, thanks a lot.
@smartherd
@smartherd 5 жыл бұрын
Cool keep commenting and like vide
@veenisazta1582
@veenisazta1582 4 жыл бұрын
Very well explained 😊
@priyankahegde6441
@priyankahegde6441 5 жыл бұрын
Thank you so much sir
@GAMEOLOGIST
@GAMEOLOGIST 2 жыл бұрын
Nice and Smart Explanation !!
@peet91pop
@peet91pop 5 жыл бұрын
great work , nice navigation explanation , thanks waiting for more videos
@smartherd
@smartherd 5 жыл бұрын
Thanks a lot .everyday video will come
@MyChanneltutzzzzz
@MyChanneltutzzzzz 5 жыл бұрын
helped a lot
@Schnoebel
@Schnoebel 4 жыл бұрын
is your favorite sentence "how simple is that" :D ? Very good videos !!!
@krishnakumarramachandran5888
@krishnakumarramachandran5888 5 жыл бұрын
Perfect Sir.
@ytubewiki
@ytubewiki 4 жыл бұрын
Thanks a million.
@MrDania101
@MrDania101 5 жыл бұрын
thank you
@chhivangthuch1369
@chhivangthuch1369 3 жыл бұрын
good video , thanks
@sumanparajuli229
@sumanparajuli229 4 жыл бұрын
Just wow... put more videos on flutter
@Vathananable
@Vathananable 4 жыл бұрын
How do you need a new Screen UI in the existing whitespace of the same page after a button pressed using Flutter? I mean like in ASP.net you have Partial views so in flutter do you have something like that?
@gauravkhambra901
@gauravkhambra901 5 жыл бұрын
Thanku sir for making that
@smartherd
@smartherd 5 жыл бұрын
Welcome
@karthick-ik5wr
@karthick-ik5wr 2 жыл бұрын
While clicking device back button willpop method is not called.. Please help me out
@muzammiladamu9911
@muzammiladamu9911 2 жыл бұрын
can you help us with tutorial on how to create OSINT tool using flutter and API
@noelthekkethala1562
@noelthekkethala1562 4 жыл бұрын
why is there two constructor created in note_detail file in both classes ?
@amrragheb221
@amrragheb221 5 жыл бұрын
Bro I have three pages to navigate 1to2 and 2to3 but the back button of the real device back me from 3 to 1 / I already have an arrow in app bar in page 3 and it work well it back me from 3 to 2 pages perfectly but the problem in the button of the device .. And I applied willpopscope widget . And still not work can u tell me what is the problem?
@krishnakumarramachandran5888
@krishnakumarramachandran5888 5 жыл бұрын
Instead of using Navigator.pop(context); you can put code like this, Navigator.pop(context, MaterialPageRoute(builder: (context) { return NoteList(); })); and you can solve your problem.
@pradipbhandari3662
@pradipbhandari3662 3 жыл бұрын
I need help how to send multiple data.... To another page
@cedric_ds
@cedric_ds 4 жыл бұрын
5:12 why don't we need to pass the BuildContext as an argument in navigateToDetail()? The context used inside that function, where does it come from?
@GAMEOLOGIST
@GAMEOLOGIST 2 жыл бұрын
We are already defined on the build function. It coming from that
@firstbay4024
@firstbay4024 4 жыл бұрын
there is no back button on iphone? this is only for android. how do we do the back to home page on iphone?
@surainvlog5444
@surainvlog5444 3 жыл бұрын
1.Navigator operation requested with a context that does not include a Navigator. above error shown help me plz anyone
@jdsflk2792
@jdsflk2792 3 жыл бұрын
Hi! Did you use a MacBook in this video? If yes, which model? Thanks for your answer in advance!
@wahyusaragih4265
@wahyusaragih4265 5 жыл бұрын
sir can you make a tutorial how to add and use custom icon to flutter? I created my custom icon, but i can't use it. The icon got error.
@Eeshwargiri
@Eeshwargiri 3 жыл бұрын
sir make a video on "TabBar and TabBarView form with next previous and finish button flutter" please
@mournblank
@mournblank 4 жыл бұрын
5:17 when creating navigateToDetail(), I got error at context. It never declared. Please help
@habibrehman8305
@habibrehman8305 4 жыл бұрын
same case here, is it solved?
@riteshpatidar9184
@riteshpatidar9184 4 жыл бұрын
Create a parameter named 'context' of class BuildContext, and then pass 'context' of build function parameter to navigateToDetail() fucntion.
@arniifounder
@arniifounder 3 жыл бұрын
I'm new to flutter, but I was able to pass the context using this: Hope it helps for anyone looking at this in the future onTap: () { debugPrint("ListTile Tapped"); navigateToDetail(context, 'Edit Note'); }, ), ); } ); } } void navigateToDetail(BuildContext context, String title) { Navigator.push(context, MaterialPageRoute(builder: (context) { return NoteDetail(title); })); }
@rudreshsp3236
@rudreshsp3236 3 жыл бұрын
hi onWillPop() asking for a return error plz help
@AbhinavMohanMishraRMP
@AbhinavMohanMishraRMP 2 жыл бұрын
onWillPop: () async => await moveToLastScreen() And Make Function with return type Future: Future moveToLastScreen() { Navigator.pop(context); return Future.value(true); }
@SatyaPrakash-lc6ee
@SatyaPrakash-lc6ee 4 жыл бұрын
Discussion on "In flutter one screen is known as one route" ------------------------------------------------------------------------------------------------- No offence, but have you watched the Udacity's Build Native Mobile App with Flutter course, the instructor also agrees with this in 18th video of Lesson 1. But there is clarification also that "In flutter route is the path to the screen". So who is correct ?? You & that instructor OR the clarification ? Please clear this confusion.
@mridulbagla
@mridulbagla 3 жыл бұрын
I have an error: ############################# This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: NoteDetail.appBarTitle(dart.must_be_immutable) ############################# can anyone resolve?? Thanks in advance. Btw great Video Sir!
@faheemahmadofficial7701
@faheemahmadofficial7701 3 жыл бұрын
please please please make new flutter course for 2021 on youtube please and make it simple not complex and make it eaiser not difficult and speak slow
@sansritpaudel8455
@sansritpaudel8455 5 жыл бұрын
I am subscribing. but you must reply my problem solution ok
@azerioauditore511
@azerioauditore511 3 жыл бұрын
6:49 we dont have to do so much we can access variable of NoteDetail class by using widget.appBarTitle
@Eeshwargiri
@Eeshwargiri 3 жыл бұрын
sir make a video on "TabBar and TabBarView form with next previous and finish button flutter" please
Top 12 Flutter Tips & Tricks
9:32
Fireship
Рет қаралды 266 М.
Slow motion boy #shorts by Tsuriki Show
00:14
Tsuriki Show
Рет қаралды 9 МЛН
НЫСАНА КОНЦЕРТ 2024
2:26:34
Нысана театры
Рет қаралды 1,1 МЛН
Inside Out Babies (Inside Out Animation)
00:21
FASH
Рет қаралды 15 МЛН
Flutter Layouts Walkthrough: Row, Column, Stack, Expanded, Padding
22:40
Andrea Bizzotto
Рет қаралды 118 М.
Most overpowered way to build mobile apps?
8:33
Beyond Fireship
Рет қаралды 750 М.
GestureArena | Decoding Flutter
8:30
Flutter
Рет қаралды 36 М.
Complex Animations in Flutter using Rive | Flare
15:44
FilledStacks
Рет қаралды 224 М.
Slow motion boy #shorts by Tsuriki Show
00:14
Tsuriki Show
Рет қаралды 9 МЛН