Get StateMixin tutorial | Flutter made easy

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • Get is very powerful framework and you can achieve more with very less code.
    In this tutorial I have discussed how to manage state with StateMixin and handle different states of data loading.
    Git Source:
    github.com/afz...
    To learn more about GET_CLI watch this 👇🏼:
    • 100x faster with GET_C...
    If you like my work
    Support Me on Ko-Fi : ko-fi.com/afza...
    Join this channel to get access to perks:
    www.youtube.co...
    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

Комментарии • 26

  • @wasibhussain
    @wasibhussain 2 года назад

    such an informative tutorial with perfect audio and video quality

  • @sherdil5319
    @sherdil5319 2 года назад +3

    Can you please create a lecture on getx binding

  • @ponnivalavan4881
    @ponnivalavan4881 2 года назад +3

    why http when getx has getconnect built in ?

    • @ernestdesbordes
      @ernestdesbordes 2 года назад +1

      @CodeX you probably have to do a tutorial on getconnect.

    • @CodeXdev
      @CodeXdev  2 года назад +1

      Indeed, I am so used to with http that I never use any other client. But, its good idea to use GetConnect as we are already in Get ecosystem.

  • @tristankluivert197
    @tristankluivert197 2 года назад +2

    What about retry, if user clicks on "something went wrong" , what function would we call? Can we call fetchComment?

    • @CodeXdev
      @CodeXdev  2 года назад +1

      Exactly, you can call controller.fetchComment on click. But, before that just change the status to RxStatus.Loading so that UI again shows shimmer effect of loading.

  • @arupnaskarbkp
    @arupnaskarbkp 2 года назад +2

    how to use multiple api call one controller?

    • @CodeXdev
      @CodeXdev  2 года назад

      StateMixin is meant for one data per view, like contact list, branch list or just one data.
      In case you want multiple data in one page, use .obs as I have described in end of this video. You may want to learn about .obs and how it updates UI

  • @user-bb8nj5uw3z
    @user-bb8nj5uw3z Год назад

    Great ❤🫡

  • @dineshfalwadiya3282
    @dineshfalwadiya3282 2 года назад

    Awesome Video

  • @renatobesson
    @renatobesson 3 месяца назад

    Which extension do you use to show inline code results? 4:10

    • @CodeXdev
      @CodeXdev  3 месяца назад +1

      It's Error Lens by Alexander

  • @defensivepower7988
    @defensivepower7988 2 года назад +1

    How can i do this with data modal?

    • @CodeXdev
      @CodeXdev  2 года назад

      Instead of List use your model

  • @Isthiyaquekambathagothi
    @Isthiyaquekambathagothi 2 года назад

    Can this be used to manage local db (sqflite) and then synchronisation to server once online ?

    • @CodeXdev
      @CodeXdev  2 года назад

      of course, you can call change method multiple times with different data and it will update UI accordingly

  • @muhammadbuhari6667
    @muhammadbuhari6667 2 года назад

    can this be use with multiple calls and different objects? For example can i have a methods that one fetchs headlines and another fetches recent posts in the same controller with the same ui?

    • @CodeXdev
      @CodeXdev  2 года назад

      StateMixin can have only one type of data.. you can create separate observable for the purpose you mentioned.

    • @muhammadbuhari6667
      @muhammadbuhari6667 2 года назад +1

      @@CodeXdev That's too bad

    • @gilangs8484
      @gilangs8484 Год назад

      @@CodeXdev do you have any example for this? thanks!

  • @xeno7828
    @xeno7828 Год назад

    i wonder .. is GetX 5 stable version really would be ready soon ?)

    • @CodeXdev
      @CodeXdev  Год назад

      Even i am curious to see that. If it keeps delaying like this we might need to think for other options

  • @cruisetom5838
    @cruisetom5838 2 года назад +1

    where is github url ?

    • @CodeXdev
      @CodeXdev  2 года назад

      Thanks for reminding, added in description 👍🏼