-
Notifications
You must be signed in to change notification settings - Fork 5
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 autoDisposeIndexes
to dispose unused IndexedStack children and rebuild them when needed
#7
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@colonal
Thank you for creating this Pull Request. The changes look good overall. I'm good to merge it, but before that, I'd like to understand the specific use cases or scenarios where this feature is needed. Could you please share more details if possible?
9159e12
to
06a8e83
Compare
@okaryo The
The Please note that I also updated the README.md file to reflect these changes and provide usage examples. Feel free to let me know if you need further clarification or additional examples! 😊 |
@colonal After considering the use cases you provided, it seems that the main purpose of this feature is to dispose of widgets for specific indexes when they are not in use. With that in mind, how about renaming the property to If this name aligns with your intent, could you also update the function names, comments, and documentation accordingly? If there’s any discrepancy with your intended functionality, please feel free to let me know. 😊 |
…sposal of children - Renamed `forceReloadIndexes` to `autoDisposeIndexes` to better reflect its purpose. - Added comments and updated parameters to align with the new feature.
- Updated documentation to replace `forceReloadIndexes` with `autoDisposeIndexes`. - Added explanation of the `autoDisposeIndexes` feature under the Features section. - Updated example code to include `autoDisposeIndexes` usage. - Improved parameter descriptions and provided real-world use case examples.
@okaryo |
forceReloadIndexes
and _updateChildrenForReload
for Enhanced LazyLoadIndexedStack
ControlautoDisposeIndexes
to dispose unused IndexedStack children and rebuild them when needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you for your contribution!
I'll merge it. 🚀
Added a new property,
forceReloadIndexes
, to enable forced reloading of specific child widgets each time they are displayed.Introduced a
_updateChildrenForReload
method to manage widget updates, ensuring proper cleanup and handling for child elements.Enhanced LazyIndexedStack functionality to provide fine-grained control over widget rendering and lifecycle management.
These updates make the LazyIndexedStack more flexible and suitable for complex widget management scenarios, such as resource-intensive or frequently updated UI elements.