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
such an informative tutorial with perfect audio and video quality
Can you please create a lecture on getx binding
why http when getx has getconnect built in ?
@CodeX you probably have to do a tutorial on getconnect.
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.
What about retry, if user clicks on "something went wrong" , what function would we call? Can we call fetchComment?
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.
how to use multiple api call one controller?
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
Great ❤🫡
Awesome Video
Which extension do you use to show inline code results? 4:10
It's Error Lens by Alexander
How can i do this with data modal?
Instead of List use your model
Can this be used to manage local db (sqflite) and then synchronisation to server once online ?
of course, you can call change method multiple times with different data and it will update UI accordingly
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?
StateMixin can have only one type of data.. you can create separate observable for the purpose you mentioned.
@@CodeXdev That's too bad
@@CodeXdev do you have any example for this? thanks!
i wonder .. is GetX 5 stable version really would be ready soon ?)
Even i am curious to see that. If it keeps delaying like this we might need to think for other options
where is github url ?
Thanks for reminding, added in description 👍🏼