Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[web] Add external factory constructors to anonymous canvaskit api classes. #37299

Closed
wants to merge 1 commit into from

Conversation

joshualitt
Copy link
Contributor

This CL adds external factory constructors to many cansvaskit api classes. These are necessary because Dart2Wasm does not support generative constructors on JS interop classes.

For this CL, I've added factory constructors to anonymous classes in the canvaskit API.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@flutter-dashboard flutter-dashboard bot added platform-web Code specifically for the web engine needs tests labels Nov 3, 2022
@joshualitt
Copy link
Contributor Author

@eyebrowsoffire ptal, to create this CL I checked each class in canvaskit_api.dart to see if the generative constructor was used in the engine. I might have missed something, but that will be easy to fix later. Next I will fix the use of int.

Copy link
Contributor

@eyebrowsoffire eyebrowsoffire left a comment

Choose a reason for hiding this comment

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

LGTM!

@Hixie
Copy link
Contributor

Hixie commented Nov 4, 2022

test-exemption: code refactor with no semantic change

@joshualitt
Copy link
Contributor Author

Superseded by #37443

@joshualitt joshualitt closed this Nov 10, 2022
@joshualitt joshualitt deleted the fix-canvaskit-api branch November 10, 2022 16:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs tests platform-web Code specifically for the web engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants