@@ -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
alignment: style.alignment,
39
40
decoration: BoxDecoration (
40
41
color: style.backgroundColor,
@@ -122,7 +123,7 @@ class TableLayoutElement extends LayoutElement {
122
123
cells.add (GridPlacement (
123
124
child: Container (
124
125
width: double .infinity,
125
- padding: child.style.padding ?? row.style.padding,
126
+ padding: child.style.padding? .nonNegative ?? row.style.padding? .nonNegative ,
126
127
decoration: BoxDecoration (
127
128
color: child.style.backgroundColor ?? row.style.backgroundColor,
128
129
border: child.style.border ?? row.style.border,
0 commit comments