Skip to content
Open
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
24 changes: 19 additions & 5 deletions lib/src/palette.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1143,11 +1143,25 @@ class ColorPickerSlider extends StatelessWidget {
child: LayoutBuilder(
builder: (BuildContext context, BoxConstraints box) {
RenderBox? getBox = context.findRenderObject() as RenderBox?;
return GestureDetector(
onPanDown: (DragDownDetails details) =>
getBox != null ? slideEvent(getBox, box, details.globalPosition) : null,
onPanUpdate: (DragUpdateDetails details) =>
getBox != null ? slideEvent(getBox, box, details.globalPosition) : null,
return RawGestureDetector(
gestures: {
_AlwaysWinPanGestureRecognizer:
GestureRecognizerFactoryWithHandlers<
_AlwaysWinPanGestureRecognizer>(
() => _AlwaysWinPanGestureRecognizer(),
(_AlwaysWinPanGestureRecognizer instance) {
instance
..onDown = ((DragDownDetails details) => getBox !=
null
? slideEvent(getBox, box, details.globalPosition)
: null)
..onUpdate = ((DragUpdateDetails details) => getBox !=
null
? slideEvent(getBox, box, details.globalPosition)
: null);
},
),
},
);
},
),
Expand Down