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

Add Flutter web renderer information to event #687

Closed
Tracked by #897
ueman opened this issue Dec 31, 2021 · 1 comment · Fixed by #1035
Closed
Tracked by #897

Add Flutter web renderer information to event #687

ueman opened this issue Dec 31, 2021 · 1 comment · Fixed by #1035

Comments

@ueman
Copy link
Collaborator

ueman commented Dec 31, 2021

One can detect wether Flutter for Web runs with the HTML renderer or the CanvasKit renderer like this:

import 'dart:js' as js;

final dynamic flutterCanvasKit = js.context['flutterCanvasKit'];
if(flutterCanvasKit != null){
// runs with CanvasKit renderer
}

This is especially helpful for bugs where the UI isn't renderer right.

Docs on the web renderer: https://docs.flutter.dev/development/tools/web-renderers

Since this issue is already quite old, the proposed solution above needs to be double-checked to see if it's still valid.

@ueman
Copy link
Collaborator Author

ueman commented Sep 28, 2022

I'll put up a PR for this during Hacktoberfest

@ueman ueman mentioned this issue Oct 1, 2022
5 tasks
Repository owner moved this from Backlog to Done in Mobile & Cross Platform SDK Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants