Uh oh!
There was an error while loading. Please reload this page.
Migrate analytics code to dart:js_interop - #7718
Conversation
kenzieschmoll
commented
May 7, 2024
Looks like this migration is not so simple: |
kenzieschmoll
commented
May 7, 2024
Pushed up some new changes, but the build still fails. Maybe this is closer though? |
srujzs
commented
May 7, 2024
The error is basically indicating that you can't use classes (unless you're using In most of these cases, it's as simple as refactoring the declaration and the rest should work e.g. @JS()
@anonymousclassGtagExceptionDevToolsextendsGtagException {to extension typeGtagExceptionDevTools._(JSObject _) implementsGtagException, JSObject {Since you mostly use primitive types e.g. dynamic custom_map,Object? custom_map,and its associated getters: externalObjectget custom_map;externalObject?get custom_map;You can't use As an aside, note that some of these factories have default args that are ignored (and you should see a warning). They're just silently ignored. Lastly, these APIs are now sound with the new interop. If they weren't typed correctly before (which I doubt, considering these are mostly all primitives), you may see errors now. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Fixes#6606.
@srujzs are there any differences under the hood or is this migration as simple as switching the imports?