Complete GetX State Management | Flutter

preview_player
Показать описание
Complete GetX State Management | Flutter

The biggest part of the GetX package is definitely the State Management part. In this video we cover the GetX State Management almost completely. I tried to break it down completely, so people really understand what is going on. We cover GetBuilder which is the simplest solution that uses the least ram and then GetX and Obx which are the reactive solutions.

00:00 Introduction
00:35 State management options
01:59 GetBuilder
06:05 GetX & Obx
13:40 Workers
16:34 Conclusion

From everything I've seen I will be working with GetX more. Expect to see a complete app with GetX coming up at some point!

Connect With Me

I also do lots of Investing

My Top 5 Books:

Youtube Gear

Thank you for watching!
#getx #flutterstatemanagement #statemanagement
Рекомендации по теме
Комментарии
Автор

I am starting up as a Flutter user and did some courses on the basic principles. However, I never felt good with all the types of page transitions and State Management solutions. All those guys(and Girls) use so many terms I have never heard of. THIS MUST BE POSSIBLE TO DO IT MUCH EASIER!!!!. That was what I was thinking after every complex explanation! THIS is the most straightforward solution for page transitions and, I did not notice that on the Youtube title, also easy peasy State Management. This is awesome for a simple hobbyist who does not have a degree in programming.

hoekbrwr
Автор

I'm mashing the "Like" button but it ain't incrementing enough! Great job as always. Keep it up! Proud of your amazing work.

meansnada
Автор

Was looking for a good getx tutorial from ages. Thanks for the video. Really good explanation.

AnubhavAnand
Автор

Wonderful work !! I will replace the multiple package with one, I hope get dive deeper in lazy, routes binding and localization (load locales files From json file & translate with plaure and args), Thanks for this video

nudgecodes
Автор

Wow i never knew getx so simple... Until now I just kinda ignored it.
Its so fast to get going... Thanks for this definately subscribed

saabirmohamed
Автор

Amazing. Thanks for the video. It clarified a lot about Getx. I believe that like me, many would like to see how Getx would work with lists, forms, and everyday things that need to be reactivated. Thanks again for posting this content on your channel.

WesleyAlves-iixl
Автор

Many thanks for the vid, and thanks to Jonny (& others) for some super work. I tried Flutter some time back and tore my hair out over state management. Now that it's this simple, I'll definitely retry Flutter. GetX makes it simple and elegant.

brianoh
Автор

Good job.. Its simple and easy to use.. One suggestion is zoom the editor bit more as it would be easy to follow.. Thank you..

shanes
Автор

Great job. easy to understand! best GetX tutorial I haven seem!

zsytssk
Автор

Really liked the video, there is a reason it has 0 dislikes xD Can you do GetX Utils next time like changing Theme and Locale, it has barely any docs about the Utils. That would be great!

ТэмүүжинЦогоо
Автор

I love the series, the "workers" as reactions in Mobx and the "getter" has computed vars, all without using meta decorations! Bravo! I can imagine using computed vars to validate form fields! Awesome . the debounce is awesome. Just a recommendation to the Dev if he can make a worker like a filter, where the filter will override an observer value with a filtered value. 
Example:
filter(count, (counter)=> counter > 10 ?10 :counter, active: true);
filter(text, (text)=> _capitalizeFirst(text));

peekpt
Автор

There are a few things I want to say including some questions:

1) I’m using Provider with ChangeNotifier for an highly complex app. That many Provider classes cause a performance problem. (It is not seen but eventually it happens as shown in debugging tools.)

Also using providers is difficult because of syntax and the need of context.

The reactive side of the GetX, the Obx, may also cause performance issues since they are basically open streams.

So I figured out that the best way for a state management is using the onUpdate side of the GetX. That way updates occur only on demand. The syntax is easy, no context and no calling the controller class inside the main build method of a widget class.

2) When using GetBuilder, what if we need multiple controller classes? In Provider package we have the MultiProvider package. It’s useful to wrap other widgets. GetX does need a wrap too.

How can I depend on multiple GetX controllers inside the GetBuilder? (Maybe wrapping them over and over just works but is there a better syntax for readability?)

3) Provider package uses the closest provider class declared in the widget tree. I have post and profile screens in my app. (You can think it like Instagram where you can constantly navigate to a post than its user profile than another post than a tagged person’s profile over and over.)

I use some of the provider classes as the logic controller instead of doing logic stuff inside the StatefulWidget.

For example there is a ProfileScreenUI class which holds UI related to a user profile. There is also a ProfileScreenProvider class which is consumed by each of the ProfileScreens.

A user can navigate to another user’s profile page over and over and do stuff which changes their state.

UserA—>UserC—>UserB—> on it goes on. The screens are totally unique to the corresponding users. So each time the user navigates to a new user (or even the same user’s profile), I create another ProfileScreenUI class using a separate instance of ProfileScreenProvider class as a controller.

Because that I give each of the new ProfileScreenUI classes a provider class, they always use the closest one up in the widget tree which is the new ProfileScreenProvider instance.

Can I do this with GetX?

rikyriky
Автор

<3 Very very Thanks Buddy..! Now i moved from Provider to GetX, for your Simplest explanation.

RehanKhan-xfml
Автор

Great video man 🔥, On to the point. I was frustrated with flutter state management & scoping. This GetX seems seems natural and less cluttered

PS-ccpz
Автор

Awesome, why your videos are always so good, to the point and perfect duration . What do you (Amateur Coder & whom so ever reading my comment) use most also considering writing unit test cases for business logic:
-Riverpod 
-GetX
-BLoC (stream controllers)
-flutter_bloc
-Redux

Personally, I have mostly used flutter_block with state/event/yeild sort of architecture with every screen/page.

Started getting in to River and GetX but really now with lot of choices getting into confusion...

Fnyvids
Автор

Excellent video. Please use GetX to interact with an api (CRUD) thanks

fabiojansen
Автор

7:52 update a instance of a class, 12:16 update a variable, I have to use update method which is option 2 for update user (instance of User class), update a variable works well without using any update function

angthoang
Автор

I'm so glad i found your channel!
Is there any way you could make a video-guide, where we could learn how to display complex json-data from an api call using GetX?

Hypothermia
Автор

Thanks for your hard work. Really. it's a good video for getx.

ugurkorkmaz
Автор

Hey I'm starting a new project and am at a crossroads of GetX or Provider/Riverpod. GetX is amazing, but it's new and not a ton of resources or support yet. Seems using GetX is a bit of a gamble since it hasn't "proven" itself quite yet and Provider is tried and true. I see some people say global state is not a good idea and question if GetX can scale. What are your thoughts? Are you going to use it or would you recommend it for a production app? Thanks!

jtpulford