opt: pl_gallery layout

This commit is contained in:
guozhigq
2024-11-25 22:39:04 +08:00
parent 747ed377b5
commit 0ae6238d0e

View File

@ -234,7 +234,8 @@ class _InteractiveviewerGalleryState extends State<InteractiveviewerGallery>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return InteractiveViewerBoundary( return Stack(children: [
InteractiveViewerBoundary(
controller: _transformationController, controller: _transformationController,
boundaryWidth: MediaQuery.of(context).size.width, boundaryWidth: MediaQuery.of(context).size.width,
onScaleChanged: _onScaleChanged, onScaleChanged: _onScaleChanged,
@ -243,8 +244,7 @@ class _InteractiveviewerGalleryState extends State<InteractiveviewerGallery>
onNoBoundaryHit: _onNoBoundaryHit, onNoBoundaryHit: _onNoBoundaryHit,
maxScale: widget.maxScale, maxScale: widget.maxScale,
minScale: widget.minScale, minScale: widget.minScale,
child: Stack(children: [ child: CustomDismissible(
CustomDismissible(
onDismissed: () { onDismissed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
widget.onDismissed?.call(_pageController!.page!.floor()); widget.onDismissed?.call(_pageController!.page!.floor());
@ -275,6 +275,7 @@ class _InteractiveviewerGalleryState extends State<InteractiveviewerGallery>
}, },
), ),
), ),
),
Positioned( Positioned(
bottom: 0, bottom: 0,
left: 0, left: 0,
@ -287,10 +288,7 @@ class _InteractiveviewerGalleryState extends State<InteractiveviewerGallery>
gradient: LinearGradient( gradient: LinearGradient(
begin: Alignment.topCenter, begin: Alignment.topCenter,
end: Alignment.bottomCenter, end: Alignment.bottomCenter,
colors: [ colors: [Colors.transparent, Colors.black.withOpacity(0.3)],
Colors.transparent,
Colors.black.withOpacity(0.3)
],
), ),
) )
: null, : null,
@ -320,8 +318,7 @@ class _InteractiveviewerGalleryState extends State<InteractiveviewerGallery>
), ),
), ),
), ),
]), ]);
);
} }
// 图片分享 // 图片分享