Display .ico or .icon image in flutter - flutter

I have an API providing images with .icon format and I would like to display the image on my Flutter app.

you can use image widget for it like bellow
Image.asset("assets/images/home.ico"),
Image.network(
"https://api.hala-on.com/category_images/icons/1672329105.icon"),
i have write these two widgets of image in actions and see the results one is displaying the .ico image from the assets and the other is displaying the image from the link you provided.
see the results
Code for this

Related

Add margins in a png file

I have a generated png file with a barcode, I need to save the file on the device, can I add margins on the sides to the picture so that the barcode is read correctly
One way to achieve this can be using the screenshot package (that takes a screenshot of the child widget and saves it as a .png file) to take a screenshot of the image widget inside a padding widget. Give the padding the value you want to see as a margin in the image.
Another approach can be generating that barcode in .svg format and modifying its code before saving.
Or give RepaintBoundary a try.

Render SVG and PNG/JPG with the same Widget

Currently, I am using Image.network to render PNG/JPG and SvgPicture.network to render SVG.
However, is there a Widget that is able to detect the actual image type and automatically selects either Image.network or SvgPicture.network depending on the type?

Flutter box decoration in a container

How can I use svg image in a container's box decoration? Seems it only allows the png/jpg files in AssetImage(). I am trying to display two images on top of the background image set through the box decoration. I am trying to dodge the method of stack. So is there a way?
Flutter has no inbuilt support for SVG as of now..
But you can try this package -> https://pub.dev/packages/flutter_svg
final Widget svg = new SvgPicture.asset(
"assets/image.svg",
);
However, I'd recommend not using an SVG, instead convert your image to a png format

How to get multiple item in a single list in flutter?

In this image above I am getting image, video and pdf according to the item i need to display appropriciate widget. Please do assist me.

show and Interact with SVG in flutter

I have SVG photo which have css styling and java script to make effects to the photo. i try to use the image in flutter using flutter_svg but the problem is it show only the picture .. my problem i hope css hover style for paths working and can read java script events from flutter
You could try and load the svg in a webview perhaps but considering webview for flutter is in preview stages, it might not have all the functionalities needed.