图片查看页面ui

This commit is contained in:
bluesea 2024-05-13 17:52:33 +08:00
parent 5c6e2a573f
commit 765c5f329b

View File

@ -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("切换了图片....");
}
}