postRequest method
common POST request call
Implementation
Future<dynamic> postRequest(String path, Map<String, String?> data) async {
Uri url = Uri.https(AppConstants.apiEndPoint, path);
String body = json.encode(data);
return _http.post(
url,
body: body,
headers: <String, String>{
'Authorization': AppConstants.apiKey!,
'Content-Type': 'application/json',
},
);
}