@@ -14,8 +14,7 @@ class GitHubTrending {
14
14
var res = await httpManager.netFetch (
15
15
url, null , null , Options (contentType: "text/plain; charset=utf-8" ));
16
16
if (res != null && res.result && res.data != null ) {
17
- return ResultData (
18
- TrendingUtil .htmlToRepo (res.data), true , Code .SUCCESS );
17
+ return ResultData (TrendingUtil .htmlToRepo (res.data), true , Code .SUCCESS );
19
18
} else {
20
19
return res;
21
20
}
@@ -44,7 +43,7 @@ class TrendingUtil {
44
43
static htmlToRepo (String responseData) {
45
44
try {
46
45
responseData = responseData.replaceAll (RegExp ('\n ' ), '' );
47
- // ignore: empty_catches
46
+ // ignore: empty_catches
48
47
} catch (e) {}
49
48
var repos = [];
50
49
var splitWithH3 = responseData.split ('<article' );
@@ -137,14 +136,14 @@ class TrendingUtil {
137
136
repo.language = trim (content);
138
137
}
139
138
140
- static parseRepoContributors (repo, htmlContributors) {
139
+ static parseRepoContributors (TrendingRepoModel repo, htmlContributors) {
141
140
htmlContributors =
142
141
parseContentWithNote (htmlContributors, 'Built by' , '<\/ a>' );
143
142
var splitWitSemicolon = htmlContributors.split ('\" ' );
144
143
if (splitWitSemicolon.length > 1 ) {
145
144
repo.contributorsUrl = splitWitSemicolon[1 ];
146
145
}
147
- var contributors = [];
146
+ List < String > ? contributors = [];
148
147
for (var i = 0 ; i < splitWitSemicolon.length; i++ ) {
149
148
String url = splitWitSemicolon[i];
150
149
if (url.contains ('http' )) {
0 commit comments