opt: image view

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-12-15 11:44:44 +08:00
parent fee1ad56f7
commit 52f888167f
11 changed files with 120 additions and 57 deletions

View File

@@ -25,9 +25,11 @@ class InteractiveViewerBoundary extends StatefulWidget {
required this.maxScale,
required this.minScale,
this.onDismissed,
this.onReset,
this.dismissThreshold = 0.2,
});
final VoidCallback? onReset;
final double dismissThreshold;
final VoidCallback? onDismissed;
@@ -230,6 +232,8 @@ class InteractiveViewerBoundaryState extends State<InteractiveViewerBoundary>
onPanStart: _handleDragStart,
onPanUpdate: _handleDragUpdate,
onPanEnd: _handleDragEnd,
onReset: widget.onReset,
isAnimating: () => _animateController.value != 0,
child: content,
);
}