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