File tree Expand file tree Collapse file tree 8 files changed +15
-30
lines changed
Expand file tree Collapse file tree 8 files changed +15
-30
lines changed Original file line number Diff line number Diff line change 66 <uses-permission android : name =" android.permission.VIBRATE" />
77 <uses-permission android : name =" android.permission.READ_EXTERNAL_STORAGE" android : maxSdkVersion =" 32" />
88 <uses-permission android : name =" android.permission.WRITE_EXTERNAL_STORAGE" />
9- <uses-permission android : name =" android.permission.READ_MEDIA_VIDEOS" />
10- <uses-permission android : name =" android.permission.READ_MEDIA_IMAGES" />
11- <uses-permission android : name =" android.permission.READ_MEDIA_AUDIO" />
12- <uses-permission android : name =" android.permission.REQUEST_INSTALL_PACKAGES" />
139 <uses-permission android : name =" android.permission.USE_BIOMETRIC" />
1410 <uses-permission android : name =" android.permission.INTERNET" />
1511
Original file line number Diff line number Diff line change @@ -177,7 +177,6 @@ class MainScreenState extends State<MainScreen>
177177 });
178178 fetchReleases ();
179179 WidgetsBinding .instance.addPostFrameCallback ((_) async {
180- IToast .showTop ("Initialized" );
181180 if (ChewieHiveUtil .getBool (CloudOTPHiveUtil .autoFocusSearchBarKey,
182181 defaultValue: false )) {
183182 ShortcutsUtil .focusSearch ();
Original file line number Diff line number Diff line change @@ -1063,14 +1063,6 @@ packages:
10631063 url: "https://pub.flutter-io.cn"
10641064 source: hosted
10651065 version: "2.0.3"
1066- install_plugin:
1067- dependency: "direct main"
1068- description:
1069- name: install_plugin
1070- sha256: "6fb67ba0781e75de4f2f2266ed25e835bfd277c5bfc2ed034af52774355857c6"
1071- url: "https://pub.flutter-io.cn"
1072- source: hosted
1073- version: "2.1.0"
10741066 intl:
10751067 dependency: transitive
10761068 description:
Original file line number Diff line number Diff line change 11name : cloudotp
2- version : 3.0 .0+300
2+ version : 3.1 .0+310
33description : An awesome two-factor authenticator which supports cloud storage and multiple platforms.
44publish_to : none
55
@@ -92,7 +92,6 @@ dependencies:
9292 restart_app : ^1.2.1 # 重启APP
9393 tray_manager : ^0.2.3 # 托盘图标
9494 hotkey_manager : ^0.2.3 # 热键
95- install_plugin : ^2.1.0 # 安装APP
9695 responsive_builder : ^0.7.1 # 响应式布局
9796 flutter_displaymode : ^0.6.0 # 设置刷新率
9897 flutter_local_notifications : ^17.2.1+2 # 本地通知
Original file line number Diff line number Diff line change 11import 'package:awesome_chewie/src/Utils/General/responsive_util.dart' ;
22import 'package:awesome_chewie/src/Utils/General/string_util.dart' ;
33import 'package:flutter_local_notifications/flutter_local_notifications.dart' ;
4- import 'package:install_plugin/install_plugin.dart' ;
54
65class NotificationUtil {
76 static final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin =
@@ -18,9 +17,9 @@ class NotificationUtil {
1817 await flutterLocalNotificationsPlugin.initialize (
1918 InitializationSettings (android: android),
2019 onDidReceiveNotificationResponse: (respose) async {
21- if (respose.id == 1 && respose.payload.notNullOrEmpty) {
22- await InstallPlugin .install (respose.payload! );
23- }
20+ // if (respose.id == 1 && respose.payload.notNullOrEmpty) {
21+ // await InstallPlugin.install(respose.payload!);
22+ // }
2423 },
2524 );
2625 flutterLocalNotificationsPlugin
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import 'package:flutter/services.dart';
88import 'package:flutter_inappwebview/flutter_inappwebview.dart' ;
99import 'package:html/parser.dart' ;
1010import 'package:http/http.dart' as http;
11+ import 'package:package_info_plus/package_info_plus.dart' ;
1112import 'package:share_plus/share_plus.dart' ;
1213import 'package:url_launcher/url_launcher.dart' ;
1314
@@ -164,6 +165,15 @@ class UriUtil {
164165 await launchUrl (uri, mode: LaunchMode .externalApplication);
165166 }
166167
168+ static Future <void > openGooglePlayStore () async {
169+ String packageName = (await PackageInfo .fromPlatform ()).packageName;
170+ final Uri playStoreUri =
171+ Uri .parse ("https://play.google.com/store/apps/details?id=$packageName " );
172+ if (await canLaunchUrl (playStoreUri)) {
173+ await launchUrl (playStoreUri, mode: LaunchMode .externalApplication);
174+ }
175+ }
176+
167177 static Future <dynamic > getRedirectUrl (String url) async {
168178 Response res = await Dio ().get (
169179 url,
Original file line number Diff line number Diff line change @@ -227,16 +227,7 @@ class ChewieUtils {
227227 cancelButtonText: ChewieS .current.updateLater,
228228 onTapConfirm: () async {
229229 if (ResponsiveUtil .isAndroid ()) {
230- ReleaseAsset androidAssset = await FileUtil .getAndroidAsset (
231- latestVersion, latestReleaseItem! );
232- ILogger .info (ResponsiveUtil .appName,
233- "Get android asset: $androidAssset " );
234- FileUtil .downloadAndUpdate (
235- context,
236- androidAssset.pkgsDownloadUrl,
237- latestReleaseItem.htmlUrl,
238- version: latestVersion,
239- );
230+ UriUtil .openGooglePlayStore ();
240231 } else {
241232 UriUtil .openExternal (latestReleaseItem! .htmlUrl);
242233 return ;
Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ dependencies:
5757 flutter_displaymode : ^0.6.0
5858 image_gallery_saver : ^2.0.3
5959 permission_handler : ^11.3.1
60- install_plugin : ^2.1.0
6160 hotkey_manager : ^0.2.3
6261 flutter_inappwebview : 6.0.0
6362 # 工具
You can’t perform that action at this time.
0 commit comments