Which one should we choose? Flutter state management explained

  Рет қаралды 36,828

CodeX

CodeX

Күн бұрын

Пікірлер: 140
@devio9699
@devio9699 2 жыл бұрын
I just published a financial application developed with GetX. I don't feel any issues with GetX till now.
@CodeXdev
@CodeXdev 2 жыл бұрын
Exactly, We have published a complete bank application with WesternUnion and many third party payment gateways. All with Flutter and GetX. It’s more like how you utilise the tool rather than going with super duper awesome packages.
@pranavkhote
@pranavkhote 2 жыл бұрын
I have used Getx more often in commercial projects as it is easy to understand and write code once you get use to it due to its easy structure
@CodeXdev
@CodeXdev 2 жыл бұрын
Thats why its most liked package on pub.dev
@ajaykotiyal427
@ajaykotiyal427 2 жыл бұрын
Highly commercial Apps use BloC - I think. Because it is more organized.
@mzeeshan7799
@mzeeshan7799 2 жыл бұрын
@@ajaykotiyal427 which specific commercial app you personally know that uses Bloc? :)
@saqibshafin
@saqibshafin 2 жыл бұрын
@@mzeeshan7799 In my job search experience on Upwork, I often saw Bloc usage as one of the client requirements. I think NA and EU dev teams prefer Bloc. Never saw Getx.
@fabianm5960
@fabianm5960 Жыл бұрын
@@CodeXdev i would say most of the likes aren't real. I mean, come on, more likes than Cupertino or provider ? I don't think this can't be legit
@faizandarwesh7867
@faizandarwesh7867 2 жыл бұрын
Awesome content. These internal details are so helpful. Thanks a lot.
@vibhor691
@vibhor691 2 жыл бұрын
If someone only uses Getx then he will definitely forget about how flutter actually works behind the code, like how context is passed and when you're using Getx it's basically like moving to different mini framework inside the app itself. I recommend switching between bloc, riverpod, getx
@CodeXdev
@CodeXdev 2 жыл бұрын
I totally agree with you, we should know how Flutter works with context.
@Mfbzai
@Mfbzai 2 жыл бұрын
How about provider, is it same?
@BrunoCodeman
@BrunoCodeman 2 жыл бұрын
@@Mfbzai provider is kinda the old version of riverpod.
@arieagung
@arieagung Жыл бұрын
GetX is how flutter framework should be.
@Apenschi
@Apenschi 11 ай бұрын
@@BrunoCodeman Riverpod was an improved version of Provider. But now Riverpod is degenerating quickly, becoming more and more complex and abstratc. So in my opinion Provider gets more interesting again as an alternative to Riverpod.
@jaimepremy
@jaimepremy 2 жыл бұрын
I'm totally sold on GetX, my only concern is the same of some others here: maintenance of the the package in the long run. I guess the only way to ensure this is to have more and more contributions from the community.
@hoekbrwr
@hoekbrwr 2 жыл бұрын
The controller is tight to a screen means the Business logic is not separate from the View. Better to state that when needing a reactive variable is needed you have to find the controller which was created on another screen when needed on more than one screen.
@buck-johnson
@buck-johnson 2 жыл бұрын
Great video. I went into it liking Provider but came out liking Getx. The last segment showing the code side by side was more important and should have been weighted greater. I think for that Getx should've got 2 points. Just as you said, having a controller for each page makes coding much easier.
@eliasavelino6729
@eliasavelino6729 2 жыл бұрын
no it doesnt
@sharath-b-naik
@sharath-b-naik 2 жыл бұрын
Hi... I'm using getx from long time and beginner also to flutter . But i while surfing on internet i read some articles about state management. The flutter community and industry level companies are prefer to use bloc package for state management. 1. Why they not prefer to use getx ?. 2. Why they prefer bloc ? 3. Which is good for next carrier. 💕 from india.
@gaxkiller
@gaxkiller 2 жыл бұрын
I never see getx used in production code here in France.
@kecudotcom
@kecudotcom 2 жыл бұрын
in Indonesia some big tech companies use GetX.
@jayminpatel8753
@jayminpatel8753 2 жыл бұрын
For big companies it is not easy move their products from bloc to any other state management. And bloc is here from the beginning so that's why they asked for bloc. But recommend to go with Getx. We used for our products as well.
@gaxkiller
@gaxkiller 2 жыл бұрын
@@jayminpatel8753 I don't know, but here I never heard of someone recomanding to use getX. If they move from bloc it is most of the time for riverpod
@banuacoder
@banuacoder 2 жыл бұрын
In Indonesia, I have some of my projects with my clients using GetX and it worked perfectly fine
@rahulagarwal968
@rahulagarwal968 Жыл бұрын
When to use Sql vs NoSql database. Everywhere its told that use SQL database when you have structured data. But when building any app, most of the time data are related to each other. So in that case as a beginner I get confused which to use when and why ?
@arieagung
@arieagung Жыл бұрын
NoSQL requires code to make sure the data consistency. Complex data models if you need to make a report or any data analysis. Most of time SQL is good fit for general use.
@Apenschi
@Apenschi 11 ай бұрын
There are two reasons why NoSql has been so successful recently: 1. Many new developers, especially self-tought ones, try to avoid SQL because it is much more complicated 2. Most app are rather primitive, so in fact NoSQL is sufficient for the majority of the apps developed. BUT if your data structures get more complex your requests will also get more complex and then you will be lucky if you chose SQL because it is MUCH more powerful and database engines are MUCH more optimized. I would always recommend using SQL. There is only one real reason for using NoSql that is when you have lots of relatively unstructured data.
@jrheisler
@jrheisler 2 жыл бұрын
I use getx in all my projects. I'm concerned though that with no updates in 3 months, and the beta now 9 days old... Btw, one of my main projects can't recompile with the latest flutter... It does make one worry.
@Apenschi
@Apenschi 11 ай бұрын
Similar problems with Riverpod. I'm using ChangeNotifierProvider a lot because I don't like to work with immutable data . Now it seems to be kind of deprecated in Riverpod. Also they seem to want to force you into code generation what I don't like, too. So after have been working with Riverpod for several years, in several large projects, I'm now having the problem that Riverpod might not fit my development anymore and I might end up to need to migrate all the Riverpod code what would be more than annoying. So it is always a problem and risk when you depend so much on a single package!
@ajaykotiyal427
@ajaykotiyal427 2 жыл бұрын
I have applied Riverpod in a project. It is very flexible. but sometimes a provider depends on another one is not easy to understand (e.g. FutureProvider will depend on some StateProvider for API calling). And we will have to define global providers for each and every action, this can be a Drawback. But Overall it reduces so much boiler plate code. I am in favour of it. But I don't have experience with GetX, so cannt say anything.
@mohamdjamal6266
@mohamdjamal6266 2 жыл бұрын
Hi when we need nested navigation, so i case i develop Ecommerce for web and bobile?
@user-wr4yl7tx3w
@user-wr4yl7tx3w 2 жыл бұрын
Should using GetX create issues with iOS simulator? Not sure if I ran into issues that was connected to GetX.
@CodeXdev
@CodeXdev 2 жыл бұрын
Nope, GetX has nothing to do with it! May be its ur system?
@nthonyproblgomez9659
@nthonyproblgomez9659 2 жыл бұрын
Thanks for the video. ❤️ From Bangladesh
@1kjm
@1kjm 2 жыл бұрын
Can you benchmark riverpod against redux?
@ai_malllu
@ai_malllu 2 жыл бұрын
hey ...i am bit confused. with state management ,which to choose as i am beginner ...do i need to learn all state management to get a a job? or just one? & expecting suggestion from flutter community
@CodeXdev
@CodeXdev 2 жыл бұрын
You need to understand Flutter and any one of the state management, preferably BLoC for interview perspective. rest all you can learn as and when needed
@ai_malllu
@ai_malllu 2 жыл бұрын
@@CodeXdev thanks bro & your contents are much helpful..waiting for more
@chrisodonnell86
@chrisodonnell86 2 жыл бұрын
Hey if I use Getx and fluent_UI, I wouldn’t use GetMaterialApp right? Just use it for state management not routing/utils?
@CodeXdev
@CodeXdev 2 жыл бұрын
No, theres more to it. If you need only GetxController and .obs then you don't need GetMaterialApp at all.. but if you use Get.width, Get.dialog, Get.anything then you have to make it GetMaterialApp!
@rudiansyahalpontianaky8356
@rudiansyahalpontianaky8356 2 жыл бұрын
Thanks i get it
@7mada89
@7mada89 2 жыл бұрын
I have to say this, Provider, Riverpod or Bloc would be faster than GETX because flutter by default is optimized to use InheritedWidget. In the documentation of inheritFromWidgetOfExtactType "Calling this method is O(1) with a small constant factor", but it wouldn't be noticeable in small app. One more thing is that you can use ChangeNotifier instead of StateNotifier if you want to use something like MVC architecture. other than the video is great, both are good solutions and every solution have some downsides.
@CodeXdev
@CodeXdev 2 жыл бұрын
Thank you for writing descriptive feedback, Consumer and Obx both are Stateful widget behind the scene.. I think its more about how that setState is triggered internally in these widgets and how changes are notified.
@ФирузВорисов
@ФирузВорисов 2 жыл бұрын
Hey Afsal. Make a Getx Controller in separated package please it looks very nice for managing state option
@arunflik6943
@arunflik6943 2 жыл бұрын
which is better for ecommerce app development getx or provider or riverpod or Bloc ?
@atati
@atati 2 жыл бұрын
They all have their downsides and advantages, depends with what exactly you want to achieve
@pragnabhatt9531
@pragnabhatt9531 2 жыл бұрын
excellent explanation
@Isthiyaquekambathagothi
@Isthiyaquekambathagothi 2 жыл бұрын
How do we run iOS on Windows, does it only work with MacOS? how do developer with Windows build iOS or release build iOS files? is there a solution for windows? android am able to build but not iOS
@CodeXdev
@CodeXdev 2 жыл бұрын
Single answer for all of ur question: Its not possible! You need MacOS 🖥 with XCode installed to build iOS app.
@Isthiyaquekambathagothi
@Isthiyaquekambathagothi 2 жыл бұрын
@@CodeXdev Thank you so much, and can you do a video on Dio for api with getx, i have seen http, not sure if you have done.. Love your videos and channel ..Keep doing
@intuneknight9681
@intuneknight9681 2 жыл бұрын
Why the flutter team didn't implement the state management like this libraries from the ground up and make it so painful since day one ?
@CodeXdev
@CodeXdev 2 жыл бұрын
Indeed, they have recommendation for BLoC and Provider.
@rudiansyahalpontianaky8356
@rudiansyahalpontianaky8356 2 жыл бұрын
@@CodeXdev what about riverpod for now ?
@noman7776
@noman7776 2 жыл бұрын
Thanks Afzal, which vscode theme are you using ?
@CodeXdev
@CodeXdev 2 жыл бұрын
Dark+
@tripurarishankartiwari3698
@tripurarishankartiwari3698 2 жыл бұрын
good comparison, both good
@abror_khurramov
@abror_khurramov 2 жыл бұрын
Hi bro, why you don't use ExampleClass extends GetView and Getbuilder instead of Obx , is it more convenient. or is there a drawbacks of this. if you know please explain i am still junior
@CodeXdev
@CodeXdev 2 жыл бұрын
Yeah, I should have used it.. but while recording I missed it
@kecudotcom
@kecudotcom 2 жыл бұрын
I prefer use Getview and StateMixin. They are simple and easy to use
@tiktik1516
@tiktik1516 2 жыл бұрын
Neat mahn...Flutter community!
@AdamSowinski
@AdamSowinski 2 жыл бұрын
I would choose Riverpod over any other state management solution. Regarding GetX, the syntax look awful.
@saeedrazazzadeh9114
@saeedrazazzadeh9114 2 жыл бұрын
Thank you for your videos Best regard...
@CodeXdev
@CodeXdev 2 жыл бұрын
Glad you like them!
@hajajmaor
@hajajmaor Жыл бұрын
Some things were presented wrong. You have a Consumer widget, to wrap only part of the widget. You didn't dispose the text editing controller. And I haven't finished the video yet. You didn't declare the data in a provider. You can hold the query in a provider and read from there.
@siddharthmehra5796
@siddharthmehra5796 2 жыл бұрын
No matter what, GetX ❤
@CodeXdev
@CodeXdev 2 жыл бұрын
Thats called blind love ❤️ 😉
@bayhasaroob2912
@bayhasaroob2912 2 жыл бұрын
you need more info about riverpod ,most of information in last section was wrong
@CodeXdev
@CodeXdev 2 жыл бұрын
Successfully read and ignored 😬
@KingOfEuropeAdnan
@KingOfEuropeAdnan 2 жыл бұрын
Bro getx v provider which is best?
@CodeXdev
@CodeXdev 2 жыл бұрын
Whatever seems easy to you...
@laughone
@laughone 2 жыл бұрын
where do i get certification for free in flutter?
@rwuttke
@rwuttke 2 жыл бұрын
Just remember if you get it for free, then you get what you paid for.
@thegospellight
@thegospellight 2 жыл бұрын
good videos. thanks
@sumanmitraYTC
@sumanmitraYTC 2 жыл бұрын
Getx no doubt has all the features and are well planned so it fires up only when u use the functionality (like storage or navigation) but I feel in a long run if our total app is based on Getx and something has to go wrong with the package we will be screwed... I love minimalism so use only package that has sole purpose... Anyway good comparision..
@chrisodonnell86
@chrisodonnell86 2 жыл бұрын
I’m going to give GetX a crack for my next app, was going to try riverpod but the evidence of GetX just keeps adding up! Ps from a provider background
@CodeXdev
@CodeXdev 2 жыл бұрын
Keep us posted when you try
@chrisodonnell86
@chrisodonnell86 2 жыл бұрын
@@CodeXdev will do
@rudiansyahalpontianaky8356
@rudiansyahalpontianaky8356 2 жыл бұрын
Last mobile project im using GetX to, switching from provider
@mustafashaikh7829
@mustafashaikh7829 2 жыл бұрын
What about provider.?
@CodeXdev
@CodeXdev 2 жыл бұрын
Riverpod is evolved version of provider 😃
@devzeeshan3637
@devzeeshan3637 2 жыл бұрын
@@CodeXdev yeah agreed 👍🏻
@mustafashaikh7829
@mustafashaikh7829 2 жыл бұрын
@@CodeXdev then I will stick to provider
@unknownunicorn1373
@unknownunicorn1373 2 жыл бұрын
@@CodeXdev It’s not. Riverpod is a rewrite based on Provider, but it is not using Provider internally. Riverpod does not place providers in the widget tree like Provider does using InheritedWidget. Riverpod has it's own storage for providers "ref" so that it is not tied to the BuildContext
@CodeXdev
@CodeXdev 2 жыл бұрын
@@unknownunicorn1373 Agreed, what I meant is provider evolved to Riverpod so there is no need to go back and compare with provider, in context of question.
@zakariahossain3455
@zakariahossain3455 2 жыл бұрын
What about unit testing comparison?
@DholaSain
@DholaSain 2 жыл бұрын
Why people hate GetX sooo much?
@tiktik1516
@tiktik1516 2 жыл бұрын
Getx is very simple and calm.. don't need any high logic and pro methods.
@CodeXdev
@CodeXdev 2 жыл бұрын
indeed its simple and very productive.
@arupnaskarbkp
@arupnaskarbkp 2 жыл бұрын
I love Getx
@dolbysoundsofficial9323
@dolbysoundsofficial9323 2 жыл бұрын
I love to use Riverpod you dont show .listen .refresh .autodispose n .when .maybeMap you just show some basic stuff even you dont no how to use Riverpod in better way
@CodeXdev
@CodeXdev 2 жыл бұрын
Appreciate your comment, but this video was not to show what all features Riverpod or GetX have. Its about comparing which takes what resources and is it good to use or not.
@sosualfred
@sosualfred 2 жыл бұрын
GetX Wins once again.
@mazenalsakkaf
@mazenalsakkaf 2 жыл бұрын
I 👍riverpod According to the official documentation: Riverpod is a complete rewrite of the Provider package to make improvements that would be otherwise impossible.
@CodeXdev
@CodeXdev 2 жыл бұрын
No doubt.. Riverpod is a good library.
@Apenschi
@Apenschi 11 ай бұрын
Riverpod was an improved version of Provider. But now Riverpod is degenerating quickly, becoming more and more complex and abstratc. So in my opinion Provider gets more interesting again as an alternative to Riverpod.
@mrwaseemmalik5766
@mrwaseemmalik5766 Жыл бұрын
Please fight between getx and bloc
@shahidwani6445
@shahidwani6445 Жыл бұрын
Sir make video on objectbox
@codegambit2507
@codegambit2507 2 жыл бұрын
Unit test comparison?
@CodeXdev
@CodeXdev 2 жыл бұрын
That would be whole new video..
@HammadKhanYT
@HammadKhanYT Ай бұрын
So there is no winner. Both are about the same. GetX is easy to code with, almost no boilerplate and easy syntax, get the job done. Riverpod has some boilerplate but not much.
@MoAdel92
@MoAdel92 2 жыл бұрын
we need more details on fixing janks i couldn't find good resourses
@chrisodonnell86
@chrisodonnell86 2 жыл бұрын
Next video- Fluent UI & GetX web/desktop app plsssssssss 🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙂
@CodeXdev
@CodeXdev 2 жыл бұрын
I have plans for Web and desktop application with Flutter.. will try how Fluent UI goes with it.
@chrisodonnell86
@chrisodonnell86 2 жыл бұрын
@@CodeXdev nice! Would be cool to see Fluent UI, there are a few material web/desktop vids but I haven’t seen a good fluent UI video in English yet.
@walrider7374
@walrider7374 Жыл бұрын
Small project? Provider or Riverpod Big project? Bloc Javascript bringing sh1t bad practices to Flutter? GetX
@hmathiralazad5680
@hmathiralazad5680 2 жыл бұрын
Using Get CLI with GetX -_-
@CodeXdev
@CodeXdev 2 жыл бұрын
It was love at first sight..
@naxcall
@naxcall 2 жыл бұрын
Riverpod gang 👍
@jithu8794
@jithu8794 2 жыл бұрын
Its better to switch to riverpod, getx is no longer maintained - that's a serious issue
@CodeXdev
@CodeXdev 2 жыл бұрын
Stable version 4.6.1 came 3 months back, but if you see prerelease 5.0.0 was updated 14 days back.. so it’s fine! 😉
@jailsoncarneiro4936
@jailsoncarneiro4936 2 жыл бұрын
Bacana!
@ProyectoViernes
@ProyectoViernes Жыл бұрын
Riverpod es mas flexible.
@moazahmed5388
@moazahmed5388 2 жыл бұрын
another "tie" type comparison video :/
@CodeXdev
@CodeXdev 2 жыл бұрын
tbh, we can't just say one approach is better than other.. we can only put our perspective and people will decide themselves what suits best. I tried my best to keep the points clear and tell my opinion about GetX and Riverpod. being said that both authors have done amazing job, its matter of choice what you prefer. For me GetX seems easy and quick to implement.
@moazahmed5388
@moazahmed5388 2 жыл бұрын
@@CodeXdev ik man and thanks for the video , but there is another "perspective" to mention here , Get lets you depends on it to almost easily forget what's the purpose of simple features in Flutter , like : Stateful Widgets , ScaffoldMessenger , ModalSheets , and the list goes on , i can't remember the last time i had to use a stful widget just for animation because of the TickerProviderStateMixin , i'm a Get user and GOD help me , i miss Provider tho
@toastytheloafdog
@toastytheloafdog 2 жыл бұрын
Bloc.
@saabirmohamed636
@saabirmohamed636 2 жыл бұрын
personally I've use all bloc, provider , riverpod and GETX is simply the best in my opinion, whether you just use the state management or not ....and the CLI GETX provides makes things really easy and professional even at scale. and another thing is that the Obx() widget is the coolest thing ever ...in theory you never have to have a class that is a stateful widget ever..the Obx() widget targets the build method already built into the widget itself, which ALL widgets in flutter have, by design ...think of it like this, a build method only running once only where it needs to run. so the tree gets untouched. Only that single widget that needs to update re-builds alone...(that is far more efficient and elegant) if you have a a column widget in theory no matter how many other widgets are in the column only the 1 widget you need to react inside will update...to me that's simply perfect, with so little boiler plate. give getx a try I absolutely love it. (and there is soooo much more...read the docs a few minutes of your time) In A PERFECT world , google would announce that all other state management methodologies should be deprecated and only GETx be used for for the fast targeted way it runs each widgets build method individually.
@codegambit2507
@codegambit2507 2 жыл бұрын
You should really rethink your choices if google themselves are favouring Bloc, Provider and Riverpod over Getx
@mdmahadyhasan6683
@mdmahadyhasan6683 2 жыл бұрын
@@codegambit2507 there is a reason why getx has so many likes :)
@codegambit2507
@codegambit2507 2 жыл бұрын
@@mdmahadyhasan6683 yeah because it's easier for beginners to get started with Getx as a state management in flutter. Most devs who have been using flutter for at least 2 years would never pick Getx over Riverpod. No Google dev will ever pick Getx over Riverpod. That should tell you something.
@codegambit2507
@codegambit2507 2 жыл бұрын
@@mdmahadyhasan6683 polularity alone shouldn't be your only reason of choosing something
@mdmahadyhasan6683
@mdmahadyhasan6683 2 жыл бұрын
@@codegambit2507 well im using flutter since beta days. I have used provider , bloc , getx , riverpod and getx is the most convenient for me for production application. Its easy with get_cli , built in mvc architecture and have loads of utilities that otherwise has to be installed via pub. No google dev will pick getx ? are u a google dev or something? dont assume anything without concrete proof.
@Trancecend
@Trancecend 2 жыл бұрын
Just be aware that global scoped ANYTHING is a horrible practise in programming. It's akin to static calls: Anything is accessable by everything. So 👎🏻 riverpod. For both I'm calling YAGNI: en.wikipedia.org/wiki/You_aren%27t_gonna_need_it
100x faster with GET_CLI || flutter setup tutorial
9:44
BLoC Pattern with Flutter || State Management
22:50
CodeX
Рет қаралды 96 М.
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
NER in Python: Pre-Trained & Custom Models
25:12
NeuralNine
Рет қаралды 960
Riverpod Simplified | Easy State Management
14:17
Tadas Petra
Рет қаралды 45 М.
Inspired by MKBHD | Built with Flutter - Panels App
24:24
Flutter State Management - The Grand Tour
14:07
Fireship
Рет қаралды 248 М.
The First Step To Clean Architecture | Flutter SOLID Principles
28:27
Rivaan Ranawat
Рет қаралды 21 М.
OAuth 2.0 and OpenID Connect (in plain English)
1:02:17
OktaDev
Рет қаралды 1,8 МЛН
Flutter Riverpod vs Getx | Converting to Riverpod
17:53
dbestech
Рет қаралды 6 М.
Learn Flutter Hooks and Maximize Your Code Reuse
10:36
Robert Brunhage
Рет қаралды 62 М.
Riverpod 2.0 - Complete Guide (Flutter Tutorial)
1:03:37
Reso Coder
Рет қаралды 111 М.
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН