Skip to content

Commit 0d31dca

Browse files
committed
替换webview
1 parent e21bc85 commit 0d31dca

File tree

3 files changed

+78
-5
lines changed

3 files changed

+78
-5
lines changed

ios/Podfile.lock

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
PODS:
2+
- connectivity (0.0.1):
3+
- Flutter
4+
- Reachability
5+
- device_info (0.0.1):
6+
- Flutter
7+
- Flutter (1.0.0)
8+
- flutter_webview_plugin (0.0.1):
9+
- Flutter
10+
- fluttertoast (0.0.2):
11+
- Flutter
12+
- get_version (0.0.1):
13+
- Flutter
14+
- package_info (0.0.1):
15+
- Flutter
16+
- Reachability (3.2)
17+
- share (0.5.2):
18+
- Flutter
19+
- shared_preferences (0.0.1):
20+
- Flutter
21+
- url_launcher (0.0.1):
22+
- Flutter
23+
24+
DEPENDENCIES:
25+
- connectivity (from `.symlinks/plugins/connectivity/ios`)
26+
- device_info (from `.symlinks/plugins/device_info/ios`)
27+
- Flutter (from `.symlinks/flutter/ios`)
28+
- flutter_webview_plugin (from `.symlinks/plugins/flutter_webview_plugin/ios`)
29+
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
30+
- get_version (from `.symlinks/plugins/get_version/ios`)
31+
- package_info (from `.symlinks/plugins/package_info/ios`)
32+
- share (from `.symlinks/plugins/share/ios`)
33+
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
34+
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
35+
36+
SPEC REPOS:
37+
https://github.com/CocoaPods/Specs.git:
38+
- Reachability
39+
40+
EXTERNAL SOURCES:
41+
connectivity:
42+
:path: ".symlinks/plugins/connectivity/ios"
43+
device_info:
44+
:path: ".symlinks/plugins/device_info/ios"
45+
Flutter:
46+
:path: ".symlinks/flutter/ios"
47+
flutter_webview_plugin:
48+
:path: ".symlinks/plugins/flutter_webview_plugin/ios"
49+
fluttertoast:
50+
:path: ".symlinks/plugins/fluttertoast/ios"
51+
get_version:
52+
:path: ".symlinks/plugins/get_version/ios"
53+
package_info:
54+
:path: ".symlinks/plugins/package_info/ios"
55+
share:
56+
:path: ".symlinks/plugins/share/ios"
57+
shared_preferences:
58+
:path: ".symlinks/plugins/shared_preferences/ios"
59+
url_launcher:
60+
:path: ".symlinks/plugins/url_launcher/ios"
61+
62+
SPEC CHECKSUMS:
63+
connectivity: d5992e3758d68b1c4b12d6e012fe0813f1aa1645
64+
device_info: 76ce0b32e13034d1883be4a382433648f9dcee63
65+
Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296
66+
flutter_webview_plugin: 116575b48572029304775b768e9f15ebfc316274
67+
fluttertoast: ad0527b15297baf11349f3f581dae4d40f24f340
68+
get_version: a59b7bd8fbf7543739bd853218b6685899419d05
69+
package_info: d7c98b64f60add4c2908b9d94d82a45d3c8827ad
70+
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
71+
share: 222b5dcc8031238af9d7de91149df65bad1aef75
72+
shared_preferences: 5a1d487c427ee18fcd3ea1f2a131569481834b53
73+
url_launcher: 92b89c1029a0373879933c21642958c874539095
74+
75+
PODFILE CHECKSUM: 7765ea4305eaab0b3dfd384c7de11902aa3195fd
76+
77+
COCOAPODS: 1.5.0

lib/common/dao/ReposDao.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ class ReposDao {
346346
static getRepositoryDetailReadmeDao(userName, reposName, branch) async {
347347
String url = Address.readmeFile(userName + '/' + reposName, branch);
348348
var res = await HttpManager.netFetch(url, null, {"Accept": 'application/vnd.github.VERSION.raw'}, new Options(contentType: ContentType.TEXT));
349+
//var res = await HttpManager.netFetch(url, null, {"Accept": 'application/vnd.github.html'}, new Options(contentType: ContentType.TEXT));
349350
if (res != null && res.result) {
350351
return new DataResult(res.data, true);
351352
}

lib/page/CodeDetailPageWeb.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,7 @@ class _CodeDetailPageState extends State<CodeDetailPageWeb> {
6161
ReposDao.getReposFileDirDao(userName, reposName, path: path, branch: branch, text: true, isHtml: true).then((res) {
6262
if (res != null && res.result) {
6363
String data2 = HtmlUtils.resolveHtmlFile(res, "java");
64-
final flutterWebviewPlugin = new FlutterWebviewPlugin();
6564
String url = new Uri.dataFromString(data2, mimeType: 'text/html', encoding: Encoding.getByName("utf-8")).toString();
66-
print("-------------");
67-
print(url);
68-
flutterWebviewPlugin.reload();
6965
setState(() {
7066
this.data = url;
7167
});
@@ -108,6 +104,5 @@ class _CodeDetailPageState extends State<CodeDetailPageWeb> {
108104
title: new Text(title),
109105
),
110106
);
111-
;
112107
}
113108
}

0 commit comments

Comments
 (0)