Skip to content

Commit

Permalink
Merge pull request #106 from juancdominici/key-getter-in-list
Browse files Browse the repository at this point in the history
Add key getter to drag and drop list interface
  • Loading branch information
philip-brink authored Nov 26, 2024
2 parents dc271f7 + be8b222 commit a202c67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/drag_and_drop_list_expansion.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class DragAndDropListExpansion implements DragAndDropListExpansionInterface {
@override
final bool canDrag;

final Key? key;

/// Disable to borders displayed at the top and bottom when expanded
final bool disableTopAndBottomBorders;

Expand All @@ -56,6 +58,7 @@ class DragAndDropListExpansion implements DragAndDropListExpansionInterface {
this.lastTarget,
required this.listKey,
this.canDrag = true,
this.key,
this.disableTopAndBottomBorders = false,
}) {
_expanded.value = initiallyExpanded;
Expand Down
1 change: 1 addition & 0 deletions lib/drag_and_drop_list_interface.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ abstract class DragAndDropListInterface implements DragAndDropInterface {
/// Set to true if it can be reordered.
/// Set to false if it must remain fixed.
bool get canDrag;
Key? get key;
Widget generateWidget(DragAndDropBuilderParameters params);
}

Expand Down

0 comments on commit a202c67

Please sign in to comment.