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

Use --web-renderer canvaskit flag instead of --dart-define=FLUTTER_WEB_USE_SKIA=true to deploy the web app via sz deploy web-app #233

Merged
merged 2 commits into from
May 17, 2022

Conversation

nilsreichardt
Copy link
Member

Regarding the official Flutter docs, you can set the renderer via the --web-renderer flag: https://docs.flutter.dev/development/platform-integration/web/renderers#command-line-options

Comment on lines 104 to 105
'--dart-define=FLUTTER_WEB_USE_SKIA=true'
'--web-renderer',
'canvaskit',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't auto be better for mobile devices? Or is there sth that makes it unsuitable for us?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think having only canvaskit as renderer is better for us now, because we had some issues with the html renderer and the performance was terrible. Additionally, using auto would require to maintain two renderers which would result into more work for us and looking at the analytics it's not worth for that few web users.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use the canvas kit renderer for now, but back when we had the performance problems that was quite a while ago. We should test that again (might very well still be true of course).

Also what would be the overhead for "maintaining" it? I think it should more or less just work. Sure there is a slightly higher chance for bugs but if it works for us when we just scroll through once then I think the chance of new bugs occuring out of nowhere should be slim.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that our goal should be using someday auto but with maintaining I mean we need to (manually) test the current features but also every upcoming feature.

@github-actions
Copy link

github-actions bot commented May 17, 2022

Visit the preview URL for this PR (updated for commit 32deff8):

https://sharezone-test--pr233-use-web-renderer-fla-sze7gioo.web.app

(expires Tue, 24 May 2022 15:28:53 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@nilsreichardt nilsreichardt enabled auto-merge (squash) May 17, 2022 15:24
@nilsreichardt nilsreichardt merged commit 2dbcf67 into main May 17, 2022
@nilsreichardt nilsreichardt deleted the use-web-renderer-flag branch May 17, 2022 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants