cannot display images from api response flutter - flutter

"poster_path": "/9gk7adHYeDvHkCSEqAvQNLV5Uge.jpg"
what should I use to display images like this?
I tried to use image network widget but it didn't work

if you are storing the image locally, you have to go to the pubspec.yaml file and change the dependencies for the assets. if you want to load it from a url in the internet, you can use Image.network(url) .

Related

flutter-web) how to capture whole screen and save it to gallery

I am running a project with a flutter web
and i need to capture whole screen and save it directly to gallery or photos
but the methods and packages what I have used downloads only as a file
does anyone knows some packages or methods to capture screen and save directly to the gallery??
Do you try this package: ScreenShot

How to use image_cropper in flutter web?

It's said in the description of the package that is supports web. But since it's not possible to get path of the file in flutter web I can't to use it. Because the only way to work with this package is to provide path of the image
I looked at the example and you have to use Image.network instead of Image.file on web.
Then you can pass in the url to the image like this:
Image.network(
url,
);
if you what to crop image than check out crop_image package

how to: save image data to gallery [Flutter]

I have 1 question:
I use a library and it returns the Image data type, so how do I save or share the image in the library of my device?
code:
Image image = await HmsScanUtils.buildBitmap(request);
https://pub.dev/packages/gallery_saver
This plugin saves images and videos to gallery/photos.
You need to provide a path to the file that you want to save like below:
GallerySaver.saveImage(path)
You can use this package
https://pub.dev/packages/gallery_saver.
If you dont understand any documentation given on this page then you can simply follow the following tutorial by Johannes
https://www.youtube.com/watch?v=JILcQLZvjKE

Picked gallery Image path flutter

I'm working on a app where I would like to get the local path of the selected/picked image from my mobile gallery instead of image_picker path. I have used image _picker to pick an image from the gallery. When I print the path of the selected image it showing something like this /data/user/0/coffy.testapp/cache/image_picker5380473371212438250.jpg instead I need a path of the image like /data/emulated/downloads/021545.png (The path I can see in my mobile when I click the image details of a particular image);
You need to access local storage and select from there.
https://flutter.dev/docs/cookbook/persistence/reading-writing-files
https://pub.dev/packages/path_provider

ANDROID : Loading Image From link stored in mysql db in imageview?

I want to load image in card view with other data like title and desc.
I am uaing php to get result as json response which is working and also i am able to set data to textview and pass from one activity to other !
Only problem i am facing is in setting image in image view.
i can add image manually by making listview obj and storing link in ArrayList obj
Like obj.add(R.drawable.feature1.jpg)
How to do it dynamically from the json response i am getting ?
Sorry if i sound confusing as i am new to android and just want to make a image gallery where first i will display list of albums and after clicking one of albums all images from that albums are loaded and displayed.
{"products":[{"mid":"1","title":"Demo Video 1","link":"https:\/\/m.youtube.com\/watch?v=PCwjNfSM-U","mediaCreatedOn":"2015-08-30 18:59:18","mediaUpdatedOn":"0000-00-00 00:00:00"},{"mid":"2","title":"Demo Video 1","link":"https:\/\/www.youtube.com\/","mediaCreatedOn":"2015-08-30 18:59:18","mediaUpdatedOn":"0000-00-00 00:00:00"}],"success":1}
The above is the output from server side where only the youtube link is replaced by server img location.
Thank you for reading, have a nice day ahead :)
1:You can store image to database Example:mysite.com/img/34324234342.png (phpMysql)
2:And you can get image from php rest service (Only image link)
3:For load image from link , you can use picasso library (android)
4:If you want image with text, you can use custom listview
Example xml for restful service.
<myimage>
<title>abc</title>
<ipath>mysite.com/img/34324234342.png</ipath>
</myimage>