@@ -5,6 +5,7 @@ import 'package:flutter_html/html_parser.dart';
5
5
import 'package:flutter_html/src/anchor.dart' ;
6
6
import 'package:flutter_html/src/html_elements.dart' ;
7
7
import 'package:flutter_html/src/styled_element.dart' ;
8
+ import 'package:flutter_html/src/utils.dart' ;
8
9
import 'package:flutter_html/style.dart' ;
9
10
import 'package:flutter_layout_grid/flutter_layout_grid.dart' ;
10
11
import 'package:html/dom.dart' as dom;
@@ -33,8 +34,8 @@ class TableLayoutElement extends LayoutElement {
33
34
Widget toWidget (RenderContext context) {
34
35
return Container (
35
36
key: AnchorKey .of (context.parser.key, this ),
36
- margin : style.margin ,
37
- padding : style.padding ,
37
+ padding : style.padding ? .nonNegative ,
38
+ margin : style.margin ? .nonNegative ,
38
39
decoration: BoxDecoration (
39
40
color: style.backgroundColor,
40
41
border: style.border,
@@ -115,7 +116,7 @@ class TableLayoutElement extends LayoutElement {
115
116
cells.add (GridPlacement (
116
117
child: Container (
117
118
width: double .infinity,
118
- padding: child.style.padding ?? row.style.padding,
119
+ padding: child.style.padding? .nonNegative ?? row.style.padding? .nonNegative ,
119
120
decoration: BoxDecoration (
120
121
color: child.style.backgroundColor ?? row.style.backgroundColor,
121
122
border: child.style.border ?? row.style.border,
0 commit comments