imagepicker

How to upload multiple images to the Rest API in Flutter using HTTP?

无人久伴 提交于 2020-04-17 21:12:26
问题 I want to upload multiple images into the Rest API. I tried the below code to upload a single image to the rest API. That is working fine , for multiple image selection I'm using multi_image_picker link, how can I modified below code to upload multiple images? Thank you Future<String> uploadSingleImage(File file,String userid) async { final prefs = await SharedPreferences.getInstance(); final key = 'token'; final value = prefs.get(key ) ?? 0; String fileName = file.path.split("/").last; var

Fluter- Image picker package: show images one after another with delete action

一曲冷凌霜 提交于 2020-04-07 08:10:28
问题 In my Flutter pr project, I am using Image Picker plugin to select images from android mobile gallery or capture images with camera and show them one after another with a delete icon below each image. On tapping the RaisedButton for selecting images from the gallery, method imageSelectorGallery() is called. There inside the setState() method , I add a SizedBox and a delete icon to the List namely images_captured . I expect the images_captured to be rendered inside the Column in

Fluter- Image picker package: show images one after another with delete action

ぐ巨炮叔叔 提交于 2020-04-07 08:10:10
问题 In my Flutter pr project, I am using Image Picker plugin to select images from android mobile gallery or capture images with camera and show them one after another with a delete icon below each image. On tapping the RaisedButton for selecting images from the gallery, method imageSelectorGallery() is called. There inside the setState() method , I add a SizedBox and a delete icon to the List namely images_captured . I expect the images_captured to be rendered inside the Column in