File tree Expand file tree Collapse file tree 6 files changed +173
-202
lines changed Expand file tree Collapse file tree 6 files changed +173
-202
lines changed Original file line number Diff line number Diff line change @@ -89,8 +89,6 @@ class HtmlParser extends StatelessWidget {
89
89
return parseStyledElement (node, children);
90
90
} else if (INTERACTABLE_ELEMENTS .contains (node.localName)) {
91
91
return parseInteractableElement (node, children);
92
- } else if (BLOCK_ELEMENTS .contains (node.localName)) {
93
- return parseBlockElement (node, children);
94
92
} else if (REPLACED_ELEMENTS .contains (node.localName)) {
95
93
return parseReplacedElement (node);
96
94
} else if (LAYOUT_ELEMENTS .contains (node.localName)) {
@@ -324,14 +322,14 @@ class ContainerSpan extends StatelessWidget {
324
322
Widget build (BuildContext _) {
325
323
return Container (
326
324
decoration: BoxDecoration (
327
- border: style? .block ? . border,
325
+ border: style? .border,
328
326
color: style? .backgroundColor,
329
327
),
330
- height: style? .block ? . height,
331
- width: style? .block ? . width,
328
+ height: style? .height,
329
+ width: style? .width,
332
330
padding: style? .padding,
333
331
margin: style? .margin,
334
- alignment: style? .block ? . alignment,
332
+ alignment: style? .alignment,
335
333
child: child ??
336
334
RichText (
337
335
text: TextSpan (
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
export 'styled_element.dart' ;
2
2
export 'interactable_element.dart' ;
3
- export 'package:flutter_html/src/block_element.dart' ;
4
3
export 'replaced_element.dart' ;
5
4
6
5
const STYLED_ELEMENTS = [
@@ -39,13 +38,8 @@ const STYLED_ELEMENTS = [
39
38
"u" ,
40
39
"var" ,
41
40
"wbr" ,
42
- ];
43
-
44
- const INTERACTABLE_ELEMENTS = [
45
- "a" ,
46
- ];
47
41
48
- const BLOCK_ELEMENTS = [
42
+ //BLOCK ELEMENTS
49
43
"article" ,
50
44
"aside" ,
51
45
"blockquote" ,
@@ -82,6 +76,10 @@ const BLOCK_ELEMENTS = [
82
76
"ul" ,
83
77
];
84
78
79
+ const INTERACTABLE_ELEMENTS = [
80
+ "a" ,
81
+ ];
82
+
85
83
const REPLACED_ELEMENTS = [
86
84
"audio" ,
87
85
"br" ,
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ class AudioContentElement extends ReplacedElement {
138
138
@override
139
139
Widget toWidget (RenderContext context) {
140
140
return Container (
141
- width: context.style.block ? . width ?? 300 ,
141
+ width: context.style.width ?? 300 ,
142
142
child: ChewieAudio (
143
143
controller: ChewieAudioController (
144
144
videoPlayerController: VideoPlayerController .network (
You can’t perform that action at this time.
0 commit comments