Skip to content

Commit 1842e0e

Browse files
committed
fix launch image.
fix webView title fix reposHeader model error
1 parent 2d7aa3f commit 1842e0e

File tree

7 files changed

+31
-14
lines changed

7 files changed

+31
-14
lines changed
-168 KB
Loading
-110 KB
Loading
-17.1 KB
Loading

lib/common/style/GSYStyle.dart

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@ class GSYConstant {
187187
fontSize: bigTextSize,
188188
);
189189

190+
static const largeTextBold = TextStyle(
191+
color: Color(GSYColors.mainTextColor),
192+
fontSize: bigTextSize,
193+
fontWeight: FontWeight.bold,
194+
);
195+
190196
static const largeTextWhite = TextStyle(
191197
color: Color(GSYColors.TextColorWhite),
192198
fontSize: bigTextSize,
@@ -217,7 +223,6 @@ class GSYStrings {
217223

218224
static const String app_default_share_url = "https://github.com/CarGuo/GithubAppFlutter";
219225

220-
221226
static const String app_ok = "确定";
222227
static const String app_cancel = "取消";
223228
static const String app_empty = "目前什么也没有哟";
@@ -367,16 +372,14 @@ class GSYICons {
367372
static const IconData ISSUE_ITEM_COMMENT = const IconData(0xe6ba, fontFamily: GSYICons.FONT_FAMILY);
368373
static const IconData ISSUE_ITEM_ADD = const IconData(0xe662, fontFamily: GSYICons.FONT_FAMILY);
369374

370-
371-
372-
static const IconData ISSUE_EDIT_H1 = Icons.filter_1;
373-
static const IconData ISSUE_EDIT_H2 = Icons.filter_2;
374-
static const IconData ISSUE_EDIT_H3 = Icons.filter_3;
375-
static const IconData ISSUE_EDIT_BOLD = Icons.format_bold;
376-
static const IconData ISSUE_EDIT_ITALIC = Icons.format_italic;
377-
static const IconData ISSUE_EDIT_QUOTE = Icons.format_quote;
378-
static const IconData ISSUE_EDIT_CODE = Icons.format_shapes;
379-
static const IconData ISSUE_EDIT_LINK = Icons.insert_link;
375+
static const IconData ISSUE_EDIT_H1 = Icons.filter_1;
376+
static const IconData ISSUE_EDIT_H2 = Icons.filter_2;
377+
static const IconData ISSUE_EDIT_H3 = Icons.filter_3;
378+
static const IconData ISSUE_EDIT_BOLD = Icons.format_bold;
379+
static const IconData ISSUE_EDIT_ITALIC = Icons.format_italic;
380+
static const IconData ISSUE_EDIT_QUOTE = Icons.format_quote;
381+
static const IconData ISSUE_EDIT_CODE = Icons.format_shapes;
382+
static const IconData ISSUE_EDIT_LINK = Icons.insert_link;
380383

381384
static const IconData NOTIFY_ALL_READ = const IconData(0xe62f, fontFamily: GSYICons.FONT_FAMILY);
382385

lib/page/GSYWebView.dart

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'package:flutter/cupertino.dart';
22
import 'package:flutter/material.dart';
33
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
4+
import 'package:gsy_github_app_flutter/widget/GSYCommonOptionWidget.dart';
45

56
/**
67
* webview版本
@@ -10,17 +11,26 @@ import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
1011
class GSYWebView extends StatelessWidget {
1112
final String url;
1213
final String title;
14+
final OptionControl optionControl = new OptionControl();
1315

1416
GSYWebView(this.url, this.title);
1517

18+
_renderTitle() {
19+
if (url == null || url.length == 0) {
20+
return new Text(title);
21+
}
22+
optionControl.url = url;
23+
return GSYCommonOptionWidget(optionControl);
24+
}
25+
1626
@override
1727
Widget build(BuildContext context) {
1828
return new WebviewScaffold(
1929
withJavascript: true,
2030
url: url,
2131
withLocalUrl: true,
2232
appBar: new AppBar(
23-
title: new Text(title),
33+
title: _renderTitle(),
2434
),
2535
);
2636
}

lib/widget/IssueHeaderItem.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class IssueHeaderItem extends StatelessWidget {
6161

6262
///关闭操作人
6363
_renderCloseByText() {
64-
return (issueHeaderViewModel.closed_by == null)
64+
return (issueHeaderViewModel.closed_by == null || issueHeaderViewModel.closed_by.trim().length == 0)
6565
? new Container()
6666
: new Container(
6767
child: new Text(
@@ -152,7 +152,7 @@ class IssueHeaderViewModel {
152152
String actionUser = "---";
153153
String actionUserPic = "---";
154154

155-
String closed_by = "---";
155+
String closed_by = "";
156156
bool locked = false;
157157
String issueComment = "---";
158158
String issueDesHtml = "---";

lib/widget/ReposHeaderItem.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ class ReposHeaderItem extends StatelessWidget {
166166
),
167167
),
168168
),
169+
169170
///底部头
170171
new GSYSelectItemWidget([
171172
GSYStrings.repos_tab_activity,
@@ -203,6 +204,9 @@ class ReposHeaderViewModel {
203204

204205
ReposHeaderViewModel.fromHttpMap(ownerName, reposName, Repository map) {
205206
this.ownerName = ownerName;
207+
if (map == null || map.owner == null) {
208+
return;
209+
}
206210
this.ownerPic = map.owner.avatar_url;
207211
this.repositoryName = reposName;
208212
this.repositoryStar = map.watchersCount != null ? map.watchersCount.toString() : "";

0 commit comments

Comments
 (0)