-
-
Notifications
You must be signed in to change notification settings - Fork 899
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
Improve components with a declarative API #1522
Labels
Comments
Interesting idea! I think it could be pretty nice. |
I'm in love with this. Question here is: If children can be specified, what happens when children are also added via the |
The ones in the constructor come first, those from onLoad after. |
6 tasks
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What could be improved
Flame already favors composability, Components can have children, their children can have their own and so on.
To put Flame more in line with Flutter APIs, we could a
children
attribute on all components in order to allow a more declarative way of developing composable components, for example:Why should this be improved
It will allow better declarative programming and bring Flame even closer to the "Flutter way"
Any risks?
Idk how complicated this would be to implement, on a naive idea, I think that just by receiving a list o Component on the constructor and adding then all on the component default
onLoad
will me enough, but we need to test and check if this will bring any issues with the Flame lifecycle.More information
The text was updated successfully, but these errors were encountered: