Flutter: http post upload an image
问题 I use a web service for image processing , it works well in Postman: Now I want to make http request in flutter with Dart: import 'package:http/http.dart' as http; static ocr(File image) async { var url = '${API_URL}ocr'; var bytes = image.readAsBytesSync(); var response = await http.post( url, headers:{ "Content-Type":"multipart/form-data" } , body: { "lang":"fas" , "image":bytes}, encoding: Encoding.getByName("utf-8") ); return response.body; } but I don't know how to upload the image file,