flutter-image

Flutter how to change image after onTap with Gesture Detector

≡放荡痞女 提交于 2021-02-10 18:23:24
问题 I have a Image inside a GestureDetector widget. I want to change this image when onTapDown is called, and then change it again when onTapUp is called. Is there possible to do that? In other app (Native Android app with java), I used to do it using a button and changing its background with a selector xml, like this: <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_focused="true" android:state_pressed="false" android:drawable="@drawable/image1" /> <item

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

How to load Image widgets from ByteData in Flutter

这一生的挚爱 提交于 2020-01-25 09:57:08
问题 The multi_image_picker: 2.4.11 plugin returns a List<Asset> , each Asset having an imageData property that is a ByteData . How can I show these in Flutter? 回答1: You can use the Image.memory constructor. List<Asset> assets = ...; // use multi_image_picker to get the assets return ListView.builder( padding: EdgeInsets.all(8.0), itemExtent: assets.length, itemBuilder: (BuildContext context, int index) { return Image.memory(assets[index].imageData.buffer.asUint8List()); }, ); 来源: https:/

How to change a image file to thumbnail while keeping original file in flutter

浪子不回头ぞ 提交于 2019-12-11 07:47:01
问题 I need to take a picture from my camera app and upload the photo to my firebase storage. In the same time I also need to upload the thumbnail version of same image file. I need to fetch the url of the image and store it to database. I am new to firebase and working for a college project. I need thumbnail so that when loading the image, first i need to load the thumbnail and as per condition i will load the full size image Future getImage() async{ var tempImage = await ImagePicker.pickImage