Тёмный

#23 || Flutter GetX Tutorial || Fetch API Data with GetConnect & StateMixin in GetX 

Ripples Code
Подписаться 14 тыс.
Просмотров 33 тыс.
50% 1

Support : paypal.me/ripp...
In this video I have discuused about GetConnect and StateMixin.
API link
============
randomuser.me/...
Github Link of Project
=======================
github.com/Rip...
#GetX #RipplesCode #GetConnect

Опубликовано:

 

10 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 74   
@LeagueRandomPlayer
@LeagueRandomPlayer 3 года назад
Your explanation is very complete, its the way i like to be taught, with a LOT of explanation. You Sr have your like and please keep this coming specially getX ones
@ripplescode
@ripplescode 3 года назад
Hey Thanks buddy.
@ebenezerferguson3756
@ebenezerferguson3756 3 года назад
Really good tutorial. One thing though, can you use a less distracting theme for your computer next time please.?
@user-vn8fb6iy7h
@user-vn8fb6iy7h 9 месяцев назад
Thanku so much sir , I have implemented getx in my projects by learning from your videos
@thisaragunasekara924
@thisaragunasekara924 2 года назад
After clone the project it says my app is not defind that error occurs in test folder under widget test dart Im.using flutter 2.51
@thisaragunasekara924
@thisaragunasekara924 2 года назад
Also in user models .dart There is a msg says List is deprecated and shouldnt use. How to fix this
@thisaragunasekara924
@thisaragunasekara924 2 года назад
Resolved it
@leobudihartokusumo2049
@leobudihartokusumo2049 2 года назад
At the model dart file generated, you must manually change the "Class ?" into "Info ?" or "Name ?" or "Dob ?" according to the classes name created by get_cli 1.6.0 (see the below part of the model dart file). Somehow the get generate model can create the correct Info class, Name class, Dob class etc but can not MAP them correctly into their class definition name at the top part of the model dart file (it just simply write it as "Class ?" which mean we must look at the correct corresponding "class name" in the bottom part of the model dart file). Example: Change "manually by yourselves" the: Class? info Class? login; Class? dob; Class? registered; into Info? info Login? login; Dob? dob; Dob? registered; then it will work. Notice that the dob and registered json sample file have exactly the same data structure so the get_cli only make 1 new class called "Dob class" so you have to use Dob for "dob" variable and also for "registered" variable (the get_cli is smart enough not making new "Registered class" as it detect it have the same data structure as the "Dob class" it already made inside the model dart file). Also, add "!" (the null check) in some part of the model dart file created by get_cli (as get_cli somehow maybe not fully comply yet with the "null safety" feature of the new flutter version. Example: at: results.add(Results.fromJson(v)); change it into results!.add(Results.fromJson(v)); After doing the two things above then the model dart file will no longer produce errors.
@bhaskarmahajan98
@bhaskarmahajan98 3 года назад
Why did we create user_model.dart as it was not used anywhere as we directly used the UserProvider ? (or was there some under the hood things done by GetX to use that model which I did not get ) ?
@salahadindinsafa7657
@salahadindinsafa7657 2 года назад
an essential thing in a simple way thanks omer
@ripplescode
@ripplescode 2 года назад
It's not omer it's Amar
@veedfriendforever5990
@veedfriendforever5990 3 года назад
sir please use model also with this use create but not use mode you directly call the properties from response. so please make it also we can understand. and up to this you r really very important. regard getx and flutter to all the viewers thank you.
@ripplescode
@ripplescode 3 года назад
Ok
@amirvahedix_dev
@amirvahedix_dev 2 года назад
So useful, thanks for this great playlist!
@ZahraAfa
@ZahraAfa Год назад
you saved my life!!!
@edimulyono5475
@edimulyono5475 3 года назад
can modify the loading indicator?? example i want to modify loading indicator become shimmer
@ripplescode
@ripplescode 3 года назад
In the view you can use onLoading parameter to use your custom loading indicator
@thisaragunasekara924
@thisaragunasekara924 2 года назад
Can you please provide a link i also trying to add loading idicator but cant I make true is loading in provider and try to add it to the home view class under body.obx and also above return card but not working
@panchalravi5838
@panchalravi5838 2 года назад
Superb Explain 😎💻📲🔥
@hafiztouseef6184
@hafiztouseef6184 Год назад
what type of pattern is it ? can we relate it wih mvvm?
@sale7680
@sale7680 Год назад
❤❤❤❤❤
@kanam8704
@kanam8704 2 года назад
Hi there, is it possible to use Chapter 21's approach to handle this API ?
@Ghar_ka_khana1831
@Ghar_ka_khana1831 2 года назад
how to send post request with GetConnect suppose like signup/register, please answer. I'm in bit of confusion.
@ripplescode
@ripplescode 2 года назад
Please refer my todo app videos in GetX playlist
@TheMRTIMBUK2
@TheMRTIMBUK2 3 года назад
Sir what is purpose of making user_model.dart ? my app will work without it? Sir Please explain
@ripplescode
@ripplescode 3 года назад
I have not used the model in the example...just discussed how to create that...but if you want to use you can
@TheMRTIMBUK2
@TheMRTIMBUK2 3 года назад
@@ripplescode Sir Thank You for reply. Now i understand.
@prakashgoswami2765
@prakashgoswami2765 3 года назад
Wonder full explanation. Please make a video for CRUD operation using StateMixin and GetConnect.
@ripplescode
@ripplescode 3 года назад
Ok
@Takemetechnically
@Takemetechnically 3 года назад
How to use this code with multiple URL api ?
@edwinjacobjoy2080
@edwinjacobjoy2080 3 года назад
have you used the model of the JSON? Connecting getconnect to model
@karemzky
@karemzky 3 года назад
Wonderful, really wonderful
@leobudihartokusumo2049
@leobudihartokusumo2049 2 года назад
@@zaidbashir2001 At the model dart file generated, you must manually change the "Class ?" into "Info ?" or "Name ?" or "Dob ?" according to the classes name created by get_cli 1.6.0 (see the below part of the model dart file). Somehow the get generate model can create the correct Info class, Name class, Dob class etc but can not MAP them correctly into their class definition name at the top part of the model dart file (it just simply write it as "Class ?" which mean we must look at the correct corresponding "class name" in the bottom part of the model dart file). Example: Change "manually by yourselves" the: Class? info Class? login; Class? dob; Class? registered; into Info? info Login? login; Dob? dob; Dob? registered; then it will work. Notice that the dob and registered json sample file have exactly the same data structure so the get_cli only make 1 new class called "Dob class" so you have to use Dob for "dob" variable and also for "registered" variable (the get_cli is smart enough not making new "Registered class" as it detect it have the same data structure as the "Dob class" it already made inside the model dart file). Also, add "!" (the null check) in some part of the model dart file created by get_cli (as get_cli somehow maybe not fully comply yet with the "null safety" feature of the new flutter version. Example: at: results.add(Results.fromJson(v)); change it into results!.add(Results.fromJson(v)); After doing the two things above then the model dart file will no longer produce errors.
@Lensbreak
@Lensbreak 3 года назад
awesome
@nikhilkukreja8498
@nikhilkukreja8498 3 года назад
Can You please make a example how can i return List because i was trying but facing issues
@kundankumar-pv9gz
@kundankumar-pv9gz 3 года назад
Sir We creat api call in controller so why we need to create getx provider please reply me I am confused....
@ripplescode
@ripplescode 3 года назад
In GetX provider we write the code to get the data from server...from controller we call the function declared in provider and use that data in our UI.
@AkbarAli-sn8dg
@AkbarAli-sn8dg 2 месяца назад
What is the use of stateMixin🤔
@stackflow4007
@stackflow4007 Год назад
Thanks! Instead of List, Can you use List ?
@ripplescode
@ripplescode Год назад
Go through entire playlist...I have used List as well.
@omerekelly6989
@omerekelly6989 2 года назад
i am geting this error type string is not a subtype of type int of index
@omerekelly6989
@omerekelly6989 2 года назад
nvm. i fixed it
@DelgadoRecords
@DelgadoRecords 3 года назад
Nice video! A tutorial about how to use bindings would be great
@techzone2009
@techzone2009 3 года назад
Why get cli tool generating model class without null safety ?? I have to use freeze package 🙏
@ripplescode
@ripplescode 3 года назад
Yes.. there is some problem
@techzone2009
@techzone2009 3 года назад
@@ripplescode can we generate freezed model class with getx cli
@ripplescode
@ripplescode 3 года назад
Never tried...will give a try.
@techzone2009
@techzone2009 3 года назад
@@ripplescode thanks
@TipsUNIX
@TipsUNIX 3 года назад
I waiting this toturial bro. Make with mvvm architecture. Share also the source if you can. Thanks you
@ripplescode
@ripplescode 3 года назад
Check description
@TipsUNIX
@TipsUNIX 3 года назад
@@ripplescode thanks you 👍
@tristankluivert197
@tristankluivert197 3 года назад
What if I don't want to use the default progress bar
@ripplescode
@ripplescode 3 года назад
body: controller.obx( (state)=>Text(state.yourField), onLoading: CustomLoadingIndicator(), onEmpty: Text('No data found'), onError: (error)=>Text(error), ), );
@karemzky
@karemzky 3 года назад
i try to parse news api with getx like your video , i make all steps as the video but i got this error ( xml http request error )
@leobudihartokusumo2049
@leobudihartokusumo2049 2 года назад
Do you also face problems when creating a model dart file using the "get generate model with..." from the command line? (that is the model dart file created is showing error here and there, this is using get_cli 1.6.0 and flutter 2.5.1)
@ripplescode
@ripplescode 2 года назад
I think you are getting errors because of null safety...
@tristankluivert197
@tristankluivert197 2 года назад
What about a custom class rather than list dynamic
@RafaelDurelli
@RafaelDurelli 3 года назад
Nice content. Terrible android studio theme lol 😂 😂
@vanaybui8037
@vanaybui8037 3 года назад
Good video! Can you make a video getx with flutter_downloader package?
@MoAdel92
@MoAdel92 3 года назад
Getconnect vs dio Which to use?
@ripplescode
@ripplescode 3 года назад
Whatever you want
@forktrader7870
@forktrader7870 2 года назад
Please a make video of GetStream api with this api
@sharifrobin170
@sharifrobin170 3 года назад
This is a very informative video, I loved it. I also practiced it. But I have a problem. What I have to do if I want to call another request and it will change the view immediately which means it will do the same thing. I tried so many ways but can't implement it. Could you please give me some instructions? I really need your instruction please. Thank you
@ripplescode
@ripplescode 3 года назад
Thanks for liking the video....but I didn't get your question completely. Please refer Todo app in GetX play list...I hope you will get the answer.
@sharifrobin170
@sharifrobin170 3 года назад
@@ripplescode Thank you for replaying me. This is my view Architecture - Scaffold |__body |__Column |__[ List of Categories Button ] |__[ List of Products ] N.B: parent widget controller.obx() Functionality - # At the beginning it will show some random products in the [List of products] view section. # When clicking a category buttoon from the list of categories button, it must show that related protects in [List of products] view section. It is easy without using StateMixin but iI want to do it with StateMixin because I think It follows DRY [Do not repeat yourself]. But the problem is when I click the "Categories Button" it does not reflect the UI. But in the backend, it actually fetches the data from the database. I am really sorry for the long explanation hopefully it makes sense to you. If it's not clear to you, could I have your email for more explanation if you want to. Really Getx makes my life so easy. Thank you again.
@ripplescode
@ripplescode 3 года назад
Can you share the dummy code to ripplescode@gmail.com...instead of database just load the data from local JSON file and send it to me....in my spare time, I will surely check.
@sharifrobin170
@sharifrobin170 3 года назад
@@ripplescode Thank you so much. I already send an email to you.
@ripplescode
@ripplescode 3 года назад
I received your mail....I will definitely give a look at your project in my spare time.
@leobudihartokusumo2049
@leobudihartokusumo2049 2 года назад
why my comment got deleted?
@ripplescode
@ripplescode 2 года назад
For your kind information I have not deleted any comments of yours.
@leobudihartokusumo2049
@leobudihartokusumo2049 2 года назад
@@ripplescode I have written like 3 comments before and it is gone... Well, I am sorry if maybe there is some misunderstanding between us. I just try to help the community here to find a fix for the tutorial that might not work with the newer flutter version. 1 thing I want to ask is, did you have to edit manually the model dart file generated by the get generate model when making this tutorial video? or not? It seems the new get_cli and new flutter version if used with the same json data file will not produce the same result as in your video Sir (it will need some "manual editing" again so the model dart file result does not generate errors, and it is not just because of the null safety, it is because the get_cli get generate model can not map correctly the "class name")
@ains100
@ains100 2 года назад
no entendi un pingo
Далее