screenshot
screenshot copied to clipboard
Web:Unsupported operation: toImage is not supported on the Web
Flutter Web: flutter 2.2.3, Dart 2.13.4
I tested it with the sample source. Do you support the web?
I tested it in my web app, and it's working fine!
I tested it in my web app, and it's working fine!
I've found that it only works if you are using the CanvasKit renderer. If you try to use the HTML renderer it does not work.
I tested it in my web app, and it's working fine!
I've found that it only works if you are using the CanvasKit renderer. If you try to use the HTML renderer it does not work.
Yes, it works with CanvasKit renderer, just use this syntax bellow for compiling :
flutter build web --web-renderer canvaskit
you can close this issue.
I don't think it should close the issue, because some people like me need to use HTML renderer in the app in order for other things to work properly.
remove --web-renderer=html
its fixed for me
I suppose this can be closed in favor of #82
In the HTML render, Have any function using instead toImage()? I need to use toImage() or some function can do like this. I have many issues when I am using the canvaskit renderer. Please fix it or create a new function for the HTML render.
So, I've had this problem for a while, and my co-worker solved it.
Go to web/index.html
Then, find the ### onEntrypointLoaded
Change it to this:
onEntrypointLoaded: async (engineInitializer) => {
const config = { renderer: "canvaskit" };
const appRunner = await engineInitializer.initializeEngine(config);
await appRunner.runApp();
}
The reason it works on PC/laptop is that it's set to canvaskit by default, but on the phone, it's not because it's set to auto. The reference is below.
https://docs.flutter.dev/platform-integration/web/renderers