-
Notifications
You must be signed in to change notification settings - Fork 36
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
Compiled first then eval widget #3
Comments
Yeah, this is certainly something I've thought about. dart_eval actually has the concept of runtime overrides which let you implement the hot wrapper pattern, pretty similar to your idea but without the flutter dependency. Before I add hot constructors throughout flutter_eval though, dart_eval needs to have a file format that specifies what IDs are overriden and by what, and there needs to be an easy way to generate that (maybe annotations?). I do also like your idea of a root Flutter widget that loads the updates, although I'm not sure hot-swapping them when they're already in use is the best idea. Honestly if you want to work on this and puzzle it out I'd be very grateful and happy to help you along :) |
Ah really cool for hot wrappers! Regarding hot-swapping, I don't know which is the best strategy :
I could definitively help with that loading part as soon as you have a clearer vision of the incremental updates based on IDs. |
@ethanblake4 & @aloisdeniel looking forward for this interesting idea. |
@aloisdeniel are you still interested in this? I finished the dart_eval implementation of runtime overrides, so all that's left now is Flutter. I'll be working on adding hot constructors to flutter_eval, let me know if you're interested in working on a PR for the loading. Documentation here, tests here and the code is in the in-progress v0.6 branches of both dart_eval and flutter_eval. |
Completed in v0.6.0. There are new HotSwap and HotSwapLoader widgets to facilitate this. |
Thanks a lot for the package, it is clearly a game changer!
I know that this is pretty easy to implement on top of EvalWidget, but I think it would be great to have it built in since it is a great pattern: I would love to have regular widgets, that have the possibility to be evaluated later on if needed. The eval allows to have a packaged EVC, but why not simply use a natively compiled widget instead?
So to summarize a widget like this :
At the root of the widget tree we would have a library manager inherited widget (loading, caching libraries):
And then we could declare
CodePushWidget
s that would have a default implementation and a potential code pushed update by using the inheritedEvalLibrary
under the hood.The text was updated successfully, but these errors were encountered: