suppose you have to upload image to the Server using MultipartFile for a single key like "image". you can easily can do it but if you have different types of keys for file like "image", "logo", "banner" etc so how can you handle this for different types keys..
it is working for single key like "image"
final request = http.MultipartRequest('PUT', url,);
request.fields.addAll(body.toMap());
request.headers.addAll(headers);
if (body.image.isNotEmpty) {
final file = await http.MultipartFile.fromPath('image', body.image);
request.files.add(file);
}