diff --git a/wallpaper/ios/Runner.xcodeproj/project.pbxproj b/wallpaper/ios/Runner.xcodeproj/project.pbxproj index f21fa51..d0f48ec 100644 --- a/wallpaper/ios/Runner.xcodeproj/project.pbxproj +++ b/wallpaper/ios/Runner.xcodeproj/project.pbxproj @@ -161,7 +161,6 @@ F8A7AFE61E77B491119ECA54 /* Pods-RunnerTests.release.xcconfig */, 2502563898FB261B809E8C44 /* Pods-RunnerTests.profile.xcconfig */, ); - name = Pods; path = Pods; sourceTree = ""; }; @@ -471,7 +470,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = Z2Z2H7XT5K; + DEVELOPMENT_TEAM = 8DQD6BV6H9; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -654,7 +653,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = Z2Z2H7XT5K; + DEVELOPMENT_TEAM = 8DQD6BV6H9; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -677,7 +676,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = Z2Z2H7XT5K; + DEVELOPMENT_TEAM = 8DQD6BV6H9; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( diff --git a/wallpaper/lib/pages/imgscanpage/imgscanpage_view.dart b/wallpaper/lib/pages/imgscanpage/imgscanpage_view.dart index 6e5632e..05d0cf5 100644 --- a/wallpaper/lib/pages/imgscanpage/imgscanpage_view.dart +++ b/wallpaper/lib/pages/imgscanpage/imgscanpage_view.dart @@ -2,6 +2,10 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:wallpaper/models/imgnetodel.dart'; +import 'package:photo_view/photo_view.dart'; +import 'package:photo_view/photo_view_gallery.dart'; + + class ImgScanPageView extends GetView { final NetImgCategory dataModel; final int currentIndex; @@ -14,9 +18,39 @@ class ImgScanPageView extends GetView { appBar: AppBar( title: const Text("查看大图"), ), - body: const Center( - child: Text("下载的..."), - ), + body: Container( + child: PhotoViewGallery.builder( + scrollPhysics: const BouncingScrollPhysics(), + builder: (BuildContext context, int index) { + return PhotoViewGalleryPageOptions( + imageProvider: NetworkImage(dataModel.data![index].original!), + initialScale: PhotoViewComputedScale.contained * 0.8, + minScale: PhotoViewComputedScale.contained*0.4, + maxScale: PhotoViewComputedScale.contained * 4, + // heroAttributes: PhotoViewHeroAttributes(tag: galleryItems[index].id), + ); + }, + itemCount: dataModel.data!.length, + loadingBuilder: (context, event) => Center( + child: Container( + width: 20.0, + height: 20.0, + child: CircularProgressIndicator( + value: event == null + ? 0 + : event.cumulativeBytesLoaded / event.expectedTotalBytes!, + ), + ), + ), + // backgroundDecoration: widget.backgroundDecoration, + // pageController: widget.pageController, + onPageChanged: onPageChanged, + ) + ), ); } + + void onPageChanged(int index){ + print("点击了图片...."); + } } \ No newline at end of file diff --git a/wallpaper/pubspec.lock b/wallpaper/pubspec.lock index b92901a..4e0d61b 100644 --- a/wallpaper/pubspec.lock +++ b/wallpaper/pubspec.lock @@ -232,6 +232,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.9.0" + photo_view: + dependency: "direct main" + description: + name: photo_view + sha256: "1fc3d970a91295fbd1364296575f854c9863f225505c28c46e0a03e48960c75e" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.15.0" plugin_platform_interface: dependency: transitive description: diff --git a/wallpaper/pubspec.yaml b/wallpaper/pubspec.yaml index d5712a2..f9b7514 100644 --- a/wallpaper/pubspec.yaml +++ b/wallpaper/pubspec.yaml @@ -43,11 +43,14 @@ dependencies: # 加载、进度、提示框 flutter_easyloading: ^3.0.5 + #图片查看浏览器 + photo_view: ^0.15.0 + # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.6 transparent_image: - + dev_dependencies: flutter_test: sdk: flutter