Skip to content
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

Refactor generic code in reorderable_list.dart into a base class / widget #94848

Open
navaronbracke opened this issue Dec 8, 2021 · 0 comments
Labels
c: proposal A detailed proposal for a change to Flutter f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project team-framework Owned by Framework team triaged-framework Triaged by Framework team

Comments

@navaronbracke
Copy link
Contributor

navaronbracke commented Dec 8, 2021

Use case

I was looking into implementing a sliver reorderable grid, similar to the existing SliverReorderableList.
During my research, I found that a lot of code in the existing widget is private, but generic enough to be applicable to a SliverReorderableGrid (which is what I am trying to implement).

The fact that this code is private makes creating my own widget a little harder.
I have to essentially copy-paste all the private code and reimplement the important parts.

Proposal

Refactor the generic code in reorderable_list.dart into a more generic set of base classes, i.e. SliverReorderable, _DragItem<T extends ReorderableState>, in a file like reorderable.dart. The private code could still be kept private, but moved to that file.
The existing SliverReorderableList should be refactored to use this new SliverReorderable.

This would make fixing #46430 easier, as the only thing missing is the SliverReorderableGrid, which would extend the SliverReorderable.

cc @darrenaustin

@danagbemava-nc danagbemava-nc added in triage Presently being triaged by the triage team f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. passed first triage c: proposal A detailed proposal for a change to Flutter and removed in triage Presently being triaged by the triage team labels Dec 8, 2021
@goderbauer goderbauer added the P3 Issues that are less important to the Flutter project label Feb 2, 2022
@flutter-triage-bot flutter-triage-bot bot added team-framework Owned by Framework team triaged-framework Triaged by Framework team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: proposal A detailed proposal for a change to Flutter f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project team-framework Owned by Framework team triaged-framework Triaged by Framework team
Projects
None yet
Development

No branches or pull requests

4 participants