0

I'm going to print an image of firebase storage on the web. The Flutter takes the url of the image and outputs it on the web, but the image is broken and output as shown in the picture below.

enter image description here

Images are being output to GridView. This image should have been printed. enter image description here

      Widget _postImages() {
    return GridView.count(
      shrinkWrap: true,
      crossAxisCount: 3,
      childAspectRatio: 1,
      // physics: NeverScrollableScrollPhysics(),
      mainAxisSpacing: 5,
      crossAxisSpacing: 5,
      physics: NeverScrollableScrollPhysics(),

      //output network image
      children: List.generate(10, (index) => _images(index)),
    );
  }

  Widget _images(int index) {
    return InkWell(
      onTap: () {
        Get.to(DetailScreen());
      },
      child: CachedNetworkImage(
        //image test (firebase storage image)
        imageUrl:
             'https://firebasestorage.googleapis.com/v0/b/omd-community-ee697.appspot.com/o/post%2F1635912350967_vnODuaLLNyXlV5cFU58LFQgwAHA2%2Fpost.jpg?alt=media&token=73f18365-d1d1-4f33-b695-c243204dcdb7',

         //test random image
        // 'https://picsum.photos/id/$index/100/100',
        fit: BoxFit.cover, 
      ),
    );
  }

If I use url of another test image url, it will be output well. There was no problem with the app. Is the size of the image the problem? How can I solve this problem?

Thank you always.

j08691
  • 197,815
  • 30
  • 248
  • 265
Kevin Yang
  • 99
  • 7
  • I believe I found an answer [here](https://stackoverflow.com/questions/65653801/flutter-web-cant-load-network-image-from-another-domain). – temp_ Nov 03 '21 at 15:32

0 Answers0