Networking in Flutter using Dio

A Flutter app for demonstrating how to perform network requests using the Dio package

This is a sample Flutter app for demonstrating how to perform network requests using the Dio package. For this demo API provided by REQ | RES is used.

The functionalities of Dio showcased in this app are as follows:

  • GET request
  • POST request
  • PUT request
  • DELETE request
  • Base options
  • Uploading files
  • Interceptors

Demonstration

Request Type Demo
GET A Flutter app for demonstrating how to perform network requests using the Dio package
POST A Flutter app for demonstrating how to perform network requests using the Dio package
PUT A Flutter app for demonstrating how to perform network requests using the Dio package
DELETE A Flutter app for demonstrating how to perform network requests using the Dio package

Packages

The packages used in this app are as follows:

Add them to your pubspec.yaml file like this:

dependencies:
  dio: ^4.0.0
  json_annotation: ^4.0.1

dev_dependencies:
  json_serializable: ^4.1.3
  build_runner: ^2.0.4

GitHub

https://github.com/sbis04/dio_networking

Entradas similares

Deja una respuesta