Skip to content

Commit b0a677e

Browse files
committed
fix loading dialog text face yellow line
1 parent 6e7faba commit b0a677e

4 files changed

Lines changed: 28 additions & 28 deletions

File tree

‎lib/common/style/GSYStyle.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class GSYStrings {
207207
static const String app_version = "版本";
208208

209209
static const String nothing_now = "目前什么都没有。";
210-
static const String loading_text = "加载中···";
210+
static const String loading_text = "努力加载中···";
211211

212212
static const String option_web = "浏览器打开";
213213
static const String option_copy = "复制链接";

‎lib/common/utils/CommonUtils.dart‎

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import 'dart:async';
22
import 'dart:convert';
33

44
import 'package:flutter/material.dart';
5-
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
65
import 'package:gsy_github_app_flutter/common/style/GSYStyle.dart';
76
import 'package:gsy_github_app_flutter/common/utils/NavigatorUtils.dart';
87
import 'package:gsy_github_app_flutter/widget/GSYFlexButton.dart';
@@ -106,33 +105,35 @@ class CommonUtils {
106105
if (url.startsWith("http")) {
107106
NavigatorUtils.goGSYWebView(context, url, title);
108107
} else {
109-
NavigatorUtils.goGSYWebView(context, new Uri.dataFromString(url, mimeType: 'text/html', encoding: Encoding.getByName("utf-8")).toString(), title);
108+
NavigatorUtils.goGSYWebView(
109+
context, new Uri.dataFromString(url, mimeType: 'text/html', encoding: Encoding.getByName("utf-8")).toString(), title);
110110
}
111111
}
112112

113113
static Future<Null> showLoadingDialog(BuildContext context) {
114114
return showDialog(
115115
context: context,
116116
builder: (BuildContext context) {
117-
return Center(
118-
child: new Container(
119-
width: 140.0,
120-
height: 140.0,
121-
padding: new EdgeInsets.all(4.0),
122-
decoration: new BoxDecoration(
123-
color: Colors.transparent,
124-
//用一个BoxDecoration装饰器提供背景图片
125-
borderRadius: BorderRadius.all(Radius.circular(4.0)),
126-
),
127-
child: new Column(
128-
mainAxisAlignment: MainAxisAlignment.center,
129-
children: <Widget>[
130-
SpinKitCubeGrid(
131-
color: Colors.white,
132-
),
133-
new Container(width: 10.0),
134-
new Container(child: new Text(GSYStrings.loading_text, style: GSYConstant.middleTextWhite)),
135-
],
117+
return new Material(
118+
color: Colors.transparent,
119+
child: Center(
120+
child: new Container(
121+
width: 140.0,
122+
height: 200.0,
123+
padding: new EdgeInsets.all(4.0),
124+
decoration: new BoxDecoration(
125+
color: Colors.transparent,
126+
//用一个BoxDecoration装饰器提供背景图片
127+
borderRadius: BorderRadius.all(Radius.circular(4.0)),
128+
),
129+
child: new Column(
130+
mainAxisAlignment: MainAxisAlignment.center,
131+
children: <Widget>[
132+
new Container(child: SpinKitCubeGrid(color: Colors.white)),
133+
new Container(height: 10.0),
134+
new Container(child: new Text(GSYStrings.loading_text, style: GSYConstant.normalTextWhite)),
135+
],
136+
),
136137
),
137138
),
138139
);

‎lib/common/utils/EventUtils.dart‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'package:flutter/material.dart';
2-
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
32
import 'package:gsy_github_app_flutter/common/utils/CommonUtils.dart';
43
import 'package:gsy_github_app_flutter/common/utils/NavigatorUtils.dart';
54

@@ -148,17 +147,16 @@ class EventUtils {
148147
}
149148
NavigatorUtils.goReposDetail(context, owner, repositoryName);
150149
} else if (event["payload"]["commits"].length == 1) {
151-
NavigatorUtils.goPushDetailPage(context, owner, repositoryName, event["payload"]["commits"][0]["sha"], true);
150+
NavigatorUtils.goPushDetailPage(context, owner, repositoryName, event["payload"]["commits"][0]["sha"], true);
152151
} else {
153152
CommonUtils.showCommitOptionDialog(context, event["payload"]["commits"], (index) {
154-
NavigatorUtils.goPushDetailPage(context, owner, repositoryName,event["payload"]["commits"][index]["sha"], true);
153+
NavigatorUtils.goPushDetailPage(context, owner, repositoryName, event["payload"]["commits"][index]["sha"], true);
155154
});
156155
}
157156
break;
158157
case 'ReleaseEvent':
159158
String url = event["payload"]["release"]["html_url"];
160-
final flutterWebviewPlugin = new FlutterWebviewPlugin();
161-
flutterWebviewPlugin.launch(url, hidden: true);
159+
CommonUtils.launchWebView(context, repositoryName, url);
162160
break;
163161
case 'IssueCommentEvent':
164162
case 'IssuesEvent':

‎lib/common/utils/NavigatorUtils.dart‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ class NavigatorUtils {
116116
)));
117117
}
118118

119+
///全屏Web页面
119120
static Future<Null> goGSYWebView(BuildContext context, String url, String title) {
120121
return Navigator.push(
121122
context,
@@ -125,7 +126,7 @@ class NavigatorUtils {
125126
);
126127
}
127128

128-
///文件代码详情
129+
///文件代码详情Web
129130
static gotoCodeDetailPageWeb(BuildContext context, {String title, String userName, String reposName, String path, String data, String branch, String htmlUrl}) {
130131
Navigator.push(
131132
context,

0 commit comments

Comments
 (0)