Skip to content

Commit

Permalink
update 3.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
CarGuo committed May 16, 2023
1 parent 40faf94 commit a90ab1d
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 47 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
java-version: 11
- uses: subosito/flutter-action@v1
with:
flutter-version: '3.7.10'
flutter-version: '3.10.0'
- uses: finnp/create-file-action@master
env:
FILE_NAME: lib/common/config/ignoreConfig.dart
Expand All @@ -47,7 +47,7 @@ jobs:
java-version: 11
- uses: subosito/flutter-action@v1
with:
flutter-version: '3.7.10'
flutter-version: '3.10.1'
- uses: finnp/create-file-action@master
env:
FILE_NAME: lib/common/config/ignoreConfig.dart
Expand Down
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.7**),可参阅 [【搭建环境】](https://flutterchina.club)
1、配置好Flutter开发环境(目前Flutter SDK 版本 **3.10**),可参阅 [【搭建环境】](https://flutterchina.club)

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

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

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

>### 1、本地 Flutter SDK 版本 3.7 ; 2、是否执行过 `flutter pub get`;3、 网络等问题参考: [如果出现登陆失败或者请求失败 ](https://github.com/CarGuo/gsy_github_app_flutter/issues/643)
>### 1、本地 Flutter SDK 版本 3.10 ; 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.7
>当前 Flutter SDK 版本 3.10
|| 功能 |
| -------------------------- | -------------- |
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.7** ).
1. Configure the Flutter development environment (Tag of the current version of Flutter SDK **3.10** ).

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.7 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.10 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.7**
>Current Flutter SDK version **3.10**
|| 功能 |
| -------------------------- | -------------- |
Expand Down
1 change: 1 addition & 0 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand Down
7 changes: 4 additions & 3 deletions lib/common/dao/repos_dao.dart
Original file line number Diff line number Diff line change
Expand Up @@ -765,10 +765,11 @@ class ReposDao {
try {
StringList? link = res.headers['link'];
if (link != null) {
int indexStart = link[0].lastIndexOf("page=") + 5;
int indexEnd = link[0].lastIndexOf(">");
var [linkFirst, _] = link;
int indexStart = linkFirst.lastIndexOf("page=") + 5;
int indexEnd = linkFirst.lastIndexOf(">");
if (indexStart >= 0 && indexEnd >= 0) {
String count = link[0].substring(indexStart, indexEnd);
String count = linkFirst.substring(indexStart, indexEnd);
return new DataResult(count, true);
}
}
Expand Down
7 changes: 4 additions & 3 deletions lib/common/dao/user_dao.dart
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,11 @@ class UserDao {
try {
StringList? link = res.headers['link'];
if (link != null) {
int indexStart = link[0].lastIndexOf("page=") + 5;
int indexEnd = link[0].lastIndexOf(">");
var [linkFirst] = link;
int indexStart = linkFirst.lastIndexOf("page=") + 5;
int indexEnd = linkFirst.lastIndexOf(">");
if (indexStart >= 0 && indexEnd >= 0) {
String count = link[0].substring(indexStart, indexEnd);
String count = linkFirst.substring(indexStart, indexEnd);
return new DataResult(count, true);
}
}
Expand Down
49 changes: 23 additions & 26 deletions lib/common/net/interceptors/log_interceptor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,32 +53,29 @@ class LogsInterceptors extends InterceptorsWrapper {
if (Config.DEBUG!) {
print('返回参数: ' + response.toString());
}
if (response.data is Map || response.data is List) {
try {
var data = Map<String, dynamic>();
data["data"] = response.data;
addLogic(sResponsesHttpUrl, response.requestOptions.uri.toString());
addLogic(sHttpResponses, data);
} catch (e) {
print(e);
}
} else if (response.data is String) {
try {
var data = Map<String, dynamic>();
data["data"] = response.data;
addLogic(sResponsesHttpUrl, response.requestOptions.uri.toString());
addLogic(sHttpResponses, data);
} catch (e) {
print(e);
}
} else if (response.data != null) {
try {
String data = response.data.toJson();
addLogic(sResponsesHttpUrl, response.requestOptions.uri.toString());
addLogic(sHttpResponses, json.decode(data));
} catch (e) {
print(e);
}
switch (response.data) {
case Map || List:
{
try {
var data = Map<String, dynamic>();
data["data"] = response.data;
addLogic(sResponsesHttpUrl, response.requestOptions.uri.toString());
addLogic(sHttpResponses, data);
} catch (e) {
print(e);
}
}
case String:
{
try {
var data = Map<String, dynamic>();
data["data"] = response.data;
addLogic(sResponsesHttpUrl, response.requestOptions.uri.toString());
addLogic(sHttpResponses, data);
} catch (e) {
print(e);
}
}
}
return super.onResponse(response, handler);
}
Expand Down
3 changes: 1 addition & 2 deletions lib/common/utils/common_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,9 @@ class CommonUtils {
String userName = pathnames[1];
NavigatorUtils.goPerson(context, userName);
} else if (pathnames.length >= 3) {
String userName = pathnames[1];
String repoName = pathnames[2];
//解析仓库
if (pathnames.length == 3) {
var [_, userName, repoName] = pathnames;
NavigatorUtils.goReposDetail(context, userName, repoName);
} else {
launchWebView(context, "", url);
Expand Down
3 changes: 1 addition & 2 deletions lib/common/utils/event_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ class EventUtils {
NavigatorUtils.goPerson(context, event.actor!.login);
return;
}
String owner = event.repo!.name!.split("/")[0];
String repositoryName = event.repo!.name!.split("/")[1];
var [owner, repositoryName] = event.repo!.name!.split("/");
String fullName = owner + '/' + repositoryName;
switch (event.type) {
case 'ForkEvent':
Expand Down
8 changes: 5 additions & 3 deletions lib/widget/markdown/gsy_markdown_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,9 @@ class GSYMarkdownWidget extends StatelessWidget {
if (parts.length == 2) {
final StringList dimensions = parts.last.split('x');
if (dimensions.length == 2) {
width = double.parse(dimensions[0]);
height = double.parse(dimensions[1]);
var [ws, hs] = dimensions;
width = double.parse(ws);
height = double.parse(hs);
}
}
return kDefaultImageBuilder(uri, "", width, height);
Expand Down Expand Up @@ -241,7 +242,8 @@ Widget kDefaultImageBuilder(
}
}

Widget _handleDataSchemeUri(Uri uri, final double? width, final double? height) {
Widget _handleDataSchemeUri(
Uri uri, final double? width, final double? height) {
final String mimeType = uri.data!.mimeType;
if (mimeType.startsWith('image/')) {
return Image.memory(
Expand Down

0 comments on commit a90ab1d

Please sign in to comment.