post function

void post(
  1. {String url,
  2. Map<String, dynamic> json}
)

This is the class that makes the post request

Implementation

void post({String url, Map<String, dynamic> json}) {
  http.post(url, headers: <String, String> {
    'Content-Type': 'application/json; charset=UTF-8',
    },
    body: jsonEncode(
      json,
    ),
  );
}