From c14162c66c9b3bf7da8c9d739a972248ed5646ac Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Wed, 21 Jul 2021 17:49:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=88=86=E4=BA=AB=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/gradle.properties | 2 +- lib/article/hot_article_details_page.dart | 1 + lib/home/activity_list_page.dart | 6 ++++++ lib/login/login_page.dart | 12 ++++++------ lib/union/store_details_page.dart | 5 ++++- pubspec.lock | 22 +++++++++++----------- pubspec.yaml | 5 ++++- 7 files changed, 33 insertions(+), 20 deletions(-) diff --git a/android/gradle.properties b/android/gradle.properties index 4d3226ab..94adc3a3 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,3 +1,3 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true -android.enableJetifier=true \ No newline at end of file +android.enableJetifier=true diff --git a/lib/article/hot_article_details_page.dart b/lib/article/hot_article_details_page.dart index 15c45128..6d8bc126 100644 --- a/lib/article/hot_article_details_page.dart +++ b/lib/article/hot_article_details_page.dart @@ -1,6 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; +import 'package:share/share.dart'; class HotArticleDetailsPage extends StatefulWidget { @override diff --git a/lib/home/activity_list_page.dart b/lib/home/activity_list_page.dart index 62f6cd05..3114da21 100644 --- a/lib/home/activity_list_page.dart +++ b/lib/home/activity_list_page.dart @@ -64,6 +64,12 @@ class _ActivityListPage extends State } } + @override + void dispose() { + super.dispose(); + _refreshController.dispose(); + } + RefreshController _refreshController = RefreshController(); @override diff --git a/lib/login/login_page.dart b/lib/login/login_page.dart index ff48390d..3b0ae22f 100644 --- a/lib/login/login_page.dart +++ b/lib/login/login_page.dart @@ -16,7 +16,7 @@ import 'package:huixiang/generated/l10n.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:dio/dio.dart'; import 'package:huixiang/view_widget/loading_view.dart'; -import 'package:photo_view/photo_view.dart'; +// import 'package:photo_view/photo_view.dart'; import 'package:shared_preferences/shared_preferences.dart'; class LoginPage extends StatefulWidget { @@ -382,11 +382,11 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { child: Stack( alignment: Alignment.center, children: [ - PhotoView( - imageProvider: AssetImage("assets/image/laoban.png"), - initialScale: Platform.isAndroid ? 1.02 : 1.2, - basePosition: alignmentProgress, - ), + // PhotoView( + // imageProvider: AssetImage("assets/image/laoban.png"), + // initialScale: Platform.isAndroid ? 1.02 : 1.2, + // basePosition: alignmentProgress, + // ), Positioned( top: 54.h, left: 28.w, diff --git a/lib/union/store_details_page.dart b/lib/union/store_details_page.dart index 3b6474cb..9936f69a 100644 --- a/lib/union/store_details_page.dart +++ b/lib/union/store_details_page.dart @@ -5,6 +5,7 @@ import 'package:flutter_html/image_render.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; +import 'package:share/share.dart'; class StoreDetailsPage extends StatefulWidget { final Map arguments; @@ -26,7 +27,9 @@ class _StoreDetailsPage extends State { action: Container( margin: EdgeInsets.only(right: 15), child: GestureDetector( - onTap: () {}, + onTap: () { + Share.share(widget.arguments['html']); + }, child: Icon( Icons.share, size: 24, diff --git a/pubspec.lock b/pubspec.lock index 9a9eabed..ea45bfd5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -56,7 +56,7 @@ packages: name: async url: "https://pub.flutter-io.cn" source: hosted - version: "2.5.0" + version: "2.6.1" barcode: dependency: transitive description: @@ -623,13 +623,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "4.1.0" - photo_view: - dependency: "direct main" - description: - name: photo_view - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.11.1" platform: dependency: transitive description: @@ -714,6 +707,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.26.0" + share: + dependency: "direct main" + description: + name: share + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.6.4+5" shared_preferences: dependency: "direct main" description: @@ -851,7 +851,7 @@ packages: name: test_api url: "https://pub.flutter-io.cn" source: hosted - version: "0.2.19" + version: "0.3.0" timing: dependency: transitive description: @@ -963,7 +963,7 @@ packages: name: win32 url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.5" + version: "2.2.5" xdg_directories: dependency: transitive description: @@ -986,5 +986,5 @@ packages: source: hosted version: "3.1.0" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=2.13.0 <3.0.0" flutter: ">=2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index ee197dc0..b64dff58 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -38,6 +38,7 @@ dependencies: permission_handler: ^5.0.1+1 amap_flutter_map: ^1.0.0 amap_flutter_location: ^2.0.0 # Null safety + share: ^0.6.1+1 # flutter_baidu_mapapi_search: ^2.0.1 # flutter_baidu_mapapi_map: ^2.0.1 @@ -76,13 +77,14 @@ dependencies: cached_network_image: ^2.0.0 flutter_html: ^1.3.0 #2.1.0 - photo_view: ^0.11.1 +# photo_view: ^0.11.1 chewie: ^0.12.2 video_player: ^1.0.1 package_info: ^2.0.2 + dev_dependencies: flutter_test: sdk: flutter @@ -90,6 +92,7 @@ dev_dependencies: build_runner: ^1.11.5 json_serializable: ^3.5.1 + flutter: uses-material-design: true From 815e8c272145448e82e316d60014e6bfee992386 Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Wed, 21 Jul 2021 18:08:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/union/store_details_page.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/union/store_details_page.dart b/lib/union/store_details_page.dart index 9936f69a..f7580b70 100644 --- a/lib/union/store_details_page.dart +++ b/lib/union/store_details_page.dart @@ -28,7 +28,7 @@ class _StoreDetailsPage extends State { margin: EdgeInsets.only(right: 15), child: GestureDetector( onTap: () { - Share.share(widget.arguments['html']); + Share.share('https://www.sohu.com/a/346415345_99912465'); }, child: Icon( Icons.share,