refactor: Migrate to flutter 2

This commit is contained in:
Christian Pauly 2021-03-04 12:28:06 +01:00
commit b0ada828aa
39 changed files with 257 additions and 315 deletions

View file

@ -50,6 +50,15 @@ class ImageView extends StatelessWidget {
],
),
body: InteractiveViewer(
minScale: 1.0,
maxScale: 10.0,
onInteractionEnd: (ScaleEndDetails endDetails) {
if (PlatformInfos.usesTouchscreen == false) {
if (endDetails.velocity.pixelsPerSecond.dy > calcVelocity) {
Navigator.of(context, rootNavigator: false).pop();
}
}
},
child: Center(
child: ImageBubble(
event,
@ -62,15 +71,6 @@ class ImageView extends StatelessWidget {
thumbnailOnly: false,
),
),
minScale: 1.0,
maxScale: 10.0,
onInteractionEnd: (ScaleEndDetails endDetails) {
if (PlatformInfos.usesTouchscreen == false) {
if (endDetails.velocity.pixelsPerSecond.dy > calcVelocity) {
Navigator.of(context, rootNavigator: false).pop();
}
}
},
),
);
}