1

I am trying to implement FadeInImage like in the docs but my App fails with:

Invalid argument: Unexpected end of image. Request for frame index 0 can't be satisfied.

This is how my code looks like:

FadeInImage.memoryNetwork(
  height: 200,
  width: 200,
  placeholderErrorBuilder: (context, error, stackTrace) {
    print(error);
    return const SizedBox.shrink();
  },
  placeholder: kTransparentImage,
  image:
      'https://media.istockphoto.com/photos/single-gala-apple-with-leaf-isolated-picture-id1134031619?s=612x612',
),

It's pretty much identical to the docs.

I am working with Flutter Web. Any help is appreciated!

Chris
  • 1,828
  • 6
  • 40
  • 108

1 Answers1

0

Open the index.html file and copy-paste the code below in-between the header tag.

<script type="text/javascript">
window.flutterWebRenderer = "html";
</script>

In my case, this script is working. I hope it will resolve your errors as well.

After pasting this code, kindly stop the browser and restart the whole app. The hot reload and hot restart thing won't work here.

Dharam Budh
  • 515
  • 2
  • 9