Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter Web Renderer issues #17

Closed
iqfareez opened this issue Jul 9, 2022 · 2 comments
Closed

Flutter Web Renderer issues #17

iqfareez opened this issue Jul 9, 2022 · 2 comments
Assignees
Labels
bug Something isn't working platform: web Web app

Comments

@iqfareez
Copy link
Member

iqfareez commented Jul 9, 2022

According to https://docs.flutter.dev/development/platform-integration/web/renderers

auto (default) - automatically chooses which renderer to use. This option chooses the HTML renderer when the app is running in a mobile browser, and CanvasKit renderer when the app is running in a desktop browser.

So,

  • on mobile -> HTML
  • on desktop -> CanvasKit

From my testing with the latest release, there are issues with:

  • Saving screenshot
  • Overflow text

Saving screenshot

Web desktop (CanvasKit) Web mobile (HTML)

TextOverflow

Web desktop (CanvasKit) Web mobile (HTML)
Screenshot desktop Screenshot mobile

I will do further testing and verification

@iqfareez iqfareez added the bug Something isn't working label Jul 9, 2022
@iqfareez iqfareez self-assigned this Jul 9, 2022
@iqfareez iqfareez added the platform: web Web app label Jul 9, 2022
@iqfareez
Copy link
Member Author

iqfareez commented Jul 9, 2022

For saving screenshot issue

From the console: toImage is not supported on the Web

It leads me to this SO answer, which leads me to flutter/flutter#42767, which finally brings me to flutter/engine#22085. For now, only CanvasKit support the saving widget as picture feature.

For TextOverflow issue

Similar issues found in flutter/flutter#71413, the resolution is to use CanvasKit because of the flutter/flutter#48417.

Conclusion

I'll redeploy the latest release and all further releases explicitly in CanvasKit, but from Flutter docs:

This renderer is fully consistent with Flutter mobile and desktop, has faster performance with higher widget density, but adds about 2MB in download size.

Which contradicted of what we want to achieve is #13 🥲

@iqfareez
Copy link
Member Author

iqfareez commented Jul 9, 2022

Deployed web latest version with canvaskit. Closing as completed.

@iqfareez iqfareez closed this as completed Jul 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working platform: web Web app
Projects
None yet
Development

No branches or pull requests

1 participant