Skip to content

Commit aca4bc3

Browse files
committed
Add all replaced elements
1 parent c34af85 commit aca4bc3

16 files changed

+611
-197
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## [1.0.0] - UNRELEASED
22

3-
* BREAKING: Requires Flutter version 0.7.3 or greater.
3+
* BREAKING: Requires Flutter version 1.7.3 or greater and Dart 2.2.2 or greater.
44
* Adds support for a new parser, which resolves several major issues and adds several new features.
55
* For a list of pre-release changes, including several BREAKING CHANGES, see [the pre-release changelog](https://github.com/Sub6Resources/flutter_html/PRE_CHANGELOG.md)
66

example/ios/Podfile.lock

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
11
PODS:
22
- Flutter (1.0.0)
3+
- screen (0.0.1):
4+
- Flutter
5+
- video_player (0.0.1):
6+
- Flutter
37

48
DEPENDENCIES:
59
- Flutter (from `.symlinks/flutter/ios`)
10+
- screen (from `.symlinks/plugins/screen/ios`)
11+
- video_player (from `.symlinks/plugins/video_player/ios`)
612

713
EXTERNAL SOURCES:
814
Flutter:
915
:path: ".symlinks/flutter/ios"
16+
screen:
17+
:path: ".symlinks/plugins/screen/ios"
18+
video_player:
19+
:path: ".symlinks/plugins/video_player/ios"
1020

1121
SPEC CHECKSUMS:
12-
Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a
22+
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
23+
screen: abd91ca7bf3426e1cc3646d27e9b2358d6bf07b0
24+
video_player: 3964090a33353060ed7f58aa6427c7b4b208ec21
1325

1426
PODFILE CHECKSUM: 7fb83752f59ead6285236625b82473f90b1cb932
1527

example/lib/main.dart

Lines changed: 66 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'package:flutter/material.dart';
22
import 'package:flutter_html/flutter_html.dart';
3+
import 'package:flutter_html/html_parser.dart';
34
import 'package:flutter_html/style.dart';
45

56
void main() => runApp(new MyApp());
@@ -13,7 +14,7 @@ class MyApp extends StatelessWidget {
1314
theme: new ThemeData(
1415
primarySwatch: Colors.blue,
1516
),
16-
home: new MyHomePage(title: 'Flutter Demo Home Page'),
17+
home: new MyHomePage(title: 'flutter_html Example'),
1718
);
1819
}
1920
}
@@ -34,110 +35,80 @@ class _MyHomePageState extends State<MyHomePage> {
3435
appBar: new AppBar(
3536
title: new Text(widget.title),
3637
),
37-
body: new Center(
38-
child: SingleChildScrollView(
39-
child: Html(
40-
data: """
41-
<div>
42-
<div id="header_set">
38+
body: SingleChildScrollView(
39+
child: Html(
40+
data: """
4341
<h1>Header 1</h1>
4442
<h2>Header 2</h2>
4543
<h3>Header 3</h3>
4644
<h4>Header 4</h4>
4745
<h5>Header 5</h5>
4846
<h6>Header 6</h6>
49-
<hr />
50-
Below hr
51-
<b>Bold</b>
52-
</div>
53-
<h1>Demo Page</h1>
54-
<p>This is a <u>fantastic</u> nonexistent product that you should really really really consider buying!</p>
55-
<a href="https://github.com">https://github.com</a><br />
47+
<img src='https://example.com/image.jpg' alt='Alt Text' />
48+
<table>
49+
<tr><th>One</th><th>Two</th><th>Three</th></tr>
50+
<tr><td>Data</td><td>Data</td><td>Data</td></tr>
51+
<tr><td>Data</td><td>Data</td><td>Data</td></tr>
52+
<tr><td>Data</td><td>Data</td><td>Data</td></tr>
53+
<tfoot>
54+
<tr><td>Data</td><td>Data</td><td>Data</td></tr>
55+
</tfoot>
56+
</table>
57+
<flutter></flutter>
58+
<svg id='svg1' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'>
59+
<circle r="32" cx="35" cy="65" fill="#F00" opacity="0.5"/>
60+
<circle r="32" cx="65" cy="65" fill="#0F0" opacity="0.5"/>
61+
<circle r="32" cx="50" cy="35" fill="#00F" opacity="0.5"/>
62+
</svg>
5663
<br />
57-
<h2>Pricing</h2>
58-
<p>Lorem ipsum <b>dolor</b> sit amet.</p>
59-
<center>
60-
This is some center text... <abbr>ABBR</abbr> and <acronym>ACRONYM</acronym>
61-
</center>
62-
<h2>The Team</h2>
63-
<p>There isn't <i>really</i> a team...</p>
64-
<h2>Installation</h2>
65-
<p>You <u>cannot</u> install a nonexistent product!</p>
66-
<h2>Don't ask me to find <em>x</em> in</h2>
67-
<p>log<sub>2</sub>(<em>x</em><sup>2</sup> - 6<em>x</em>) = 3 + log<sub>2</sub>(1 - <em>x</em>)</p>
68-
<div id="bdi_test">
69-
<h3><code>bdi</code> and <code>bdo</code> Test:</h3>
70-
<p>
71-
In the example below, usernames are shown along with the number of points in a contest.
72-
If the bdi element is not supported in the browser, the username of the Arabic user would confuse the text (the bidirectional algorithm would put the colon and the number "90" next to the word "User" rather than next to the word "points").
73-
</p>
74-
64+
<a href='https://flutter.dev'>Flutter Website</a><br />
65+
<audio controls>
66+
<source src='https://www.w3schools.com/tags/horse.mp3'>
67+
</audio>
68+
<ol>
69+
<li>This</li>
70+
<li>is</li>
71+
<li>an</li>
72+
<li>
73+
ordered
7574
<ul>
76-
<li>User <bdi>hrefs</bdi>: 60 points</li>
77-
<li>User <bdi>jdoe</bdi>: 80 points</li>
78-
<li>User <bdi>إيان</bdi>: 90 points</li>
79-
<bdo dir="rtl">Swapped!</bdo>
80-
<bdo dir="ltr">This text will go left to right!</bdo>
81-
<bdo dir="rtl">With bdi: User <bdi>إيان</bdi>: 90 points</bdo>
82-
<bdo dir="rtl">Without bdi: User إيان: 90 points</bdo>
83-
<bdo dir="ltr">ltr w/ bdi: User <bdi>إيان</bdi>: 90 points</bdo>
84-
<bdo dir="ltr">ltr w/o bdi: User إيان: 90 points</bdo>
75+
<li>With</li>
76+
<li>a</li>
77+
<li>nested</li>
78+
<li>unordered</li>
79+
<li>list</li>
8580
</ul>
86-
</div>
87-
<div>
88-
<table>
89-
<caption>This is the table's caption</caption>
90-
<tr><th>Head 1<sup>*</sup></th><th>Head 2</th><th>Head 3</th></tr>
91-
<tr><td>Data 1</td><td>Long Data 2</td><td>Really, realllllly, long data 3</td></tr>
92-
<tr><td>Data 1</td><td>Long <b>Data</b> 2</td><td>Really, realllllly, long data 3</td></tr>
93-
<tr><td>Data 1</td><td>Long Data 2</td><td>Really, realllllly, long data 3</td></tr>
94-
<tr><td>Different 1</td><td>Different reallllllly long 2</td><td>Diff 3</td></tr>
95-
<tr><td colspan="2">This spans 2 columns</td><td>Normal td</td></tr>
96-
<tfoot>
97-
<tr><td>In foot 1</td><td>In foot 2</td><td>In foot long 2</td></tr>
98-
</tfoot>
99-
</table>
100-
</div>
101-
<div>Nested div</div>
102-
<div>
103-
<pre>
104-
jQuery("#monkey");
105-
</pre>
106-
<br />
107-
<p><q>This is a fancy quote</q></p>
108-
<br />
109-
<br />
110-
Second nested div<br />
111-
<figure>
112-
<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" />
113-
<figcaption>Available on GitHub</figcaption>
114-
</figure>
115-
</div>
116-
<div>Third nested div</div>
117-
</div>
118-
<h1>Second header</h1>
119-
<h1>Third header</h1>
120-
<div>Fourth div</div>
81+
</li>
82+
<li>list!</li>
83+
</ol>
84+
<hr />
85+
<video controls>
86+
<source src='https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4'>
87+
</video>
88+
<iframe src='https://matthewwhitaker.me'></iframe>
12189
""",
122-
//Optional parameters:
123-
style: {
124-
"ul": Style(
125-
fontFamily: "monospace",
126-
fontSize: 24,
127-
margin: EdgeInsets.zero,
128-
// block: Block(
129-
// border: Border.all(width: 2),
130-
// ),
131-
backgroundColor: Colors.blue,
132-
),
133-
},
134-
onLinkTap: (url) {
135-
print("Opening $url...");
136-
},
137-
onImageTap: (src) {
138-
print(src);
139-
},
140-
),
90+
//Optional parameters:
91+
style: {
92+
"html": Style.fromTextStyle(TextStyle(fontFamily: 'monospace')),
93+
"a": Style(
94+
color: Colors.red,
95+
),
96+
},
97+
customRender: {
98+
"flutter": (RenderContext context, Widget child, attributes) {
99+
return FlutterLogo(
100+
style: (attributes['horizontal'] != null)? FlutterLogoStyle.horizontal: FlutterLogoStyle.markOnly,
101+
textColor: context.style.color,
102+
size: context.style.fontSize * 5,
103+
);
104+
}
105+
},
106+
onLinkTap: (url) {
107+
print("Opening $url...");
108+
},
109+
onImageTap: (src) {
110+
print(src);
111+
},
141112
),
142113
),
143114
);

example/pubspec.lock

Lines changed: 86 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,34 @@ packages:
2222
url: "https://pub.dartlang.org"
2323
source: hosted
2424
version: "1.1.2"
25+
chewie:
26+
dependency: transitive
27+
description:
28+
name: chewie
29+
url: "https://pub.dartlang.org"
30+
source: hosted
31+
version: "0.9.8"
32+
chewie_audio:
33+
dependency: transitive
34+
description:
35+
name: chewie_audio
36+
url: "https://pub.dartlang.org"
37+
source: hosted
38+
version: "1.0.0+1"
2539
collection:
2640
dependency: transitive
2741
description:
2842
name: collection
2943
url: "https://pub.dartlang.org"
3044
source: hosted
3145
version: "1.14.11"
46+
convert:
47+
dependency: transitive
48+
description:
49+
name: convert
50+
url: "https://pub.dartlang.org"
51+
source: hosted
52+
version: "2.1.1"
3253
css_colors:
3354
dependency: transitive
3455
description:
@@ -62,6 +83,13 @@ packages:
6283
relative: true
6384
source: path
6485
version: "1.0.0-pre.1"
86+
flutter_svg:
87+
dependency: transitive
88+
description:
89+
name: flutter_svg
90+
url: "https://pub.dartlang.org"
91+
source: hosted
92+
version: "0.14.1"
6593
flutter_test:
6694
dependency: "direct dev"
6795
description: flutter
@@ -88,27 +116,62 @@ packages:
88116
url: "https://pub.dartlang.org"
89117
source: hosted
90118
version: "1.1.7"
119+
open_iconic_flutter:
120+
dependency: transitive
121+
description:
122+
name: open_iconic_flutter
123+
url: "https://pub.dartlang.org"
124+
source: hosted
125+
version: "0.3.0"
91126
path:
92127
dependency: transitive
93128
description:
94129
name: path
95130
url: "https://pub.dartlang.org"
96131
source: hosted
97132
version: "1.6.4"
133+
path_drawing:
134+
dependency: transitive
135+
description:
136+
name: path_drawing
137+
url: "https://pub.dartlang.org"
138+
source: hosted
139+
version: "0.4.1"
140+
path_parsing:
141+
dependency: transitive
142+
description:
143+
name: path_parsing
144+
url: "https://pub.dartlang.org"
145+
source: hosted
146+
version: "0.1.4"
98147
pedantic:
99148
dependency: transitive
100149
description:
101150
name: pedantic
102151
url: "https://pub.dartlang.org"
103152
source: hosted
104153
version: "1.8.0+1"
154+
petitparser:
155+
dependency: transitive
156+
description:
157+
name: petitparser
158+
url: "https://pub.dartlang.org"
159+
source: hosted
160+
version: "2.4.0"
105161
quiver:
106162
dependency: transitive
107163
description:
108164
name: quiver
109165
url: "https://pub.dartlang.org"
110166
source: hosted
111167
version: "2.0.5"
168+
screen:
169+
dependency: transitive
170+
description:
171+
name: screen
172+
url: "https://pub.dartlang.org"
173+
source: hosted
174+
version: "0.0.5"
112175
sky_engine:
113176
dependency: transitive
114177
description: flutter
@@ -170,6 +233,27 @@ packages:
170233
url: "https://pub.dartlang.org"
171234
source: hosted
172235
version: "2.0.8"
236+
video_player:
237+
dependency: transitive
238+
description:
239+
name: video_player
240+
url: "https://pub.dartlang.org"
241+
source: hosted
242+
version: "0.10.2+1"
243+
webview_flutter:
244+
dependency: transitive
245+
description:
246+
name: webview_flutter
247+
url: "https://pub.dartlang.org"
248+
source: hosted
249+
version: "0.3.14+1"
250+
xml:
251+
dependency: transitive
252+
description:
253+
name: xml
254+
url: "https://pub.dartlang.org"
255+
source: hosted
256+
version: "3.5.0"
173257
sdks:
174-
dart: ">=2.2.2 <3.0.0"
175-
flutter: ">=0.7.4 <2.0.0"
258+
dart: ">=2.4.0 <3.0.0"
259+
flutter: ">=1.7.4 <2.0.0"

0 commit comments

Comments
 (0)