uploadImage method
Implementation
Future<dynamic> uploadImage(
File imageFile,
) async {
FormData formData = FormData.fromMap({
'image': await MultipartFile.fromFile(
imageFile.path,
filename: basename(imageFile.path),
),
});
Response response = await _dio.post(
'/v1/images',
data: formData,
);
return response.data;
}