0

Hy everyone! I'm new in flutter and I have build my portfolio dynamic and responsive webapp where I have picked images urls from firebase, the images are not shown before by using NetworkImage widget then I have used the 'flutter run -d chrome' and images are shown properly as expected.

Then I have used "html rendrer" properly in 'index.html' it works fine in debug mode. <script> window.flutterWebRenderer = "html"; </script> It was keep giving me this note in debug mode each time on hot restart:

window.flutterWebRenderer is now deprecated. Use engineInitializer.initializeEngine(config) instead. See: https://docs.flutter.dev/development/platform-integration/web/initialization

Once my portfolio completed I have used this to build release of my app from documentation:

flutter build web --web-renderer canvaskit --release

Then I have used Github pages to host it.

Link

Now the problem is that, It is running as expected only on my chrome browser, but on others that are firefox, mobile chrome and vivo browser is not loadind images as I have not used the html rendrer.

It is the example of firefox

But Expected output: My chrome browser output

Let me know where I am doing mistake or missing somthing else.

Thanks in advance!

  • yes this is an ongoing issue of CORS. Workaround is use HTML renderer or even better download images and render as bytes. Read more about issue at https://docs.flutter.dev/platform-integration/web/web-images – Clevino Alrin Aug 28 '23 at 08:56
  • As for the renderer error, the window instance is deprecated so you need to use engineInitializer. The code is in the pointed url in warning message. – Clevino Alrin Aug 28 '23 at 08:58

0 Answers0