From 765c5f329bbdf10ba5d63d6843b91be04ce1818f Mon Sep 17 00:00:00 2001 From: bluesea <307723040@qq.com> Date: Mon, 13 May 2024 17:52:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=9F=A5=E7=9C=8B=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/imgscanpage/imgscanpage_view.dart | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/wallpaper/lib/pages/imgscanpage/imgscanpage_view.dart b/wallpaper/lib/pages/imgscanpage/imgscanpage_view.dart index 05d0cf5..1afed39 100644 --- a/wallpaper/lib/pages/imgscanpage/imgscanpage_view.dart +++ b/wallpaper/lib/pages/imgscanpage/imgscanpage_view.dart @@ -18,7 +18,9 @@ class ImgScanPageView extends GetView { appBar: AppBar( title: const Text("查看大图"), ), - body: Container( + body: Stack( + children: [ + Container( child: PhotoViewGallery.builder( scrollPhysics: const BouncingScrollPhysics(), builder: (BuildContext context, int index) { @@ -27,6 +29,9 @@ class ImgScanPageView extends GetView { initialScale: PhotoViewComputedScale.contained * 0.8, minScale: PhotoViewComputedScale.contained*0.4, maxScale: PhotoViewComputedScale.contained * 4, + onTapDown: (context, details, controllerValue) { + print("touch down..."); + }, // heroAttributes: PhotoViewHeroAttributes(tag: galleryItems[index].id), ); }, @@ -45,12 +50,27 @@ class ImgScanPageView extends GetView { // backgroundDecoration: widget.backgroundDecoration, // pageController: widget.pageController, onPageChanged: onPageChanged, + + ) ), + Align( + alignment: Alignment.bottomCenter, + child: Container( + child: IconButton(onPressed: (){ + print("download....."); + }, icon: Icon(Icons.download),color: Colors.white, + ), + height: 90, + width: 90, + ) + ), + ], + ), ); } void onPageChanged(int index){ - print("点击了图片...."); + print("切换了图片...."); } } \ No newline at end of file