Questions tagged [flutter-assetimage]
40 questions
0
votes
1 answer
Flutter : Can't see SVG picture on the screen
I was trying to use svg format but I couldn't see the picture on my phone screen.
Flutter Code:
Padding(
padding: const EdgeInsets.only(top: 20),
child: Container(
width: width,
…

Punreach Rany
- 2,560
- 7
- 23
- 56
0
votes
1 answer
Error to loading asset image to Image material on Flutter
Configuring assets on pubspec.yaml file:
flutter:
assets:
- assets/product_images/
save images on root folter assets/product_images/
and get Image:
import 'package:flutter/material.dart';
import 'package:/vo/product.dart';
class MockProducts…

Augusto
- 3,825
- 9
- 45
- 93
0
votes
3 answers
Flutter image is not showing
I want to show some local image and display it on the screen like this:
Image(image: AssetImage('assets/images/addFood.png'))
But I cannot see the image on the screen and I am getting no error at all.
Here is what I have done:
In my pubspec.yaml I…

Tamir Abutbul
- 7,301
- 7
- 25
- 53
-1
votes
1 answer
Flutter Asset image
======== Exception caught by image resource service ================================================
The following assertion was thrown resolving an image codec:
Unable to load asset: "dice-six-faces-one.png".
Exception: Asset not found
When the…
-1
votes
1 answer
my code is Unable to fetch local image assets
I'm super new to programming, I'm currently follow a book called 'Flutter Apprentice' but I stuck in this chapter.
I've followed everything what the book says, I've checked all of my code, everything seems okay, no error the red lines are showing,…

It's Rex
- 1
- 1
-1
votes
2 answers
Flutter error while adding images(assets)
I am trying to add images to my flutter app via assets. this is the where i have linked the images. this is the pubspec yaml file Tried different ways. nothing seems to work.
-1
votes
2 answers
I keep receiving an error that says Flutter Error Unable to Load Asset
I'm new to flutter. While adding an image and trying to run I got an error that said "Flutter Error Unable to load asset". An image of the problem can be seen below. If anyone can help that would be really appreciated! IMAGE:…
-2
votes
3 answers
Checking if AssetImage asset path exist
How do I load AssetImage or check if it exists? The data is coming from the api, so I cannot list all the file paths as constants.
As an example path maybe be 'assets/images/${card.imageType}.png' where card.inageType is a variable.
...
child:…

Tremmillicious
- 454
- 4
- 14
-2
votes
2 answers
Dart try/catch - catch block does not work
In my flutter app I want to load assets depending on condition: is my code running as imported package or as an app I'm currently develop.
The problem is that this try/catch block always fails in try section:
AssetImage _getBackgroundImage() {
…

Yaro Best
- 29
- 1
- 5