In this example I used Flutter Dio package to fetch API data from server with the help of GetX state management.
This example is the 3rd part of GetX tutorial series that contains the following titles:
- Adding Dio package to the app
- Creating a reusable API request class
- Making dart model from json
- Fetching API data
- Changing API json data to dart model list
- Creating a list view
- Working with List view items (Custom component)
- Adding icons buttons (Bonus)
Watch the tutorial video in Youtube: https://youtu.be/kZshnobUQLA
- Flutter GetX Package: https://pub.dev/packages/get
- Flutter Dio Package: https://pub.dev/packages/dio
- API Example: https://jsonplaceholder.typicode.com
- Json to Dart Converter: https://javiercbk.github.io/json_to_dart
Watch previous parts:
- Flutter GetX - Project Scaffolding: https://youtu.be/TbSSNd2ZevU
- Flutter GetX - Bottom Navigation Bar: https://youtu.be/G9EnOCpuCrw
Previous parts source codes:
- Flutter GetX - Project Scaffolding: https://github.com/TeamArtisansDev/flutter-getx-scaffolding-example
- Flutter GetX - Bottom Navigation Bar: https://github.com/TeamArtisansDev/flutter-getx-bottom-navigation-example
- Clone the repository
git clone git@github.com:TeamArtisansDev/flutter-getx-api-dio-example.git
- Navigate to cloned folder
cd flutter-getx-api-dio-example
- Get packages using
flutter pub get
- Run
flutter run
Website: https://teamartisans.com
Facebook: https://facebook.com/TeamArtisans
Twitter: https://twitter.com/TeamArtisans
Instagram: https://instagram.com/TeamArtisans
Medium: https://medium.com/TeamArtisans
Linkedin: https://linkedin.com/company/TeamArtisans
Email: contact@teamartisans.com