Skip to content

Commit

Permalink
Merge pull request #51 from larssn/master
Browse files Browse the repository at this point in the history
fix: bad type in onLeave
  • Loading branch information
hanshengchiu committed Jan 18, 2020
2 parents 2ac21db + d7ca64e commit 56578ad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/src/widgets/reorderable_flex.dart
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ class _ReorderableFlexContentState extends State<_ReorderableFlexContent>
return willAccept; //_dragging == toAccept && toAccept != toWrap.key;
},
onAccept: (Key accepted) {},
onLeave: (Key leaving) {},
onLeave: (Object leaving) {},
);

dragTarget = KeyedSubtree(key: keyIndexGlobalKey, child: dragTarget);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/widgets/reorderable_sliver.dart
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ class _ReorderableSliverListState extends State<ReorderableSliverList>
return willAccept;//_dragging == toAccept && toAccept != toWrap.key;
},
onAccept: (int accepted) {},
onLeave: (int leaving) {},
onLeave: (Object leaving) {},
);

// dragTarget = KeyedSubtree(
Expand Down
6 changes: 3 additions & 3 deletions lib/src/widgets/reorderable_wrap.dart
Original file line number Diff line number Diff line change
Expand Up @@ -942,13 +942,13 @@ class _ReorderableWrapContentState extends State<_ReorderableWrapContent>
builder: (BuildContext context, List<int> acceptedCandidates, List<dynamic> rejectedCandidates) => SizedBox(),
onWillAccept: (int toAccept) => _onWillAccept(toAccept, true),
onAccept: (int accepted) {},
onLeave: (int leaving) {},
onLeave: (Object leaving) {},
);
Widget nextDragTarget = DragTarget<int>(
builder: (BuildContext context, List<int> acceptedCandidates, List<dynamic> rejectedCandidates) => SizedBox(),
onWillAccept: (int toAccept) => _onWillAccept(toAccept, false),
onAccept: (int accepted) {},
onLeave: (int leaving) {},
onLeave: (Object leaving) {},
);

Widget dragTarget = Stack(
Expand Down Expand Up @@ -1012,7 +1012,7 @@ class _ReorderableWrapContentState extends State<_ReorderableWrapContent>
// return willAccept;//_dragging == toAccept && toAccept != toWrap.key;
// },
// onAccept: (Key accepted) {},
// onLeave: (Key leaving) {},
// onLeave: (Object leaving) {},
// );

// dragTarget = KeyedSubtree(
Expand Down

0 comments on commit 56578ad

Please sign in to comment.