GetX vs Riverpod | Which is better with Flutter❓

SdĂ­let
VloĆŸit
  • čas pƙidĂĄn 9. 07. 2024
  • I studied both the packages in detail and made a comparison video to understand which one is better state management tool with Flutter.
    Chapters đŸ‘‡đŸŒ
    0:00 - Introduction
    0:28 - Size comparison
    4:05 - Performance comparison
    11:15 - Code comparison
    If you like my work
    Buy me coffee on : ko-fi.com/afzalali15
    Join this channel to get access to perks:
    czcams.com/users/CodeXDevjoin
    Gears ========
    Camera 📾 || Canon 250D : amzn.to/34isdKr
    Mic đŸŽ€ || Maono AU-04 : amzn.to/341g9wS
    #CodeX
    Connect with me on social media:
    FB: / codexdevs
    Twitter: / afzalali_dev
    LinkedIn: / afzalali15
    Discord: / discord

Komentáƙe • 139

  • @devio9699
    @devio9699 Pƙed rokem +13

    I just published a financial application developed with GetX. I don't feel any issues with GetX till now.

    • @CodeXdev
      @CodeXdev  Pƙed rokem +6

      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.

  • @faizandarwesh7867
    @faizandarwesh7867 Pƙed rokem +1

    Awesome content. These internal details are so helpful. Thanks a lot.

  • @pranavkhote
    @pranavkhote Pƙed 2 lety +24

    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  Pƙed 2 lety +3

      Thats why its most liked package on pub.dev

    • @ajaykotiyal427
      @ajaykotiyal427 Pƙed rokem

      Highly commercial Apps use BloC - I think. Because it is more organized.

    • @MuhammadZeeshan-uc2bg
      @MuhammadZeeshan-uc2bg Pƙed rokem +1

      @@ajaykotiyal427 which specific commercial app you personally know that uses Bloc? :)

    • @saqibshafin
      @saqibshafin Pƙed rokem +1

      @@MuhammadZeeshan-uc2bg 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 Pƙed rokem

      @@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

  • @mohamdjamal6266
    @mohamdjamal6266 Pƙed 2 lety

    Hi when we need nested navigation, so i case i develop Ecommerce for web and bobile?

  • @vibhor691
    @vibhor691 Pƙed rokem +12

    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  Pƙed rokem +2

      I totally agree with you, we should know how Flutter works with context.

    • @Mfbzai
      @Mfbzai Pƙed rokem

      How about provider, is it same?

    • @BrunoCodeman
      @BrunoCodeman Pƙed rokem +3

      @@Mfbzai provider is kinda the old version of riverpod.

    • @arieagung
      @arieagung Pƙed 10 měsĂ­ci

      GetX is how flutter framework should be.

    • @Apenschi
      @Apenschi Pƙed 5 měsĂ­ci

      @@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.

  • @saeedrazazzadeh9114
    @saeedrazazzadeh9114 Pƙed 2 lety

    Thank you for your videos
    Best regard...

  • @pragnabhatt9531
    @pragnabhatt9531 Pƙed rokem

    excellent explanation

  • @hoekbrwr
    @hoekbrwr Pƙed 2 lety +3

    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.

  • @tripurarishankartiwari3698

    good comparison, both good

  • @thegospellight
    @thegospellight Pƙed 2 lety

    good videos. thanks

  • @nthonyproblgomez9659
    @nthonyproblgomez9659 Pƙed 2 lety

    Thanks for the video. ❀ From Bangladesh

  • @noman7776
    @noman7776 Pƙed 2 lety

    Thanks Afzal, which vscode theme are you using ?

  • @ibrahemtaha8177
    @ibrahemtaha8177 Pƙed 2 lety +1

    amazing video!! many thanks for sharing! đŸ”„đŸ”„đŸ”„
    how about Bloc vs Getx vs Redux flutter?
    Thanks in advance!
    🙏

  • @user-wr4yl7tx3w
    @user-wr4yl7tx3w Pƙed 2 lety +1

    Should using GetX create issues with iOS simulator? Not sure if I ran into issues that was connected to GetX.

    • @CodeXdev
      @CodeXdev  Pƙed 2 lety +1

      Nope, GetX has nothing to do with it! May be its ur system?

  • @buck-johnson
    @buck-johnson Pƙed 2 lety +16

    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.

  • @jaimepremy
    @jaimepremy Pƙed 2 lety +15

    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.

  • @ajaykotiyal427
    @ajaykotiyal427 Pƙed rokem +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.

  • @chrisodonnell86
    @chrisodonnell86 Pƙed 2 lety

    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  Pƙed 2 lety +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 Pƙed rokem

      Thanks i get it

  • @ai_malllu
    @ai_malllu Pƙed 2 lety +1

    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  Pƙed 2 lety +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 Pƙed 2 lety

      @@CodeXdev thanks bro & your contents are much helpful..waiting for more

  • @user-nu2nj7mf2z
    @user-nu2nj7mf2z Pƙed 2 lety +2

    Hey Afsal. Make a Getx Controller in separated package please
    it looks very nice for managing state option

  • @arunflik6943
    @arunflik6943 Pƙed rokem

    which is better for ecommerce app development getx or provider or riverpod or Bloc ?

    • @atati
      @atati Pƙed rokem

      They all have their downsides and advantages, depends with what exactly you want to achieve

  • @7mada89
    @7mada89 Pƙed 2 lety +13

    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  Pƙed 2 lety +1

      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.

  • @1kjm
    @1kjm Pƙed 2 lety +2

    Can you benchmark riverpod against redux?

  • @tiktik1516
    @tiktik1516 Pƙed 2 lety

    Neat mahn...Flutter community!

  • @rahulagarwal968
    @rahulagarwal968 Pƙed rokem

    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 Pƙed 10 měsĂ­ci +2

      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 Pƙed 5 měsĂ­ci

      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.

  • @Isthiyaquekambathagothi
    @Isthiyaquekambathagothi Pƙed 2 lety

    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  Pƙed 2 lety +1

      Single answer for all of ur question:
      Its not possible!
      You need MacOS đŸ–„ with XCode installed to build iOS app.

    • @Isthiyaquekambathagothi
      @Isthiyaquekambathagothi Pƙed 2 lety

      @@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

  • @jrheisler
    @jrheisler Pƙed 2 lety +5

    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 Pƙed 5 měsĂ­ci

      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!

  • @abror_khurramov
    @abror_khurramov Pƙed 2 lety +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  Pƙed 2 lety

      Yeah, I should have used it.. but while recording I missed it

    • @kecudotcom
      @kecudotcom Pƙed 2 lety

      I prefer use Getview and StateMixin. They are simple and easy to use

  • @MuhammadAdnan-vs5cx
    @MuhammadAdnan-vs5cx Pƙed 2 lety

    Bro getx v provider which is best?

    • @CodeXdev
      @CodeXdev  Pƙed 2 lety

      Whatever seems easy to you...

  • @arupnaskarbkp
    @arupnaskarbkp Pƙed 2 lety +1

    I love Getx

  • @sharathbnaik3232
    @sharathbnaik3232 Pƙed 2 lety +4

    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 Pƙed 2 lety +6

      I never see getx used in production code here in France.

    • @kecudotcom
      @kecudotcom Pƙed 2 lety +5

      in Indonesia some big tech companies use GetX.

    • @jayminpatel8753
      @jayminpatel8753 Pƙed 2 lety +1

      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 Pƙed 2 lety

      @@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 Pƙed rokem +2

      In Indonesia, I have some of my projects with my clients using GetX and it worked perfectly fine

  • @sumanmitraYTC
    @sumanmitraYTC Pƙed 2 lety +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..

  • @jailsoncarneiro4936
    @jailsoncarneiro4936 Pƙed 2 lety

    Bacana!

  • @AdamSowinski
    @AdamSowinski Pƙed rokem +3

    I would choose Riverpod over any other state management solution. Regarding GetX, the syntax look awful.

  • @laughone
    @laughone Pƙed 2 lety

    where do i get certification for free in flutter?

    • @rwuttke
      @rwuttke Pƙed rokem

      Just remember if you get it for free, then you get what you paid for.

  • @siddharthmehra5796
    @siddharthmehra5796 Pƙed 2 lety +2

    No matter what, GetX ❀

    • @CodeXdev
      @CodeXdev  Pƙed 2 lety +1

      Thats called blind love ❀ 😉

  • @shahidwani6445
    @shahidwani6445 Pƙed rokem

    Sir make video on objectbox

  • @chrisodonnell86
    @chrisodonnell86 Pƙed 2 lety +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

  • @mustafashaikh7829
    @mustafashaikh7829 Pƙed 2 lety

    What about provider.?

    • @CodeXdev
      @CodeXdev  Pƙed 2 lety +2

      Riverpod is evolved version of provider 😃

    • @devzeeshan3637
      @devzeeshan3637 Pƙed 2 lety +1

      @@CodeXdev yeah agreed đŸ‘đŸ»

    • @mustafashaikh7829
      @mustafashaikh7829 Pƙed 2 lety

      @@CodeXdev then I will stick to provider

    • @unknownunicorn1373
      @unknownunicorn1373 Pƙed 2 lety +1

      @@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  Pƙed 2 lety

      @@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.

  • @chrisodonnell86
    @chrisodonnell86 Pƙed 2 lety

    Next video- Fluent UI & GetX web/desktop app plsssssssss đŸ™đŸ»đŸ™đŸ»đŸ™đŸ»đŸ™đŸ»đŸ™đŸ»đŸ™‚

    • @CodeXdev
      @CodeXdev  Pƙed 2 lety +1

      I have plans for Web and desktop application with Flutter.. will try how Fluent UI goes with it.

    • @chrisodonnell86
      @chrisodonnell86 Pƙed 2 lety

      @@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.

  • @zakariahossain3455
    @zakariahossain3455 Pƙed 2 lety +1

    What about unit testing comparison?

  • @mazenalsakkaf
    @mazenalsakkaf Pƙed 2 lety +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  Pƙed 2 lety +1

      No doubt.. Riverpod is a good library.

    • @Apenschi
      @Apenschi Pƙed 5 měsĂ­ci

      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 Pƙed rokem

    Please fight between getx and bloc

  • @tiktik1516
    @tiktik1516 Pƙed 2 lety +2

    Getx is very simple and calm.. don't need any high logic and pro methods.

    • @CodeXdev
      @CodeXdev  Pƙed 2 lety

      indeed its simple and very productive.

  • @bayhasaroob2912
    @bayhasaroob2912 Pƙed 2 lety

    you need more info about riverpod ,most of information in last section was wrong

    • @CodeXdev
      @CodeXdev  Pƙed 2 lety

      Successfully read and ignored 😬

  • @hajajmaor
    @hajajmaor Pƙed 10 měsĂ­ci

    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.

  • @intuneknight9681
    @intuneknight9681 Pƙed 2 lety +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 ?

  • @MoAdel92
    @MoAdel92 Pƙed 2 lety

    we need more details on fixing janks
    i couldn't find good resourses

  • @codegambit2507
    @codegambit2507 Pƙed 2 lety

    Unit test comparison?

    • @CodeXdev
      @CodeXdev  Pƙed 2 lety

      That would be whole new video..

  • @dolbysoundsofficial9323
    @dolbysoundsofficial9323 Pƙed 2 lety +1

    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  Pƙed 2 lety

      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.

  • @DholaSain
    @DholaSain Pƙed rokem +1

    Why people hate GetX sooo much?

  • @sosualfred
    @sosualfred Pƙed 2 lety +8

    GetX Wins once again.

  • @naxcall
    @naxcall Pƙed rokem

    Riverpod gang 👍

  • @hmathiralazad5680
    @hmathiralazad5680 Pƙed 2 lety

    Using Get CLI with GetX -_-

    • @CodeXdev
      @CodeXdev  Pƙed 2 lety

      It was love at first sight..

  • @walrider7374
    @walrider7374 Pƙed rokem

    Small project? Provider or Riverpod
    Big project? Bloc
    Javascript bringing sh1t bad practices to Flutter? GetX

  • @jithu8794
    @jithu8794 Pƙed 2 lety +2

    Its better to switch to riverpod, getx is no longer maintained - that's a serious issue

    • @CodeXdev
      @CodeXdev  Pƙed 2 lety +4

      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! 😉

  • @ProyectoViernes
    @ProyectoViernes Pƙed rokem

    Riverpod es mas flexible.

  • @toastytheloafdog
    @toastytheloafdog Pƙed 2 lety

    Bloc.

  • @moazahmed5388
    @moazahmed5388 Pƙed 2 lety

    another "tie" type comparison video :/

    • @CodeXdev
      @CodeXdev  Pƙed 2 lety

      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 Pƙed 2 lety

      @@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

  • @saabirmohamed636
    @saabirmohamed636 Pƙed 2 lety +8

    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 Pƙed 2 lety +2

      You should really rethink your choices if google themselves are favouring Bloc, Provider and Riverpod over Getx

    • @mdmahadyhasan6683
      @mdmahadyhasan6683 Pƙed 2 lety

      @@codegambit2507 there is a reason why getx has so many likes :)

    • @codegambit2507
      @codegambit2507 Pƙed 2 lety

      @@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 Pƙed 2 lety +2

      @@mdmahadyhasan6683 polularity alone shouldn't be your only reason of choosing something

    • @mdmahadyhasan6683
      @mdmahadyhasan6683 Pƙed 2 lety +5

      @@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 Pƙed rokem

    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