Config Http Request with Flutter and Make Request (Get, Post, Put, Delete)
in sure it will help you in development with Flutter..!
To do request from flutter app you have a package/library called http Dart you can install it by command
with pub:
$ pub get
with Flutter:
$ flutter pub get
Or by just add this line in you root pubspec.yaml
dependencies: http: ^0.12.1
now after this you will just have to import this library in file
import ‘dart:convert’ as convert;
import ‘package:http/http.dart’ as http;
- convert is for decode response in json format.
2. and http is for requests
for development you have to make request https and for that you can use ngrok to make request http on localserver
Get Method:
Post Method:
Put Method
Delete Method
I hope it give you some information..!
you Tube channel : https://www.youtube.com/channel/UCkaoWtBz6ioLbNwRzIco5Yg