Skip to content

Commit 725da7d

Browse files
committed
message
1 parent cd4d114 commit 725da7d

File tree

13 files changed

+16
-14
lines changed

13 files changed

+16
-14
lines changed

lib/app.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,7 @@ mixin HttpErrorListener on State<FlutterReduxApp> {
193193
showToast(GSYLocalizations.i18n(context)!.github_refused);
194194
break;
195195
default:
196-
showToast("${GSYLocalizations.i18n(context)!.network_error_unknown} " +
197-
message);
196+
showToast("${GSYLocalizations.i18n(context)!.network_error_unknown} $message");
198197
break;
199198
}
200199
}

lib/common/dao/user_dao.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class UserDao {
3737
);
3838
dynamic resultData;
3939
if (res != null && res.result) {
40-
var result = Uri.parse("gsy://oauth?" + res.data);
40+
var result = Uri.parse("gsy://oauth?$res.data");
4141
var token = result.queryParameters["access_token"]!;
4242
var _token = 'token $token';
4343
await LocalStorage.save(Config.TOKEN_KEY, _token);

lib/common/net/address.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,14 @@ class Address {
166166

167167
///仓库路径下的内容 get
168168
static reposDataDir(reposOwner, repos, path, [branch = 'master']) {
169-
return "${host}repos/$reposOwner/$repos/contents/$path${(branch == null || branch == "") ? "" : ("?ref=" + branch)}";
169+
return "${host}repos/$reposOwner/$repos/contents/$path${(branch == null || branch == "") ? "" : ("?ref=$branch")}";
170170
}
171171

172172
///README 文件地址 get
173173
static readmeFile(reposNameFullName, curBranch) {
174+
// ignore: prefer_interpolation_to_compose_strings
174175
return "${"${host}repos/" +
175-
reposNameFullName}/readme${(curBranch == null || curBranch == "" ) ? "" : ("?ref=" + curBranch)}";
176+
reposNameFullName}/readme${(curBranch == null || curBranch == "" ) ? "" : ("?ref=$curBranch")}";
176177

177178
}
178179

lib/common/net/interceptors/token_interceptor.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class TokenInterceptors extends InterceptorsWrapper {
3030
try {
3131
var responseJson = response.data;
3232
if (response.statusCode == 201 && responseJson["token"] != null) {
33-
_token = 'token ' + responseJson["token"];
33+
_token = 'token ${responseJson["token"]}';
3434
await LocalStorage.save(Config.TOKEN_KEY, _token);
3535
}
3636
} catch (e) {

lib/common/scoped_model/scoped_model.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class _InheritedModel<T extends Model> extends InheritedWidget {
204204
}
205205

206206
/// Builds a child for a [ScopedModelDescendant].
207-
typedef Widget ScopedModelDescendantBuilder<T extends Model>(
207+
typedef ScopedModelDescendantBuilder<T extends Model> = Widget Function(
208208
BuildContext context,
209209
Widget? child,
210210
T? model,

lib/common/utils/html_utils.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class HtmlUtils {
8989
{backgroundColor = GSYColors.white,
9090
String actionColor = GSYColors.actionBlueString,
9191
userBR = true}) {
92+
// ignore: prefer_interpolation_to_compose_strings
9293
return "${"${"<html>\n" +
9394
"<head>\n" +
9495
"<meta charset=\"utf-8\" />\n" +

lib/page/repos/scope/repos_detail_model.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class ReposDetailModel extends Model {
7575
///#################################################///
7676
7777
///获取网络端仓库的star等状态
78-
getReposStatus(List<Widget> getBottomWidget()) async {
78+
getReposStatus(List<Widget> Function() getBottomWidget) async {
7979
String watchText =
8080
repository!.isSubscription == "SUBSCRIBED" ? "UnWatch" : "Watch";
8181
String starText = repository!.isStared! ? "UnStar" : "Star";

lib/page/repos/widget/repos_header_item.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,9 @@ class ReposHeaderViewModel {
481481
repositoryIsFork = map.isFork;
482482
license = map.license != null ? map.license : "";
483483
repositoryParentName =
484-
map.parent != null ? map.parent!.reposName : null;
484+
map.parent?.reposName;
485485
repositoryParentUser =
486-
map.parent != null ? map.parent!.ownerName : null;
486+
map.parent?.ownerName;
487487
created_at = CommonUtils.getNewsTimeStr(DateTime.parse(map.createdAt!));
488488
push_at = CommonUtils.getNewsTimeStr((DateTime.parse(map.pushAt!)));
489489
}

lib/page/search/widget/gsy_search_drawer.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import 'package:gsy_github_app_flutter/common/style/gsy_style.dart';
66
/// Created by guoshuyu
77
/// Date: 2018-07-18
88
9-
typedef void SearchSelectItemChanged<String>(String value);
9+
typedef SearchSelectItemChanged<String> = void Function(String value);
1010

1111
class GSYSearchDrawer extends StatefulWidget {
1212
final SearchSelectItemChanged<String?> typeCallback;

lib/widget/flutter_json_widget.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ class JsonViewerWidgetState extends State<JsonViewerWidget> {
119119
} else if (entry.value is String) {
120120
return Expanded(
121121
child: Text(
122+
// ignore: prefer_interpolation_to_compose_strings
122123
'${'\"' + entry.value}\"',
123124
style: const TextStyle(color: Colors.redAccent),
124125
));

0 commit comments

Comments
 (0)