@@ -29,6 +29,9 @@ import 'package:url_launcher/url_launcher.dart';
2929 * Created by guoshuyu
3030 * Date: 2018-07-16
3131 */
32+
33+ typedef StringList = List <String >;
34+
3235class CommonUtils {
3336 static final double MILLIS_LIMIT = 1000.0 ;
3437
@@ -177,7 +180,7 @@ class CommonUtils {
177180 }
178181 String fullName = '' ;
179182 if (repository_url != null ) {
180- List < String > splicurl = repository_url.split ("/" );
183+ StringList splicurl = repository_url.split ("/" );
181184 if (splicurl.length > 2 ) {
182185 fullName =
183186 splicurl[splicurl.length - 2 ] + "/" + splicurl[splicurl.length - 1 ];
@@ -201,7 +204,7 @@ class CommonUtils {
201204 }
202205
203206 static showLanguageDialog (BuildContext context) {
204- List < String > list = [
207+ StringList list = [
205208 GSYLocalizations
206209 .i18n (context)!
207210 .home_language_default,
@@ -294,7 +297,7 @@ class CommonUtils {
294297
295298 if (parseUrl.host == "github.com" &&
296299 parseUrl.path.length > 0 ) {
297- List < String > pathnames = parseUrl.path.split ("/" );
300+ StringList pathnames = parseUrl.path.split ("/" );
298301 if (pathnames.length == 2 ) {
299302 //解析人
300303 String userName = pathnames[1 ];
@@ -406,7 +409,7 @@ class CommonUtils {
406409
407410 ///列表item dialog
408411 static Future <Null > showCommitOptionDialog (BuildContext context,
409- List < String > ? commitMaps,
412+ StringList ? commitMaps,
410413 ValueChanged <int > onTap, {
411414 width = 250.0 ,
412415 height = 400.0 ,
0 commit comments