-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
The plugin executes the .dispose() method on the ScrollController it is provided with.
This renders the expected usage pattern incorrect:
class ScrollSnapListState extends State<ScrollSnapList> {
...
@override
void dispose() {
// This approach is now incorrect
widget.listController.dispose();
super.dispose();
}
...
}This outcome is: ScrollController has been disposed and you are trying to use it.
If I am responsible for creating the controller and providing it, I should logically be the one to dispose of it as well. This is the standard practice in Flutter.
Therefore, I suggest that the controller should not be disposed of by the plugin, allowing the user to manage its lifecycle. The issue encountered in mponkin/fading_edge_scrollview#3 seems to support this viewpoint.
Thank you!
Metadata
Metadata
Assignees
Labels
No labels