@@ -5,6 +5,7 @@ import 'package:flutter_html/html_parser.dart';
55import 'package:flutter_html/src/anchor.dart' ;
66import 'package:flutter_html/src/html_elements.dart' ;
77import 'package:flutter_html/src/styled_element.dart' ;
8+ import 'package:flutter_html/src/utils.dart' ;
89import 'package:flutter_html/style.dart' ;
910import 'package:flutter_layout_grid/flutter_layout_grid.dart' ;
1011import 'package:html/dom.dart' as dom;
@@ -33,8 +34,8 @@ class TableLayoutElement extends LayoutElement {
3334 Widget toWidget (RenderContext context) {
3435 return Container (
3536 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 ,
3839 alignment: style.alignment,
3940 decoration: BoxDecoration (
4041 color: style.backgroundColor,
@@ -121,8 +122,9 @@ class TableLayoutElement extends LayoutElement {
121122 }
122123 cells.add (GridPlacement (
123124 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,
126128 decoration: BoxDecoration (
127129 color: child.style.backgroundColor ?? row.style.backgroundColor,
128130 border: child.style.border ?? row.style.border,
0 commit comments