File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ class Home extends StatelessWidget {
4545 home: Scaffold (
4646 appBar: AppBar (title: Text ("Demo" )),
4747 body: Container (
48+ color: Colors .white,
4849 padding: EdgeInsets .all (16.0 ),
4950 child: RichText (text: textSpan),
5051 ),
Original file line number Diff line number Diff line change @@ -302,8 +302,7 @@ class Parser {
302302 event.name == 'h4' ||
303303 event.name == 'h5' ||
304304 event.name == 'h6' ||
305- event.name == 'div' ||
306- event.name == 'body' ) {
305+ event.name == 'div' ) {
307306 spans.add (TextSpan (
308307 text: "\n\n " ,
309308 ));
@@ -337,7 +336,7 @@ class Parser {
337336
338337 //removing last textSpan to avoid extra space at the bottom
339338 if (spans.isNotEmpty) {
340- spans.removeLast ();
339+ if (spans.last.text == ' \n\n ' ) spans.removeLast ();
341340 } else {
342341 print ("Empty HTML content" );
343342 }
You can’t perform that action at this time.
0 commit comments