Closed tazik561 closed 3 years ago
I create a simple flutter web app(default Counter project + a png image). I added png image from asset like this:
assets: - assets/images/
main class:
@override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(widget.title), ), body: Center( child: Stack(children: [ Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Text( 'You have pushed the button this many times:', ), Text( '$_counter', style: Theme.of(context).textTheme.headline4, ), ], ), Positioned.fill( child: Image.network("assets/images/3DBoxes.png"), ) ]), ),
When i run app on chrome : flutter run -d chrome, An image is shown but when I deploy build project flutter build web on surge, Image not shown :
flutter run -d chrome
flutter build web
This is a project -> Default counter with an image. You must see an image Center of image.
I create a simple flutter web app(default Counter project + a png image). I added png image from asset like this:
main class:
When i run app on chrome :
flutter run -d chrome
, An image is shown but when I deploy build projectflutter build web
on surge, Image not shown :This is a project -> Default counter with an image. You must see an image Center of image.