Flutter setState Example | Passing Data between Classes

  Рет қаралды 18,266

Learn Flutter with Me

Learn Flutter with Me

Күн бұрын

In this video I discuss passing data between Classes using setState, specifically passing variables back to the parent statefulWidget in a somewhat simple Flutter example.
Chapters:
0:00 Intro and initial setup
1:42 Adding MaterialApp,Scaffold and AppBar
3:35 Adding an ElevatedButton
4:25 setState inside the same Class
5:22 Testing with multiple ElevatedButtons in same Class
6:14 replacing the ElevatedButtons with a Custom Button
8:30 passing variables across Classes
Video on Provider 5 and changeNotifier
• Flutter Provider 5 cha...
#flutter #learnflutter
Instagram:
learnflutterwithme
Stuff I use for this channel (Affiliate Links)
SanDisk 1TB SSD amzn.to/3j1U8py
Elgato Cam Link 4K amzn.to/37EyqBK
Logitech G600 Mouse amzn.to/36DYFYz
Logitech G Pro Keyboard amzn.to/3saco38
Macbook Pro M1 13" amzn.to/36GzbKc
Neewer Mic Arm amzn.to/3z7RvIm
Davinci Resolve amzn.to/3erEb9I
Adobe Photoshop Elements amzn.to/3BkPKth

