Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/direct_select_container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ class DirectSelectContainerState extends State<DirectSelectContainer>
Rect? rect = RectGetter.getRectFromKey(
_currentList.paddingItemController.paddingGlobalKey);
if (rect != null) {
paddingLeft = rect.left;
// paddingLeft = rect.left;
paddingLeft = 0;
//will leave menus as centered.
}
}

Expand Down
45 changes: 36 additions & 9 deletions lib/direct_select_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -180,19 +180,46 @@ class DirectSelectState<T> extends State<DirectSelectList<T>> {
animatedStateKey.currentState
?.runScaleTransition(reverse: true);
},
onVerticalDragEnd: (dragDetails) async {
// onVerticalDragEnd: (dragDetails) async {
// debugPrint('DirectSelectList onVerticalDragEnd');
// transitionEnded = true;
// _dragEnd();
// },
// onHorizontalDragEnd: (horizontalDetails) async {
// debugPrint('DirectSelectList onVerticalDragEnd');
// transitionEnded = true;
// _dragEnd();
// },
// onVerticalDragUpdate: (dragInfo) {
// debugPrint('DirectSelectList onVerticalDragUpdate');
// if (!_isShowUpAnimationRunning) {
// _showListOverlay(dragInfo.primaryDelta);
// }
// },
onPanEnd: (dragInfo) async {
debugPrint('DirectSelectList onPanEnd');
transitionEnded = true;
_dragEnd();
},
onHorizontalDragEnd: (horizontalDetails) async {
transitionEnded = true;
_dragEnd();
},
onVerticalDragUpdate: (dragInfo) {
if (!_isShowUpAnimationRunning) {
_showListOverlay(dragInfo.primaryDelta);
onPanUpdate: (dragInfo) {
if (dragInfo.delta.dx > 0)
print("Dragging in +X direction");
else
print("Dragging in -X direction");

if (dragInfo.delta.dy > 0) {
print("Dragging in +Y direction");
if (!_isShowUpAnimationRunning) {
_showListOverlay(dragInfo.delta.dy);
}
} else {
print("Dragging in -Y direction");
if (!_isShowUpAnimationRunning) {
_showListOverlay(dragInfo.delta.dy);
}
}
});
},
);
});
}

Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ environment:
dependencies:
flutter:
sdk: flutter
rect_getter: ^1.0.0
rect_getter: ^1.1.0

dev_dependencies:
flutter_test:
sdk: flutter

flutter:
uses-material-design: true
uses-material-design: true