Native Shopify Mobile App with 20 new features
Kickstart your hyperlocal marketplace in Corona pandemic with a starter guide
Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 18.104.22.168 release ready!
Owner and Founder. Opencart
Retrofit API call without Future Builder is used to call Rest API.
we can use it for sending dynamic headers, parameters, requests & responses in a more secure way.
In mobile app development connecting with the server(via API) to store or fetch the data is the most basic requirement.
So, in today’s blog, we check the Retrofit API call without Future Builder.
I hope we are all familiar with it, but we are not using Future Builder.
FutureBuilder is a widget by Flutter which lets you determine the current state of the Future.
Here we have discussed another approach of calling Rest API without Future Builder in Retrofit.
Now, run the command “flutter pub get” to download the dependencies.
Right now, we will observe some errors in the file in part “api_client4.g.dart” and ApiClient1.
We need to run the command to generate an “api_client4.g.dar” file.
flutter pub run build_runner build
The above command will generate the api_client4.g.dart file. We should never modify the code in the api_client4.g.dart file by hand.
Therefore if we made any changes in ApiClient1. So we need to run the command to update the part file.
Please find below the complete code for main.dart class.
Finally, we can run the code and as a result, we can see the below output.
In this blog, we have discussed Retrofit API calling without using Future Builder.
I hope it will help you out in understanding and getting a brief idea about it.
Similarly, for more interesting blogs check out here – https://mobikul.com/blog/
Thank you for reading!!
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
Great Product, Great Team, and Great Support Service. And if you want to add more features to the product, they can submit any idea that comes to your mind. They really care about their clients and we are really happy and honored to deal with Webkul.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.