You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[web] implement PluginUtilities for flutter web #33615
For reference, the sub-problem that these APIs are solving for us is the following:
Given a static function we need to be able to obtain a serializable identifier for that function. And given that serializable identifier (in another instance of the app) we need to be able to re-obtain the original function object.
there isn't version skew between the serializing code and the deserializing code
I don't see any reason why it should be impossible to do what @goderbauer is looking for in JS. @sigmundch@rakudrama could possibly provide more accurate commentary.
Just because it's possible in principle though doesn't mean that it would just fall out of the current compilation strategy . But I actually think it might not be far off - you could use a class ID plus a static method name maybe?
Is the expectation that the serialized id is usable within a single version of the app or across multiple versions? I don't see a reason why the former can't be supported, but the latter could be problematic.
Many teams consider the names of their methods internal and/or sensitive, so we wouldn't want to use the original class/method name as part of the serialized form. When we minify an application, the minified name would work, but that is not stable across multiple compilations of the program.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
amreniouinnovent commentedon Dec 15, 2019
@jonahwilliams I think if you added a suggested PluginUtilities List then the developers could vote on it
goderbauer commentedon Mar 26, 2020
Related: #33614
@jonahwilliams @yjbanov Have you given it any thought if these APIs would be implementable on the web? They could help us with restoring anonymous routes. That problem is described in http://flutter.dev/go/restoring-anonymous-routes and
PluginUtilities.getCallbackHandle/PluginUtilities.getCallbackFromHandlecould be an alternative to Ephemerons to solve it.For reference, the sub-problem that these APIs are solving for us is the following:
Given a static function we need to be able to obtain a serializable identifier for that function. And given that serializable identifier (in another instance of the app) we need to be able to re-obtain the original function object.
jonahwilliams commentedon Mar 26, 2020
Anything involving isolates is not implementable on the web.
goderbauer commentedon Mar 26, 2020
The API itself is independent of isolates as far as I can tell.
jonahwilliams commentedon Mar 26, 2020
Depends on what you mean by implement - we could no-op it certainly, but we can't get handles to callbacks that can be shared across isolates.
leafpetersen commentedon Mar 26, 2020
Under the assumptions that:
I don't see any reason why it should be impossible to do what @goderbauer is looking for in JS. @sigmundch @rakudrama could possibly provide more accurate commentary.
Just because it's possible in principle though doesn't mean that it would just fall out of the current compilation strategy . But I actually think it might not be far off - you could use a class ID plus a static method name maybe?
sigmundch commentedon May 9, 2020
Sorry for the very slow response here.
Is the expectation that the serialized id is usable within a single version of the app or across multiple versions? I don't see a reason why the former can't be supported, but the latter could be problematic.
Many teams consider the names of their methods internal and/or sensitive, so we wouldn't want to use the original class/method name as part of the serialized form. When we minify an application, the minified name would work, but that is not stable across multiple compilations of the program.
23 remaining items
github-actions commentedon Jul 14, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.