I have a flutter web app which works well locally but after deploying it using
firebase deploy
the images are not shown in the website, I have checked if the assets have been uploaded by tracing, e.g. my_app.firebaseapp.com/assets/assets/card.jpg. (And the image is there, so it has uploaded properly but for some reason its not being displayed on the homepage itself).
Url: https://websitehostingtry.web.app/#/
https://websitehostingtry.web.app/assets/images/card.jpg
when running the same locally:
flutter run -d chrome --release
My Pubspec.yaml file:
name: website_try
description: A new Flutter project.
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.3
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
- images/
In my dart code I just changed the default code to add Image after counter...
Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headline4,
),
Expanded(
child: Image.network('assets/images/card.jpg'),
)
],
),
),