Showing
2 changed files
with
18 additions
and
13 deletions
@@ -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 | } |
-
Please register or login to post a comment