From 9c25346b93b9ddaebe8bffdb4ae4f8713e9c73fe Mon Sep 17 00:00:00 2001 From: Tecode <283731869@qq.com> Date: Sat, 8 Aug 2020 16:18:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20flutter=E7=89=88=E6=9C=AC=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E5=88=B01.20.x=EF=BC=8C=E5=9B=BE=E7=89=87=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E7=BC=A9=E6=94=BE=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 12 ++-- ios/Flutter/.last_build_id | 2 +- ios/Podfile | 76 +++++------------------- ios/Podfile.lock | 14 +---- ios/Runner.xcodeproj/project.pbxproj | 2 + lib/containers/DiscoveryDetail.dart | 16 +++-- pubspec.lock | 87 ++++++++++------------------ pubspec.yaml | 7 +-- 8 files changed, 71 insertions(+), 145 deletions(-) diff --git a/README.md b/README.md index 7369759..fd17fdf 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# Dynamic Theme +# Dynamic Theme(Flutter 1.20.x) + +## [flutter-1.17.x可以运行的版本](https://github.com/Tecode/dynamic_theme/tree/flutter-1.17.x) ## Android版本下载(iOS下载代码打包📦)

@@ -30,10 +32,10 @@ ## Flutter version ```bash -Flutter 1.17.3 • channel stable • https://github.com/flutter/flutter.git -Framework • revision b041144f83 (5 days ago) • 2020-06-04 09:26:11 -0700 -Engine • revision ee76268252 -Tools • Dart 2.8.4 +Flutter 1.20.1 • channel stable • https://github.com/flutter/flutter.git +Framework • revision 2ae34518b8 (2 days ago) • 2020-08-05 19:53:19 -0700 +Engine • revision c8e3b94853 +Tools • Dart 2.9.0 ``` ## Flutter 集成测试 diff --git a/ios/Flutter/.last_build_id b/ios/Flutter/.last_build_id index 00fb332..fef6e87 100644 --- a/ios/Flutter/.last_build_id +++ b/ios/Flutter/.last_build_id @@ -1 +1 @@ -f17dc7e6ed95f4795fbc6c5611df0eb1 \ No newline at end of file +5577b0c708455cd17103ffcf783689cc \ No newline at end of file diff --git a/ios/Podfile b/ios/Podfile index 6697f0a..1e8c3c9 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -10,78 +10,32 @@ project 'Runner', { 'Release' => :release, } -def parse_KV_file(file, separator='=') - file_abs_path = File.expand_path(file) - if !File.exists? file_abs_path - return []; +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" end - generated_key_values = {} - skip_line_start_symbols = ["#", "/"] - File.foreach(file_abs_path) do |line| - next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } - plugin = line.split(pattern=separator) - if plugin.length == 2 - podname = plugin[0].strip() - path = plugin[1].strip() - podpath = File.expand_path("#{path}", file_abs_path) - generated_key_values[podname] = podpath - else - puts "Invalid plugin specification: #{line}" - end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches end - generated_key_values + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" end +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + target 'Runner' do use_frameworks! use_modular_headers! - # Flutter Pod - - copied_flutter_dir = File.join(__dir__, 'Flutter') - copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework') - copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec') - unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path) - # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet. - # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration. - # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist. - - generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig') - unless File.exist?(generated_xcode_build_settings_path) - raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first" - end - generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path) - cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR']; - - unless File.exist?(copied_framework_path) - FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir) - end - unless File.exist?(copied_podspec_path) - FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir) - end - end - - # Keep pod path relative so it can be checked into Podfile.lock. - pod 'Flutter', :path => 'Flutter' - - # Plugin Pods - - # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock - # referring to absolute paths on developers' machines. - system('rm -rf .symlinks') - system('mkdir -p .symlinks/plugins') - plugin_pods = parse_KV_file('../.flutter-plugins') - plugin_pods.each do |name, path| - symlink = File.join('.symlinks', 'plugins', name) - File.symlink(path, symlink) - pod name, :path => File.join(symlink, 'ios') - end + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) end post_install do |installer| installer.pods_project.targets.each do |target| - target.build_configurations.each do |config| - config.build_settings['ENABLE_BITCODE'] = 'NO' - end + flutter_additional_ios_build_settings(target) end end diff --git a/ios/Podfile.lock b/ios/Podfile.lock index acf22b8..bc0798b 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -5,10 +5,6 @@ PODS: - FMDB/standard (2.7.5) - path_provider (0.0.1): - Flutter - - path_provider_linux (0.0.1): - - Flutter - - path_provider_macos (0.0.1): - - Flutter - sqflite (0.0.1): - Flutter - FMDB (~> 2.7.2) @@ -18,8 +14,6 @@ PODS: DEPENDENCIES: - Flutter (from `Flutter`) - path_provider (from `.symlinks/plugins/path_provider/ios`) - - path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`) - - path_provider_macos (from `.symlinks/plugins/path_provider_macos/ios`) - sqflite (from `.symlinks/plugins/sqflite/ios`) - uni_links (from `.symlinks/plugins/uni_links/ios`) @@ -32,10 +26,6 @@ EXTERNAL SOURCES: :path: Flutter path_provider: :path: ".symlinks/plugins/path_provider/ios" - path_provider_linux: - :path: ".symlinks/plugins/path_provider_linux/ios" - path_provider_macos: - :path: ".symlinks/plugins/path_provider_macos/ios" sqflite: :path: ".symlinks/plugins/sqflite/ios" uni_links: @@ -45,11 +35,9 @@ SPEC CHECKSUMS: Flutter: 0e3d915762c693b495b44d77113d4970485de6ec FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c - path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4 - path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0 sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0 uni_links: d97da20c7701486ba192624d99bffaaffcfc298a -PODFILE CHECKSUM: c34e2287a9ccaa606aeceab922830efb9a6ff69a +PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c COCOAPODS: 1.8.4 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index fc40efe..70ee6f2 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -373,6 +373,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = XXB3A2BN5T; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -537,6 +538,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = XXB3A2BN5T; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/lib/containers/DiscoveryDetail.dart b/lib/containers/DiscoveryDetail.dart index 5b7fa4e..3a16e19 100644 --- a/lib/containers/DiscoveryDetail.dart +++ b/lib/containers/DiscoveryDetail.dart @@ -30,12 +30,18 @@ class _DiscoveryDetailState extends State { child: Hero( tag: widget.tag, child: Center( - child: CachedNetworkImage( - progressIndicatorBuilder: (context, url, progress) => Container( - color: Theme.of(context).backgroundColor, + child: InteractiveViewer( + boundaryMargin: EdgeInsets.all(20.0), + minScale: 0.1, + maxScale: 1.6, + child: CachedNetworkImage( + progressIndicatorBuilder: (context, url, progress) => + Container( + color: Theme.of(context).backgroundColor, + ), + imageUrl: widget.url, + fit: BoxFit.contain, ), - imageUrl: widget.url, - fit: BoxFit.contain, ), ), ), diff --git a/pubspec.lock b/pubspec.lock index 0759bb6..77163cf 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -35,7 +35,7 @@ packages: name: async url: "https://pub.flutter-io.cn" source: hosted - version: "2.4.1" + version: "2.4.2" boolean_selector: dependency: transitive description: @@ -50,6 +50,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "2.2.0+1" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.0" charcode: dependency: transitive description: @@ -77,7 +84,7 @@ packages: name: collection url: "https://pub.flutter-io.cn" source: hosted - version: "1.14.12" + version: "1.14.13" convert: dependency: transitive description: @@ -98,7 +105,7 @@ packages: name: crypto url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.4" + version: "2.1.5" csslib: dependency: transitive description: @@ -113,13 +120,20 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.1.3" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.0" file: dependency: transitive description: name: file url: "https://pub.flutter-io.cn" source: hosted - version: "5.1.0" + version: "5.2.1" flutter: dependency: "direct main" description: flutter @@ -140,12 +154,10 @@ packages: flutter_easyrefresh: dependency: "direct main" description: - path: "." - ref: e5c648d8952154b29101cb98058bf0708aa01cf0 - resolved-ref: e5c648d8952154b29101cb98058bf0708aa01cf0 - url: "https://github.com/xuelongqy/flutter_easyrefresh.git" - source: git - version: "2.1.1" + name: flutter_easyrefresh + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.5" flutter_test: dependency: transitive description: flutter @@ -191,13 +203,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "3.1.4" - image: - dependency: transitive - description: - name: image - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.1.12" intl: dependency: transitive description: @@ -225,7 +230,7 @@ packages: name: json_rpc_2 url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.0" + version: "2.2.1" logging: dependency: transitive description: @@ -239,7 +244,7 @@ packages: name: matcher url: "https://pub.flutter-io.cn" source: hosted - version: "0.12.6" + version: "0.12.8" meta: dependency: transitive description: @@ -254,13 +259,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.9.6+3" - multi_server_socket: - dependency: transitive - description: - name: multi_server_socket - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.0.2" node_interop: dependency: transitive description: @@ -295,7 +293,7 @@ packages: name: path url: "https://pub.flutter-io.cn" source: hosted - version: "1.6.4" + version: "1.7.0" path_provider: dependency: transitive description: @@ -331,13 +329,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.9.0" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.4.0" platform: dependency: transitive description: @@ -365,7 +356,7 @@ packages: name: process url: "https://pub.flutter-io.cn" source: hosted - version: "3.0.12" + version: "3.0.13" pub_semver: dependency: transitive description: @@ -373,13 +364,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.4.4" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.1.3" rxdart: dependency: transitive description: @@ -461,7 +445,7 @@ packages: name: stack_trace url: "https://pub.flutter-io.cn" source: hosted - version: "1.9.3" + version: "1.9.5" stream_channel: dependency: transitive description: @@ -503,28 +487,28 @@ packages: name: test url: "https://pub.flutter-io.cn" source: hosted - version: "1.14.4" + version: "1.15.2" test_api: dependency: transitive description: name: test_api url: "https://pub.flutter-io.cn" source: hosted - version: "0.2.15" + version: "0.2.17" test_core: dependency: transitive description: name: test_core url: "https://pub.flutter-io.cn" source: hosted - version: "0.3.4" + version: "0.3.10" typed_data: dependency: transitive description: name: typed_data url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.6" + version: "1.2.0" uni_links: dependency: "direct main" description: @@ -595,13 +579,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.1.0" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.flutter-io.cn" - source: hosted - version: "3.6.1" yaml: dependency: transitive description: @@ -610,5 +587,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=2.8.0 <3.0.0" + dart: ">=2.9.0-14.0.dev <3.0.0" flutter: ">=1.12.13+hotfix.5 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 1b959af..dafa11e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: A new Flutter application. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.3.0+1 +version: 1.3.1+1 environment: sdk: ">=2.2.2 <3.0.0" @@ -20,10 +20,7 @@ dependencies: flutter: sdk: flutter uni_links: 0.4.0 - flutter_easyrefresh: - git: - url: https://github.com/xuelongqy/flutter_easyrefresh.git - ref: e5c648d8952154b29101cb98058bf0708aa01cf0 + flutter_easyrefresh: 2.1.5 cached_network_image: 2.2.0+1 # The following adds the Cupertino Icons font to your application.