@@ -2,7 +2,6 @@ import 'dart:async';
22import 'dart:convert' ;
33
44import 'package:flutter/material.dart' ;
5- import 'package:flutter_webview_plugin/flutter_webview_plugin.dart' ;
65import 'package:gsy_github_app_flutter/common/style/GSYStyle.dart' ;
76import 'package:gsy_github_app_flutter/common/utils/NavigatorUtils.dart' ;
87import '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 );
0 commit comments