mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 03:06:59 +08:00
@@ -3,21 +3,16 @@ import 'package:get/get.dart';
|
||||
|
||||
Future<bool> showConfirmDialog({
|
||||
required BuildContext context,
|
||||
required String title,
|
||||
Object? content,
|
||||
required Widget title,
|
||||
Widget? content,
|
||||
// @Deprecated('use `bool result = await showConfirmDialog()` instead')
|
||||
VoidCallback? onConfirm,
|
||||
}) async {
|
||||
assert(content is String? || content is Widget);
|
||||
return await showDialog<bool>(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text(title),
|
||||
content: content is String
|
||||
? Text(content)
|
||||
: content is Widget
|
||||
? content
|
||||
: null,
|
||||
title: title,
|
||||
content: content,
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: Get.back,
|
||||
|
||||
@@ -235,6 +235,7 @@ class _ViewerState extends State<Viewer> with SingleTickerProviderStateMixin {
|
||||
void _handleDoubleTap() {
|
||||
if (!mounted) return;
|
||||
if (_animationController.isAnimating) return;
|
||||
_stopFling();
|
||||
_scaleFrom = _scale;
|
||||
_positionFrom = _position;
|
||||
|
||||
@@ -528,6 +529,7 @@ class _ViewerState extends State<Viewer> with SingleTickerProviderStateMixin {
|
||||
widget.onChangePage!.call(event.scrollDelta.dy < 0 ? -1 : 1);
|
||||
return;
|
||||
}
|
||||
_stopFling();
|
||||
final double scaleChange = math.exp(-event.scrollDelta.dy / _scaleFactor);
|
||||
final Offset local = event.localPosition;
|
||||
final Offset focalPointScene = _toScene(local);
|
||||
|
||||
Reference in New Issue
Block a user