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