postMultipartData method
Implementation
Future<Response?> postMultipartData(String endpoint,
{Map<String, dynamic>? headers,
required File file,
required String paramName,
required String filename}) async {
final Map<String, MultipartFile> multipartData = {
paramName:
await MultipartFile.fromFile(file.uri.path, filename: filename),
};
final formData = FormData.fromMap(multipartData);
return postData(endpoint, formData, headers: headers);
}