-
Notifications
You must be signed in to change notification settings - Fork 62
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
Reason for using child/children instead of sliver/slivers #14
Comments
Thanks for the suggestion. Moreover, I actually am thinking of supporting both box and sliver children in all of my widgets, there is no technical reason why only RenderSliver children should be allowed as defaulting to the SliverToBoxAdapter logic is trivial, this should also fix the issue that whenever you get an error in a sliver widget the whole page breaks because the error is not a RenderSliver. So TL;DR I don't plan on changing this as I disagree with this naming by the Flutter framework and want consistency in my own package I'll leave this issue open for future reference and possibility for discussion |
Nice to hear your point of view 🙂 I also hope in the future SliverToBoxAdapter is not needed and slivers become more flexible to use other widgets. Leaving my personal experience here, for all custom widgets that contain a RenderSliver I add the prefix Sliver in the class name. The params that need to be a widget that contains a RendersSliver I called them I completely understand why you don't and why you prefer to keep it that way on your projects. Again, thank you for the package |
I have pinned this such that it can be closed but will stay easy to find |
Personally, I think from an API perspective, sliver/slivers will keep consistency to the Flutter Sliver part, I was confused when I first time see them (I thought it should be normal widgets instead of sliver widget). But if child/children make the project easy to maintain, I think it is a fair trade-off. An awesome project really! |
In #26 (released as |
First, thanks for this amazing package.
Slivers are a very powerful set of Widgets and this package makes it even more incredible.
I would like to suggest to rename the params
children
andchild
in the sliver widgets of this library toslivers
andsliver
.Inside the Flutter framework, the widgets that only accept slivers use that name convention to indicate a normal widget should not be used. eg SliverSafeArea, SliverPadding, CustomScrollView
Calling it child and children is confusing and prompt to use normal Widgets and get runtime errors.
Happy to help with a PR.
The text was updated successfully, but these errors were encountered: