Skip to content

Commit a90ab1d

Browse files
committed
update 3.10.0
1 parent 40faf94 commit a90ab1d

File tree

10 files changed

+47
-47
lines changed

10 files changed

+47
-47
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
java-version: 11
2626
- uses: subosito/flutter-action@v1
2727
with:
28-
flutter-version: '3.7.10'
28+
flutter-version: '3.10.0'
2929
- uses: finnp/create-file-action@master
3030
env:
3131
FILE_NAME: lib/common/config/ignoreConfig.dart
@@ -47,7 +47,7 @@ jobs:
4747
java-version: 11
4848
- uses: subosito/flutter-action@v1
4949
with:
50-
flutter-version: '3.7.10'
50+
flutter-version: '3.10.1'
5151
- uses: finnp/create-file-action@master
5252
env:
5353
FILE_NAME: lib/common/config/ignoreConfig.dart

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585

8686
## 编译运行流程
8787

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

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

@@ -109,7 +109,7 @@
109109

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

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

115115
### 下载
@@ -153,7 +153,7 @@
153153

154154
### 第三方框架
155155

156-
>当前 Flutter SDK 版本 3.7
156+
>当前 Flutter SDK 版本 3.10
157157
158158
|| 功能 |
159159
| -------------------------- | -------------- |

README_EN.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ With the use and feedback of the project, will user experience and function opti
4343

4444
### Operation instructions
4545

46-
1. Configure the Flutter development environment (Tag of the current version of Flutter SDK **3.7** ).
46+
1. Configure the Flutter development environment (Tag of the current version of Flutter SDK **3.10** ).
4747

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

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

6969
4、Be careful
7070

71-
>### Local Flutter SDK version 3.7 or more. 2. Does the third-party package version in pubspec. yaml correspond to the third-party package version in pubspec. lock?
71+
>### Local Flutter SDK version 3.10 or more. 2. Does the third-party package version in pubspec. yaml correspond to the third-party package version in pubspec. lock?
7272
7373
### Download
7474

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

108108
### Third-party framework
109109

110-
>Current Flutter SDK version **3.7**
110+
>Current Flutter SDK version **3.10**
111111
112112
|| 功能 |
113113
| -------------------------- | -------------- |

ios/Runner.xcodeproj/project.pbxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,7 @@
520520
files = (
521521
);
522522
inputPaths = (
523+
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
523524
);
524525
name = "Thin Binary";
525526
outputPaths = (

lib/common/dao/repos_dao.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -765,10 +765,11 @@ class ReposDao {
765765
try {
766766
StringList? link = res.headers['link'];
767767
if (link != null) {
768-
int indexStart = link[0].lastIndexOf("page=") + 5;
769-
int indexEnd = link[0].lastIndexOf(">");
768+
var [linkFirst, _] = link;
769+
int indexStart = linkFirst.lastIndexOf("page=") + 5;
770+
int indexEnd = linkFirst.lastIndexOf(">");
770771
if (indexStart >= 0 && indexEnd >= 0) {
771-
String count = link[0].substring(indexStart, indexEnd);
772+
String count = linkFirst.substring(indexStart, indexEnd);
772773
return new DataResult(count, true);
773774
}
774775
}

lib/common/dao/user_dao.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,11 @@ class UserDao {
192192
try {
193193
StringList? link = res.headers['link'];
194194
if (link != null) {
195-
int indexStart = link[0].lastIndexOf("page=") + 5;
196-
int indexEnd = link[0].lastIndexOf(">");
195+
var [linkFirst] = link;
196+
int indexStart = linkFirst.lastIndexOf("page=") + 5;
197+
int indexEnd = linkFirst.lastIndexOf(">");
197198
if (indexStart >= 0 && indexEnd >= 0) {
198-
String count = link[0].substring(indexStart, indexEnd);
199+
String count = linkFirst.substring(indexStart, indexEnd);
199200
return new DataResult(count, true);
200201
}
201202
}

lib/common/net/interceptors/log_interceptor.dart

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -53,32 +53,29 @@ class LogsInterceptors extends InterceptorsWrapper {
5353
if (Config.DEBUG!) {
5454
print('返回参数: ' + response.toString());
5555
}
56-
if (response.data is Map || response.data is List) {
57-
try {
58-
var data = Map<String, dynamic>();
59-
data["data"] = response.data;
60-
addLogic(sResponsesHttpUrl, response.requestOptions.uri.toString());
61-
addLogic(sHttpResponses, data);
62-
} catch (e) {
63-
print(e);
64-
}
65-
} else if (response.data is String) {
66-
try {
67-
var data = Map<String, dynamic>();
68-
data["data"] = response.data;
69-
addLogic(sResponsesHttpUrl, response.requestOptions.uri.toString());
70-
addLogic(sHttpResponses, data);
71-
} catch (e) {
72-
print(e);
73-
}
74-
} else if (response.data != null) {
75-
try {
76-
String data = response.data.toJson();
77-
addLogic(sResponsesHttpUrl, response.requestOptions.uri.toString());
78-
addLogic(sHttpResponses, json.decode(data));
79-
} catch (e) {
80-
print(e);
81-
}
56+
switch (response.data) {
57+
case Map || List:
58+
{
59+
try {
60+
var data = Map<String, dynamic>();
61+
data["data"] = response.data;
62+
addLogic(sResponsesHttpUrl, response.requestOptions.uri.toString());
63+
addLogic(sHttpResponses, data);
64+
} catch (e) {
65+
print(e);
66+
}
67+
}
68+
case String:
69+
{
70+
try {
71+
var data = Map<String, dynamic>();
72+
data["data"] = response.data;
73+
addLogic(sResponsesHttpUrl, response.requestOptions.uri.toString());
74+
addLogic(sHttpResponses, data);
75+
} catch (e) {
76+
print(e);
77+
}
78+
}
8279
}
8380
return super.onResponse(response, handler);
8481
}

lib/common/utils/common_utils.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,10 +331,9 @@ class CommonUtils {
331331
String userName = pathnames[1];
332332
NavigatorUtils.goPerson(context, userName);
333333
} else if (pathnames.length >= 3) {
334-
String userName = pathnames[1];
335-
String repoName = pathnames[2];
336334
//解析仓库
337335
if (pathnames.length == 3) {
336+
var [_, userName, repoName] = pathnames;
338337
NavigatorUtils.goReposDetail(context, userName, repoName);
339338
} else {
340339
launchWebView(context, "", url);

lib/common/utils/event_utils.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,7 @@ class EventUtils {
152152
NavigatorUtils.goPerson(context, event.actor!.login);
153153
return;
154154
}
155-
String owner = event.repo!.name!.split("/")[0];
156-
String repositoryName = event.repo!.name!.split("/")[1];
155+
var [owner, repositoryName] = event.repo!.name!.split("/");
157156
String fullName = owner + '/' + repositoryName;
158157
switch (event.type) {
159158
case 'ForkEvent':

lib/widget/markdown/gsy_markdown_widget.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,9 @@ class GSYMarkdownWidget extends StatelessWidget {
190190
if (parts.length == 2) {
191191
final StringList dimensions = parts.last.split('x');
192192
if (dimensions.length == 2) {
193-
width = double.parse(dimensions[0]);
194-
height = double.parse(dimensions[1]);
193+
var [ws, hs] = dimensions;
194+
width = double.parse(ws);
195+
height = double.parse(hs);
195196
}
196197
}
197198
return kDefaultImageBuilder(uri, "", width, height);
@@ -241,7 +242,8 @@ Widget kDefaultImageBuilder(
241242
}
242243
}
243244

244-
Widget _handleDataSchemeUri(Uri uri, final double? width, final double? height) {
245+
Widget _handleDataSchemeUri(
246+
Uri uri, final double? width, final double? height) {
245247
final String mimeType = uri.data!.mimeType;
246248
if (mimeType.startsWith('image/')) {
247249
return Image.memory(

0 commit comments

Comments
 (0)