Want to upload file using POST request in flutter? The correct way is to use a MultipartRequest:
var uri = Uri.parse(url);
var request = new MultipartRequest("POST", uri);
var multipartFile = await MultipartFile.fromPath("package", videoPath);
StreamedResponse response = await request.send();
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.