Skip to content

Commit 76cc93f

Browse files
committed
fix release 1.0.1
1 parent 27bd7a3 commit 76cc93f

File tree

6 files changed

+62
-32
lines changed

6 files changed

+62
-32
lines changed

RECORD.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,6 @@ ui 上的调整。
5555

5656

5757
https://stackoverflow.com/questions/47114639/yellow-lines-under-text-widgets-in-flutter
58-
Dialog中,没使用Scaffold ,导致文本有黄色溢出线提示,可以使用Material ,color或者type为透明
58+
Dialog中,没使用Scaffold ,导致文本有黄色溢出线提示,可以使用Material ,color或者type为透明
59+
60+
启动页变形问题。

VERSION.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11

2+
### 1.0.2(待处理)
3+
4+
* 启动页变形问题
5+
6+
27

38
### 1.0.1
49

510
* 修复loading弹出框黄线问题。
611
* 调整部分ui。
712
* 增加Release列表。
813
* 增加版检测。
14+
* Issue详情页显示问题。
15+
* 返回按键退出问题。
916

1017

1118

lib/common/style/GSYStyle.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ class GSYStrings {
215215
static const String app_licenses = "协议";
216216
static const String app_close = "关闭";
217217
static const String app_version = "版本";
218+
static const String app_back_tip = "确定要退出应用?";
218219

219220
static const String app_not_new_version = "没有新版本";
220221
static const String app_version_title = "版本更新";

lib/common/utils/CommonUtils.dart

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -117,28 +117,30 @@ class CommonUtils {
117117
context: context,
118118
builder: (BuildContext context) {
119119
return new Material(
120-
color: Colors.transparent,
121-
child: Center(
122-
child: new Container(
123-
width: 200.0,
124-
height: 200.0,
125-
padding: new EdgeInsets.all(4.0),
126-
decoration: new BoxDecoration(
127-
color: Colors.transparent,
128-
//用一个BoxDecoration装饰器提供背景图片
129-
borderRadius: BorderRadius.all(Radius.circular(4.0)),
120+
color: Colors.transparent,
121+
child: WillPopScope(
122+
onWillPop: () => new Future.value(false),
123+
child: Center(
124+
child: new Container(
125+
width: 200.0,
126+
height: 200.0,
127+
padding: new EdgeInsets.all(4.0),
128+
decoration: new BoxDecoration(
129+
color: Colors.transparent,
130+
//用一个BoxDecoration装饰器提供背景图片
131+
borderRadius: BorderRadius.all(Radius.circular(4.0)),
132+
),
133+
child: new Column(
134+
mainAxisAlignment: MainAxisAlignment.center,
135+
children: <Widget>[
136+
new Container(child: SpinKitCubeGrid(color: Colors.white)),
137+
new Container(height: 10.0),
138+
new Container(child: new Text(GSYStrings.loading_text, style: GSYConstant.normalTextWhite)),
139+
],
140+
),
141+
),
130142
),
131-
child: new Column(
132-
mainAxisAlignment: MainAxisAlignment.center,
133-
children: <Widget>[
134-
new Container(child: SpinKitCubeGrid(color: Colors.white)),
135-
new Container(height: 10.0),
136-
new Container(child: new Text(GSYStrings.loading_text, style: GSYConstant.normalTextWhite)),
137-
],
138-
),
139-
),
140-
),
141-
);
143+
));
142144
});
143145
}
144146

lib/page/HomePage.dart

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import 'dart:async';
2+
13
import 'package:flutter/material.dart';
24
import 'package:gsy_github_app_flutter/common/style/GSYStyle.dart';
35
import 'package:gsy_github_app_flutter/common/utils/NavigatorUtils.dart';
@@ -16,10 +18,31 @@ import 'package:gsy_github_app_flutter/widget/HomeDrawer.dart';
1618
class HomePage extends StatelessWidget {
1719
static final String sName = "home";
1820

21+
/// 单击提示退出
22+
Future<bool> _dialogExitApp(BuildContext context) {
23+
return showDialog(
24+
context: context,
25+
builder: (context) => new AlertDialog(
26+
content: new Text(GSYStrings.app_back_tip),
27+
actions: <Widget>[
28+
new FlatButton(onPressed: () => Navigator.of(context).pop(false), child: new Text(GSYStrings.app_cancel)),
29+
new FlatButton(
30+
onPressed: () {
31+
Navigator.of(context).pop(true);
32+
},
33+
child: new Text(GSYStrings.app_ok))
34+
],
35+
));
36+
}
37+
1938
// This widget is the root of your application.
2039
@override
2140
Widget build(BuildContext context) {
22-
return new GSYTabBarWidget(
41+
return WillPopScope(
42+
onWillPop: () {
43+
return _dialogExitApp(context);
44+
},
45+
child: new GSYTabBarWidget(
2346
drawer: new HomeDrawer(),
2447
type: GSYTabBarWidget.BOTTOM_TAB,
2548
tabItems: [
@@ -56,10 +79,8 @@ class HomePage extends StatelessWidget {
5679
onPressed: () {
5780
NavigatorUtils.goSearchPage(context);
5881
},
59-
));
82+
),
83+
),
84+
);
6085
}
61-
62-
63-
64-
6586
}

lib/widget/IssueHeaderItem.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class IssueHeaderItem extends StatelessWidget {
6161
crossAxisAlignment: CrossAxisAlignment.start,
6262
children: <Widget>[
6363
new GSYUserIconWidget(
64-
padding: const EdgeInsets.only(top: 0.0, right: 5.0, left: 0.0),
64+
padding: const EdgeInsets.only(top: 0.0, right: 10.0, left: 0.0),
6565
width: 50.0,
6666
height: 50.0,
6767
image: issueHeaderViewModel.actionUserPic,
@@ -78,7 +78,6 @@ class IssueHeaderItem extends StatelessWidget {
7878
new Text(
7979
issueHeaderViewModel.actionTime,
8080
style: GSYConstant.subSmallText,
81-
maxLines: 2,
8281
overflow: TextOverflow.ellipsis,
8382
),
8483
],
@@ -89,7 +88,6 @@ class IssueHeaderItem extends StatelessWidget {
8988
child: new Text(
9089
issueHeaderViewModel.issueComment,
9190
style: GSYConstant.smallTextWhite,
92-
maxLines: 2,
9391
),
9492
margin: new EdgeInsets.only(top: 6.0, bottom: 2.0),
9593
alignment: Alignment.topLeft),
@@ -105,7 +103,6 @@ class IssueHeaderItem extends StatelessWidget {
105103
child: new Text(
106104
issueHeaderViewModel.issueDesHtml,
107105
style: GSYConstant.smallTextWhite,
108-
maxLines: 2,
109106
),
110107
margin: new EdgeInsets.all(10.0),
111108
alignment: Alignment.topLeft)

0 commit comments

Comments
 (0)