Updated: Even if the image is not stored locally, vertical drag works
This commit is contained in:
parent
c3c96d56d4
commit
1307358934
1 changed files with 17 additions and 10 deletions
|
@ -100,19 +100,26 @@ class _ZoomableImageState extends State<ZoomableImage>
|
|||
content = const EnteLoadingWidget();
|
||||
}
|
||||
|
||||
verticalDragCallback(d) => {
|
||||
if (_photoViewController.scale! <= _initialScale!)
|
||||
dragFunction(d) => {
|
||||
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),
|
||||
},
|
||||
};
|
||||
|
||||
verticalDragCallback(d) {
|
||||
if (_initialScale != null &&
|
||||
_photoViewController.scale! <= _initialScale!) {
|
||||
dragFunction(d);
|
||||
} else if (_initialScale == null) {
|
||||
dragFunction(d);
|
||||
}
|
||||
}
|
||||
|
||||
return GestureDetector(
|
||||
onVerticalDragUpdate: verticalDragCallback,
|
||||
child: content,
|
||||
|
|
Loading…
Add table
Reference in a new issue