i found a solution that worked for me.
Here's the correct way of Sending an Authenticated API Request with a file.
var request = http.MultipartRequest("POST", Uri.parse("<URL>"));
//add Headers
request.headers['Api-Key'] = 'Your API key';
//create multipart using filepath, string or bytes
var pic = await http.MultipartFile.fromPath("image", file.path);
//add multipart to request
request.files.add(pic);
var response = await request.send();
var responseData = await response.stream.toBytes();
var responseString = String.fromCharCodes(responseData);
print(responseString);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…