sintaxi / surge

CLI for the surge.sh CDN
https://surge.sh
2.84k stars 135 forks source link

flutter-web: Image not shown in surge #428

Closed tazik561 closed 3 years ago

tazik561 commented 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 :

This is a project -> Default counter with an image. You must see an image Center of image.