networking in flutter using dio
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 | |
post | |
put | |
delete |
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
Comments are closed.