Fix issue that was breaking the pull-down interaction
This commit is contained in:
parent
478c6f0238
commit
23d46e203b
1 changed files with 11 additions and 13 deletions
|
@ -105,21 +105,19 @@ class _ZoomableImageState extends State<ZoomableImage>
|
|||
} else {
|
||||
content = const EnteLoadingWidget();
|
||||
}
|
||||
final GestureDragUpdateCallback? verticalDragCallback = _isZooming
|
||||
? null
|
||||
: (d) => {
|
||||
if (!_isZooming)
|
||||
verticalDragCallback(d) => {
|
||||
if (!_isZooming)
|
||||
{
|
||||
if (d.delta.dy > dragSensitivity)
|
||||
{
|
||||
if (d.delta.dy > dragSensitivity)
|
||||
{
|
||||
{Navigator.of(context).pop()},
|
||||
}
|
||||
else if (d.delta.dy < (dragSensitivity * -1))
|
||||
{
|
||||
showDetailsSheet(context, widget.photo),
|
||||
},
|
||||
{Navigator.of(context).pop()},
|
||||
}
|
||||
else if (d.delta.dy < (dragSensitivity * -1))
|
||||
{
|
||||
showDetailsSheet(context, widget.photo),
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
return GestureDetector(
|
||||
onVerticalDragUpdate: verticalDragCallback,
|
||||
|
|
Loading…
Add table
Reference in a new issue