Skip to content

Commit

Permalink
update old dep pub
Browse files Browse the repository at this point in the history
  • Loading branch information
CarGuo committed Sep 11, 2023
1 parent 37ba38a commit 90604c8
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 49 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.7.10'
ext.kotlin_version = '1.8.10'
repositories {
google()
jcenter()
Expand Down
10 changes: 5 additions & 5 deletions lib/common/utils/common_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ class CommonUtils {
return "";
}
IosDeviceInfo iosInfo = await deviceInfo.iosInfo;
return iosInfo.model ?? "";
return iosInfo.model;
}

/**
Expand Down Expand Up @@ -306,7 +306,7 @@ class CommonUtils {
}
}

static launchUrl(context, String? url) {
static gsyLaunchUrl(context, String? url) {
if (url == null && url!.length == 0) return;
Uri parseUrl = Uri.parse(url);
bool isImage = isImageEnd(parseUrl.toString());
Expand Down Expand Up @@ -355,8 +355,8 @@ class CommonUtils {
}

static launchOutURL(String? url, BuildContext context) async {
if (url != null && await canLaunch(url)) {
await launch(url);
if (url != null && await canLaunchUrl(Uri.parse(url))) {
await launchUrl(Uri.parse(url));
} else {
Fluttertoast.showToast(
msg: GSYLocalizations.i18n(context)!.option_web_launcher_error +
Expand Down Expand Up @@ -491,7 +491,7 @@ class CommonUtils {
child: new Text(GSYLocalizations.i18n(context)!.app_cancel)),
new TextButton(
onPressed: () {
launch(Address.updateUrl);
launchUrl(Uri.parse( Address.updateUrl));
Navigator.pop(context);
},
child: new Text(GSYLocalizations.i18n(context)!.app_ok)),
Expand Down
2 changes: 1 addition & 1 deletion lib/page/debug/debug_label.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Future<(String, String)> _getDeviceInfo() async {
}
IosDeviceInfo iosInfo = await deviceInfo.iosInfo;
String device = await CommonUtils.getDeviceInfo();
return (iosInfo.systemVersion ?? "", device);
return (iosInfo.systemVersion , device);
}

class GlobalLabel extends StatefulWidget {
Expand Down
2 changes: 1 addition & 1 deletion lib/page/home/home_page.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:async';
import 'dart:io';

import 'package:android_intent/android_intent.dart';
import 'package:android_intent_plus/android_intent.dart';
import 'package:flutter/material.dart';
import 'package:gsy_github_app_flutter/common/localization/default_localizations.dart';
import 'package:gsy_github_app_flutter/common/style/gsy_style.dart';
Expand Down
4 changes: 2 additions & 2 deletions lib/page/release/release_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ class _ReleasePageState extends State<ReleasePage>
///打开外部url
_launchURL() async {
String url = _getUrl();
if (await canLaunch(url)) {
await launch(url);
if (await canLaunchUrl(Uri.parse(url))) {
await launchUrl(Uri.parse(url));
} else {
Fluttertoast.showToast(
msg: GSYLocalizations.i18n(context)!.option_web_launcher_error +
Expand Down
2 changes: 1 addition & 1 deletion lib/widget/gsy_common_option_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:gsy_github_app_flutter/common/localization/default_localizations.dart';
import 'package:gsy_github_app_flutter/common/style/gsy_style.dart';
import 'package:gsy_github_app_flutter/common/utils/common_utils.dart';
import 'package:share/share.dart';
import 'package:share_plus/share_plus.dart';

/**
* Created by guoshuyu
Expand Down
2 changes: 1 addition & 1 deletion lib/widget/markdown/gsy_markdown_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class GSYMarkdownWidget extends StatelessWidget {
return kDefaultImageBuilder(uri, "", width, height);
},
onTapLink: (String text, String? href, String title) {
CommonUtils.launchUrl(context, href);
CommonUtils.gsyLaunchUrl(context, href);
},
),
),
Expand Down
88 changes: 56 additions & 32 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.8.0"
android_intent:
android_intent_plus:
dependency: "direct main"
description:
name: android_intent
sha256: "498b451c6be831de2fe032290a8699d2a185c9c6de3bbe6d90db1623a9f62321"
name: android_intent_plus
sha256: f72ae20bb37108694f442e7ae6acbd28b453ca62ce86842f6787b784355abfe6
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.2"
version: "4.0.2"
animations:
dependency: "direct main"
description:
Expand Down Expand Up @@ -225,6 +225,14 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.1"
cross_file:
dependency: transitive
description:
name: cross_file
sha256: fd832b5384d0d6da4f6df60b854d33accaaeb63aa9e10e736a87381f08dee2cb
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.3+5"
crypto:
dependency: transitive
description:
Expand Down Expand Up @@ -253,10 +261,10 @@ packages:
dependency: "direct main"
description:
name: device_info_plus
sha256: "7ff671ed0a6356fa8f2e1ae7d3558d3fb7b6a41e24455e4f8df75b811fb8e4ab"
sha256: "86add5ef97215562d2e090535b0a16f197902b10c369c558a100e74ea06e8659"
url: "https://pub.flutter-io.cn"
source: hosted
version: "8.0.0"
version: "9.0.3"
device_info_plus_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -373,10 +381,10 @@ packages:
dependency: "direct main"
description:
name: fluttertoast
sha256: b528e78a4e69957bb8a33d9e8ceaa728801bb7c6ce599e811e49cf6d94d17fef
sha256: "474f7d506230897a3cd28c965ec21c5328ae5605fc9c400cd330e9e9d6ac175c"
url: "https://pub.flutter-io.cn"
source: hosted
version: "8.0.9"
version: "8.2.2"
frontend_server_client:
dependency: transitive
description:
Expand Down Expand Up @@ -597,10 +605,10 @@ packages:
dependency: transitive
description:
name: mime
sha256: dab22e92b41aa1255ea90ddc4bc2feaf35544fd0728e209638cad041a6e3928a
sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.2"
version: "1.0.4"
nested:
dependency: transitive
description:
Expand Down Expand Up @@ -749,10 +757,10 @@ packages:
dependency: transitive
description:
name: plugin_platform_interface
sha256: "075f927ebbab4262ace8d0b283929ac5410c0ac4e7fc123c76429564facfb757"
sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.2"
version: "2.1.6"
pool:
dependency: transitive
description:
Expand Down Expand Up @@ -825,14 +833,22 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.27.3"
share:
share_plus:
dependency: "direct main"
description:
name: share
sha256: "97e6403f564ed1051a01534c2fc919cb6e40ea55e60a18ec23cee6e0ce19f4be"
name: share_plus
sha256: "6cec740fa0943a826951223e76218df002804adb588235a8910dc3d6b0654e11"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.4"
version: "7.1.0"
share_plus_platform_interface:
dependency: transitive
description:
name: share_plus_platform_interface
sha256: "357412af4178d8e11d14f41723f80f12caea54cf0d5cd29af9dcdab85d58aea7"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.3.0"
shared_preferences:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1050,10 +1066,10 @@ packages:
dependency: "direct main"
description:
name: url_launcher
sha256: a6410777b9f7bf6c5b46594465a23ef295da8e425946835e4c41327fc6d9bcc8
sha256: "781bd58a1eb16069412365c98597726cd8810ae27435f04b3b4d3a470bacd61e"
url: "https://pub.flutter-io.cn"
source: hosted
version: "6.0.17"
version: "6.1.12"
url_launcher_android:
dependency: transitive
description:
Expand All @@ -1074,10 +1090,10 @@ packages:
dependency: transitive
description:
name: url_launcher_linux
sha256: ae3c5ce30a1ba0a69c3f8803b23450703cf915575ad591857df98d9c15c11018
sha256: "207f4ddda99b95b4d4868320a352d374b0b7e05eefad95a4a26f57da413443f5"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.3"
version: "3.0.5"
url_launcher_macos:
dependency: transitive
description:
Expand All @@ -1090,34 +1106,34 @@ packages:
dependency: transitive
description:
name: url_launcher_platform_interface
sha256: "1b9c4dab07794498b83b5f938e26b20f68c3b460a3015b0307f9541cb34ef93d"
sha256: "95465b39f83bfe95fcb9d174829d6476216f2d548b79c38ab2506e0458787618"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.5"
version: "2.1.5"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
sha256: "141c10350b3bb99f4d9d4e0f97a7ebb7e02b810d7d6c2c2a8559a4dd323b9dc9"
sha256: "2942294a500b4fa0b918685aff406773ba0a4cd34b7f42198742a94083020ce5"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.10"
version: "2.0.20"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
sha256: "4e24aac2a2960fb9a70a07992e1ba69cb99fbcee48fdf17abe280ce867bfcea2"
sha256: "7967065dd2b5fccc18c653b97958fdf839c5478c28e767c61ee879f4e7882422"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.2"
version: "3.0.7"
uuid:
dependency: transitive
description:
name: uuid
sha256: "2469694ad079893e3b434a627970c33f2fa5adc46dfe03c9617546969a9a8afc"
sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.6"
version: "3.0.7"
vector_math:
dependency: transitive
description:
Expand Down Expand Up @@ -1186,10 +1202,18 @@ packages:
dependency: transitive
description:
name: win32
sha256: "6b75ac2ddd42f5c226fdaf4498a2b04071c06f1f2b8f7ab1c3f77cc7f2285ff1"
sha256: "7dacfda1edcca378031db9905ad7d7bd56b29fd1a90b0908b71a52a12c41e36b"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.7.0"
version: "5.0.3"
win32_registry:
dependency: transitive
description:
name: win32_registry
sha256: e4506d60b7244251bc59df15656a3093501c37fb5af02105a944d73eb95be4c9
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.1"
xdg_directories:
dependency: transitive
description:
Expand All @@ -1215,5 +1239,5 @@ packages:
source: hosted
version: "3.1.0"
sdks:
dart: ">=3.1.0-185.0.dev <4.0.0"
flutter: ">=3.7.0"
dart: ">=3.1.0 <4.0.0"
flutter: ">=3.13.0"
10 changes: 5 additions & 5 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.4
fluttertoast: ^8.0.8
share: ^2.0.4
fluttertoast: 8.2.2
share_plus: 7.1.0
flutter_spinkit: ^5.1.0
sqflite: 2.3.0
pub_semver: 2.1.4
Expand Down Expand Up @@ -57,10 +57,10 @@ dependencies:
package_info: 2.0.2
connectivity: 3.0.6
flutter_markdown: 0.6.8
device_info_plus: 8.0.0
url_launcher: 6.0.17
device_info_plus: 9.0.3
url_launcher: 6.1.12
google_fonts: 4.0.4
android_intent: 2.0.2
android_intent_plus: 4.0.2
shared_preferences: 2.0.10
built_value: 8.1.3
simple_animations: 4.0.1
Expand Down

0 comments on commit 90604c8

Please sign in to comment.