Пікірлер: 71
@LearnFlutterwithMe
@LearnFlutterwithMe 3 жыл бұрын
Did the diagrams help? And did I use the word "Redundant" correctly? haha! Would love to hear your thoughts!
@hope4ul
@hope4ul 3 жыл бұрын
The diagram is awesome, it was very helpful, i really need visual aids like that while learning so thank you!
@LearnFlutterwithMe
@LearnFlutterwithMe 3 жыл бұрын
@@hope4ul Excellent!!!
@Andreasonline3
@Andreasonline3 3 жыл бұрын
@@LearnFlutterwithMe good stuff mate
@LearnFlutterwithMe
@LearnFlutterwithMe 3 жыл бұрын
@@Andreasonline3 thank you!
@vtvvnha2230
@vtvvnha2230 2 жыл бұрын
the diagram is awesome, it makes me understand what you are doing
@muhammadali4653
@muhammadali4653 Жыл бұрын
The way you explained everything from the basic level is awesome.
@Mahanmarwat
@Mahanmarwat 2 жыл бұрын
Your videos are greatly detailed. Love the way you explain thoroughly.
@ngcheechuen8591
@ngcheechuen8591 2 жыл бұрын
I like the way you are teaching, short and brief to the point. Easy to understand. Thank you very much.
@animetaste4197
@animetaste4197 Жыл бұрын
true OG for typing all the code by hand
@muhammadali4653
@muhammadali4653 Жыл бұрын
Really liked you video because of the simplicity of your explanation, as a beginner it's really helpful.
@josephmelbaleyos9511
@josephmelbaleyos9511 2 жыл бұрын
Great tutorial. Very clear explanation and on point. Also your diagram is a big help to understand what's happening.
@lostapple4039
@lostapple4039 Жыл бұрын
Don't normally comment but want to help your ranking in the yt algo. Thanks for the great tutorial!
@joehilinski7008
@joehilinski7008 2 жыл бұрын
Excellent Tutorial! 5 Star!
@gusinthecloud
@gusinthecloud Жыл бұрын
Excellent Teacher!!!
@Tom-en9tc
@Tom-en9tc 2 жыл бұрын
Thank you for the great lesson. Clear and simple but very effective!
@LearnFlutterwithMe
@LearnFlutterwithMe 2 жыл бұрын
thank you! and thanks for watching!
@saidaydn5159
@saidaydn5159 2 жыл бұрын
so clean. thanks a lot Mr.
@Mujhaid-Muslim
@Mujhaid-Muslim Жыл бұрын
amazing. Great way of expression thanks
@danieltrump9110
@danieltrump9110 3 жыл бұрын
You voice takes away half the stress I built through watching videos of other flutter related channels.
@LearnFlutterwithMe
@LearnFlutterwithMe 3 жыл бұрын
What a nice thing to say! Thanks!
@claudiograsso
@claudiograsso 2 жыл бұрын
Great video! Thanks a lot!!!
@gideonmair7922
@gideonmair7922 2 жыл бұрын
very good example for callback, thanks
@cjw6659
@cjw6659 2 жыл бұрын
Really good explanation. Thank you.
@sydneygomes7180
@sydneygomes7180 2 жыл бұрын
exactly what i wanted thankyou best explanation for callback functions
@HalfTime-gx1ui
@HalfTime-gx1ui 3 ай бұрын
Very Useful ❤
@granchik9852
@granchik9852 3 жыл бұрын
Thank for video,you one of best in explanation who i saw!
@LearnFlutterwithMe
@LearnFlutterwithMe 3 жыл бұрын
Glad it was helpful!
@mayurasandakalumsellapperu6778
@mayurasandakalumsellapperu6778 Жыл бұрын
Superb....Thank you very much 🤗👌
@program353
@program353 Жыл бұрын
I like your videos a lot, thanks for your time....
@djjavvystark5470
@djjavvystark5470 2 жыл бұрын
Wow, very knowledgeable tutor, this video is just perfect, many thanks.
@LearnFlutterwithMe
@LearnFlutterwithMe 2 жыл бұрын
Thank you so much! Thanks for watching!
@earthrelated
@earthrelated 2 жыл бұрын
Thank you bro!
@lemonyth
@lemonyth 3 жыл бұрын
thank you for the video.
@yawsampenebuadu9918
@yawsampenebuadu9918 2 жыл бұрын
I watched and he never used autocomplete. What a genius!
@higorgustavobarbosadasilva9624
@higorgustavobarbosadasilva9624 2 жыл бұрын
This video was so amazing...Thanks a lot...I'm from Brazil!!!!
@LearnFlutterwithMe
@LearnFlutterwithMe 2 жыл бұрын
Nice to "meet" you, thank you and you're welcome!
@danieltolessa6962
@danieltolessa6962 3 жыл бұрын
Thank you!!
@ajudaprofessor
@ajudaprofessor 3 жыл бұрын
Great. Thank you for the video.
@LearnFlutterwithMe
@LearnFlutterwithMe 3 жыл бұрын
You're welcome!
@RabeeQiblawi
@RabeeQiblawi 2 жыл бұрын
thank you very clear and to the point
@LearnFlutterwithMe
@LearnFlutterwithMe 2 жыл бұрын
thanks for watching!
@klent3284
@klent3284 2 жыл бұрын
Great tutorial. Finally a video that is simple and easy to understand. You are a great teacher. My only suggestion is to change the 'clicking' sound, it's too harsh and distracting.
@LearnFlutterwithMe
@LearnFlutterwithMe 2 жыл бұрын
Thank you! Yeah I don't use the sound effects as much as I used to, but I do still use them some and should probably use them more than I do haha! So I'll listen back to this video and make sure I get that corrected for the future. Appreciate the feedback!
@gh0zi0
@gh0zi0 2 жыл бұрын
you are my hero
@vtvvnha2230
@vtvvnha2230 2 жыл бұрын
very good videos :)
@eniolaadeniyi309
@eniolaadeniyi309 2 жыл бұрын
this is more explanatory. will like you to do a full course on Getx state management. once again you are indeed a genius (nothing like auto complete throughout the video )
@LearnFlutterwithMe
@LearnFlutterwithMe 2 жыл бұрын
I'll see what I can do! Thanks!
@thelastcat8406
@thelastcat8406 3 жыл бұрын
this diagram teachin damn dude wp..
@ramogly6942
@ramogly6942 3 жыл бұрын
very good
@LearnFlutterwithMe
@LearnFlutterwithMe 3 жыл бұрын
Thanks!
@uttamkumarsingh1172
@uttamkumarsingh1172 3 жыл бұрын
great video i like it way of teaching. if you want to grow more faster than other you should create video in one topic zero to end like topic like riverpod create clone code and more you should try once thank you
@krishnacreation9211
@krishnacreation9211 2 жыл бұрын
How we use inbuilt function like list.remove inside setstate method..??
@acornerofherheart-jr9pl
@acornerofherheart-jr9pl 2 ай бұрын
how to call future me4thod of stateful widget in another stateful class without using static before the method?
@francescofreddi4374
@francescofreddi4374 2 жыл бұрын
here, in this exercise... i can call or declare Function with nullSafety...?
@wannurnafisahbintijunaidis7707
@wannurnafisahbintijunaidis7707 2 жыл бұрын
Hi, is there a way to pass multiple data to a stateful class?
@simsni5168
@simsni5168 3 жыл бұрын
Thank you! Very clear explanation. I have a question regarding forms. Is there any way we can differentiate textformfield and button, and put them in different classes, keeping the communication between them and validating the form when the button is pressed? thanks a lot. Also. regarding your videos. I really enjoy them. I think that the music in the background is very calming, and for me, atleast, it somehow makes things more clear. The diagram: I had to stop the video and glance at it to understand, but when I did stop the video, and looked at it, it all clicked :).
@simsni5168
@simsni5168 3 жыл бұрын
P.S I really do believe that you are gonna get more views eventually, dont stop the videos and have some patience, having seen many videos and not only flutter tutorial, i got to say that yours are one of the best.
@LearnFlutterwithMe
@LearnFlutterwithMe 3 жыл бұрын
Thank you so much, that's great to hear! I really appreciate it! So the short answer is yes that's doable... getting the elements into classes is straight forward, the validation is the question. Let me think it out and I'll get back to ya!
@djoeneh
@djoeneh 6 ай бұрын
hmm, i'm trying this with 3 classes: 1 class "textbar with the var", 2 class " the buton with the var = "newtext" , and the 3 class wrap 1class in column and stuff. this dont work on that :\
@noblenetdk
@noblenetdk Жыл бұрын
Wich plugin do you use to get the widget-tree visualized as you type along?
@LearnFlutterwithMe
@LearnFlutterwithMe Жыл бұрын
It's unfortunately not a plugin, I create the graphics and add them when editing the videos. but it would be a cool one!
@abdallahhussein5997
@abdallahhussein5997 3 жыл бұрын
Do you have a flutter series?
@LearnFlutterwithMe
@LearnFlutterwithMe 3 жыл бұрын
Are you asking me if I have a Flutter course somewhere? Not yet but I hope to in the near future! I'll let you know if/when I do!
@abdallahhussein5997
@abdallahhussein5997 3 жыл бұрын
@@LearnFlutterwithMe thanks I have subscribed your channel I'm waiting your notification
@corriedebeer799
@corriedebeer799 8 ай бұрын
jesus man you are typing way too much. VS Code snippets gives you all the code with a press of a button. Your coding is very inefficient.
@tocleora
@tocleora 8 ай бұрын
Yeah I did it that way on purpose. It’s an instructional video. Thanks for watching!
Sqflite Tutorial | Flutter plugin for SQLite | CRUD
15:47
Learn Flutter with Me
Рет қаралды 50 М.
🔴 How to Use setState() Efficiently in Flutter || setState Tutorial
9:12
Techness With Hussain
Рет қаралды 2,1 М.
DEFINITELY NOT HAPPENING ON MY WATCH! 😒
00:12
Laro Benz
Рет қаралды 64 МЛН
Iron Chin ✅ Isaih made this look too easy
00:13
Power Slap
Рет қаралды 36 МЛН
Mom's Unique Approach to Teaching Kids Hygiene #shorts
00:16
Fabiosa Stories
Рет қаралды 34 МЛН
Set State Method in Flutter - State Management Basics
13:25
Flutter Explained
Рет қаралды 23 М.
Flutter GetX Example | State Management Tutorial
10:12
Learn Flutter with Me
Рет қаралды 5 М.
Flutter Tutorial For Beginners #4 - Button Presses and Callbacks
18:52
Learn Flutter Life Cycle In 10 Minutes
10:02
Robert Brunhage
Рет қаралды 73 М.
Dart/Flutter Enums Explained in 5 Minutes!
4:52
Learn Flutter with Me
Рет қаралды 3,9 М.
Provider 📱 Simple State Management • Flutter Tutorial
5:48
Flutter Basic Training - 12 Minute Bootcamp
12:09
Fireship
Рет қаралды 864 М.
DEFINITELY NOT HAPPENING ON MY WATCH! 😒
00:12
Laro Benz
Рет қаралды 64 МЛН