Skip to content

Commit

Permalink
支持 3.16
Browse files Browse the repository at this point in the history
  • Loading branch information
CarGuo committed Nov 22, 2023
1 parent 1709621 commit 7530e53
Show file tree
Hide file tree
Showing 12 changed files with 121 additions and 111 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@

## 编译运行流程

1、配置好Flutter开发环境(目前Flutter SDK 版本 **3.13**),可参阅 [【搭建环境】](https://flutterchina.club)
1、配置好Flutter开发环境(目前Flutter SDK 版本 **3.16**),可参阅 [【搭建环境】](https://flutterchina.club)

2、clone代码,执行`Packages get`安装第三方包。(因为某些不可抗力原因,国内可能需要设置代理: [代理环境变量](https://flutterchina.club/setup-windows/))

Expand All @@ -109,7 +109,7 @@

### 5、运行之前请注意下

>### 1、本地 Flutter SDK 版本 3.13 ; 2、是否执行过 `flutter pub get`;3、 网络等问题参考: [如果出现登陆失败或者请求失败 ](https://github.com/CarGuo/gsy_github_app_flutter/issues/643)
>### 1、本地 Flutter SDK 版本 3.16 ; 2、是否执行过 `flutter pub get`;3、 网络等问题参考: [如果出现登陆失败或者请求失败 ](https://github.com/CarGuo/gsy_github_app_flutter/issues/643)

### 下载
Expand Down Expand Up @@ -153,7 +153,7 @@

### 第三方框架

>当前 Flutter SDK 版本 3.13
>当前 Flutter SDK 版本 3.16
|| 功能 |
| -------------------------- | -------------- |
Expand Down
6 changes: 3 additions & 3 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ With the use and feedback of the project, will user experience and function opti

### Operation instructions

1. Configure the Flutter development environment (Tag of the current version of Flutter SDK **3.13** ).
1. Configure the Flutter development environment (Tag of the current version of Flutter SDK **3.16** ).

2. Clone code, execute `Packages get'to install third-party packages.

Expand All @@ -68,7 +68,7 @@ With the use and feedback of the project, will user experience and function opti

4、Be careful

>### Local Flutter SDK version 3.13 or more. 2. Does the third-party package version in pubspec. yaml correspond to the third-party package version in pubspec. lock?
>### Local Flutter SDK version 3.16 or more. 2. Does the third-party package version in pubspec. yaml correspond to the third-party package version in pubspec. lock?
### Download

Expand Down Expand Up @@ -107,7 +107,7 @@ With the use and feedback of the project, will user experience and function opti

### Third-party framework

>Current Flutter SDK version **3.13**
>Current Flutter SDK version **3.16**
|| 功能 |
| -------------------------- | -------------- |
Expand Down
53 changes: 27 additions & 26 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PODS:
- connectivity (0.0.1):
- connectivity_plus (0.0.1):
- Flutter
- Reachability
- ReachabilitySwift
- device_info_plus (0.0.1):
- Flutter
- Flutter (1.0.0)
Expand All @@ -11,15 +11,15 @@ PODS:
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- package_info (0.0.1):
- package_info_plus (0.4.5):
- Flutter
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- "permission_handler (5.1.0+2)":
- permission_handler_apple (9.1.1):
- Flutter
- Reachability (3.2)
- share (0.0.1):
- ReachabilitySwift (5.0.0)
- share_plus (0.0.1):
- Flutter
- shared_preferences_ios (0.0.1):
- Flutter
Expand All @@ -33,14 +33,14 @@ PODS:
- Flutter

DEPENDENCIES:
- connectivity (from `.symlinks/plugins/connectivity/ios`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- Flutter (from `Flutter`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- package_info (from `.symlinks/plugins/package_info/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
- share (from `.symlinks/plugins/share/ios`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
Expand All @@ -49,26 +49,27 @@ DEPENDENCIES:
SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
- FMDB
- Reachability
- Toast
trunk:
- ReachabilitySwift

EXTERNAL SOURCES:
connectivity:
:path: ".symlinks/plugins/connectivity/ios"
connectivity_plus:
:path: ".symlinks/plugins/connectivity_plus/ios"
device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios"
Flutter:
:path: Flutter
fluttertoast:
:path: ".symlinks/plugins/fluttertoast/ios"
package_info:
:path: ".symlinks/plugins/package_info/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
permission_handler:
:path: ".symlinks/plugins/permission_handler/ios"
share:
:path: ".symlinks/plugins/share/ios"
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"
share_plus:
:path: ".symlinks/plugins/share_plus/ios"
shared_preferences_ios:
:path: ".symlinks/plugins/shared_preferences_ios/ios"
sqflite:
Expand All @@ -79,16 +80,16 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"

SPEC CHECKSUMS:
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
connectivity_plus: 07c49e96d7fc92bc9920617b83238c4d178b446a
device_info_plus: 7545d84d8d1b896cb16a4ff98c19f07ec4b298ea
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
fluttertoast: 16fbe6039d06a763f3533670197d01fc73459037
fluttertoast: fafc4fa4d01a6a9e4f772ecd190ffa525e9e2d9c
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
package_info_plus: fd030dabf36271f146f1f3beacd48f564b0f17f7
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
share: 0b2c3e82132f5888bccca3351c504d0003b3b410
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
share_plus: 599aa54e4ea31d4b4c0e9c911bcc26c55e791028
shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
Expand Down
14 changes: 7 additions & 7 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -479,14 +479,14 @@
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework",
"${BUILT_PRODUCTS_DIR}/Reachability/Reachability.framework",
"${BUILT_PRODUCTS_DIR}/ReachabilitySwift/Reachability.framework",
"${BUILT_PRODUCTS_DIR}/Toast/Toast.framework",
"${BUILT_PRODUCTS_DIR}/connectivity/connectivity.framework",
"${BUILT_PRODUCTS_DIR}/connectivity_plus/connectivity_plus.framework",
"${BUILT_PRODUCTS_DIR}/device_info_plus/device_info_plus.framework",
"${BUILT_PRODUCTS_DIR}/fluttertoast/fluttertoast.framework",
"${BUILT_PRODUCTS_DIR}/package_info/package_info.framework",
"${BUILT_PRODUCTS_DIR}/package_info_plus/package_info_plus.framework",
"${BUILT_PRODUCTS_DIR}/path_provider_foundation/path_provider_foundation.framework",
"${BUILT_PRODUCTS_DIR}/share/share.framework",
"${BUILT_PRODUCTS_DIR}/share_plus/share_plus.framework",
"${BUILT_PRODUCTS_DIR}/shared_preferences_ios/shared_preferences_ios.framework",
"${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework",
"${BUILT_PRODUCTS_DIR}/url_launcher_ios/url_launcher_ios.framework",
Expand All @@ -497,12 +497,12 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Reachability.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/connectivity.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/connectivity_plus.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/device_info_plus.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/fluttertoast.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info_plus.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_foundation.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/share.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/share_plus.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences_ios.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_ios.framework",
Expand Down
14 changes: 9 additions & 5 deletions lib/common/utils/common_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,12 @@ class CommonUtils {

static getThemeData(Color color) {
return ThemeData(
primarySwatch: color as MaterialColor?,
platform: TargetPlatform.android,
useMaterial3: false,
primaryColor: color,
colorScheme: ColorScheme.fromSeed(
seedColor: color,
primary: color,
),
appBarTheme: AppBarTheme(
systemOverlayStyle: SystemUiOverlayStyle.light.copyWith(
systemNavigationBarContrastEnforced: true,
Expand Down Expand Up @@ -371,8 +375,8 @@ class CommonUtils {
builder: (BuildContext context) {
return new Material(
color: Colors.transparent,
child: WillPopScope(
onWillPop: () => new Future.value(false),
child: PopScope(
canPop: false,
child: Center(
child: new Container(
width: 200.0,
Expand Down Expand Up @@ -491,7 +495,7 @@ class CommonUtils {
child: new Text(GSYLocalizations.i18n(context)!.app_cancel)),
new TextButton(
onPressed: () {
launchUrl(Uri.parse( Address.updateUrl));
launchUrl(Uri.parse(Address.updateUrl));
Navigator.pop(context);
},
child: new Text(GSYLocalizations.i18n(context)!.app_ok)),
Expand Down
11 changes: 6 additions & 5 deletions lib/common/utils/navigator_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ class NavigatorUtils {
}

///通用列表
static gotoCommonList(
BuildContext context, String? title, String showType, CommonListDataType dataType,
static gotoCommonList(BuildContext context, String? title, String showType,
CommonListDataType dataType,
{String? userName, String? reposName}) {
NavigatorRouter(
context,
Expand Down Expand Up @@ -307,7 +307,7 @@ class NavigatorUtils {
return MediaQuery(

///不受系统字体缩放影响
data: MediaQuery.of(context).copyWith(textScaleFactor: 1),
data: MediaQuery.of(context).copyWith(textScaler: TextScaler.noScaling),
child: NeverOverScrollIndicator(
needOverload: false,
child: widget,
Expand All @@ -327,8 +327,9 @@ class NavigatorUtils {
return MediaQuery(

///不受系统字体缩放影响
data: MediaQueryData.fromView(WidgetsBinding.instance.platformDispatcher.views.first)
.copyWith(textScaleFactor: 1),
data: MediaQueryData.fromView(
WidgetsBinding.instance.platformDispatcher.views.first)
.copyWith(textScaler: TextScaler.noScaling),
child: NeverOverScrollIndicator(
needOverload: false,
child: new SafeArea(child: builder!(context)),
Expand Down
1 change: 1 addition & 0 deletions lib/page/gsy_webview.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class _GSYWebViewState extends State<GSYWebView> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: GSYColors.mainBackgroundColor,
appBar: new AppBar(
title: _renderTitle(),
),
Expand Down
10 changes: 4 additions & 6 deletions lib/page/home/home_page.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'dart:async';
import 'dart:io';

import 'package:android_intent_plus/android_intent.dart';
Expand Down Expand Up @@ -31,7 +30,7 @@ class _HomePageState extends State<HomePage> {
final GlobalKey<MyPageState> myKey = new GlobalKey();

/// 不退出
Future<bool> _dialogExitApp(BuildContext context) async {
_dialogExitApp(BuildContext context) async {
///如果是 android 回到桌面
if (Platform.isAndroid) {
AndroidIntent intent = AndroidIntent(
Expand All @@ -40,8 +39,6 @@ class _HomePageState extends State<HomePage> {
);
await intent.launch();
}

return Future.value(false);
}

_renderTab(icon, text) {
Expand All @@ -63,8 +60,9 @@ class _HomePageState extends State<HomePage> {
];

///增加返回按键监听
return WillPopScope(
onWillPop: () {
return PopScope(
canPop: false,
onPopInvoked: (didPop) {
return _dialogExitApp(context);
},
child: new GSYTabBarWidget(
Expand Down

0 comments on commit 7530e53

Please sign in to comment.