I have created a flutter web application that uses some image assets. I have set these images at the root level project inside a folder called assets, so:
When I run the command flutter web build --release
I get a bundle with my images located the next way:
The problem is that my images are not recognized once the application has been deployed. To get my web application working right I have to relocate manually all files to the way I set them initially, like in the first image.
I have noticed this started to happen since I upgrade to flutter 3.0.0.
Does anyone know how to solve it or why does it happen? Is very annoying and likely to have an error doing that always when you want to have a new deployement. Thanks in advance for your help!
This is the way I declared my assets in the pubspec.yaml file:
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/images/
- assets/svg/
- assets/svg/menu/
pubspec.yaml
file, in particular, the declaration of your assets underflutter
? – Irma