-
-
Notifications
You must be signed in to change notification settings - Fork 935
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
Add Component.removed #1956
Comments
Dispose is unmount equivalent. Event's can be fired from overriden dispose to other subscribers. @override
void dispose() {
super.dispose();
} |
It is not the same. One can hold a reference to unmounted component and mount it at a later point. Dispose is more like a destructor. Also, |
I see, there is also "unmount". In my previous org, we used to dispose most component to save memory and make the app faster. So, I never looked into unmount.
Could you give a file or line ref where this base abstract class resides. So, I can understand how mount and other stuff is working, I would really appreciate it. As, it is hacktober fest so I am looking to contribute. |
Okay, just to make it clear, component in Flame's context means the
Code for that class can be found here. You should be able to get there using your IDE's go to definition feature. I'll also recommend taking a look at Flame's docs to get an idea of how components work in Flame. |
This feature can be used to detect if a relayout is necessary for the children of the planned components |
Hey @hey24sheep, can you confirm if you are working on this? If so @spydon or someone else can assign it to you. |
I think this issue is up for grabs, hey24sheep most likely only tripped into this repo after I made a PR on one of their repos. 😄 |
@ufrshubham I apologize for delayed response, keep it open for anyone. As, I can see there is already a lot of progress farther than I can make as I still do not understand clearly the problem. I can see there is a base remove function and it is being used in the new PR of LayoutComponent. I think of @spydon Yes, but, I contribute to Hacktoberfest and I see there are a lot of open issues with the same. So, thought of filling up my Hacktoberfest PR count 😄 |
Makes sense. :) |
If this issues is still free till October last week, I will take a look. Will drop a comment here when I do start working on it. |
@JigneshWorld I can't assign you to this before you have commented on it. :) |
I can have a look at this unless JigneshWorld is on it already :) |
Since it's been 3 days and no comment from them, I'll assign you to it :) |
Problem to solve
We need a way to subscribe/listen for a component removal.
Proposal
All Flame components already provide a
mounted
property that returnsFuture
that is completed when the component is mounted on the tree.We could follow this approach (both in concept and implementation) and implement an equivalent for a
removed
property.The text was updated successfully, but these errors were encountered: