David PHAM-VAN

TableHelper data accepts Widgets as child

@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 ## 3.10.4 3 ## 3.10.4
4 4
5 - Fix Deprecation warning message 5 - Fix Deprecation warning message
  6 +- TableHelper data accepts Widgets as child
6 7
7 ## 3.10.3 8 ## 3.10.3
8 9
@@ -98,12 +98,14 @@ mixin TableHelper { @@ -98,12 +98,14 @@ mixin TableHelper {
98 padding: headerPadding, 98 padding: headerPadding,
99 decoration: headerCellDecoration, 99 decoration: headerCellDecoration,
100 constraints: BoxConstraints(minHeight: headerHeight), 100 constraints: BoxConstraints(minHeight: headerHeight),
101 - child: Text(  
102 - headerFormat == null  
103 - ? cell.toString()  
104 - : headerFormat(tableRow.length, cell),  
105 - style: headerStyle,  
106 - ), 101 + child: cell is Widget
  102 + ? cell
  103 + : Text(
  104 + headerFormat == null
  105 + ? cell.toString()
  106 + : headerFormat(tableRow.length, cell),
  107 + style: headerStyle,
  108 + ),
107 ), 109 ),
108 ); 110 );
109 } 111 }
@@ -129,13 +131,15 @@ mixin TableHelper { @@ -129,13 +131,15 @@ mixin TableHelper {
129 alignment: align, 131 alignment: align,
130 padding: headerPadding, 132 padding: headerPadding,
131 constraints: BoxConstraints(minHeight: headerHeight), 133 constraints: BoxConstraints(minHeight: headerHeight),
132 - child: Text(  
133 - headerFormat == null  
134 - ? cell.toString()  
135 - : headerFormat(tableRow.length, cell),  
136 - style: headerStyle,  
137 - textAlign: textAlign,  
138 - ), 134 + child: cell is Widget
  135 + ? cell
  136 + : Text(
  137 + headerFormat == null
  138 + ? cell.toString()
  139 + : headerFormat(tableRow.length, cell),
  140 + style: headerStyle,
  141 + textAlign: textAlign,
  142 + ),
139 ), 143 ),
140 ); 144 );
141 } 145 }