Shahriyar Aghajani
Committed by David PHAM-VAN

change text widget in table to widget

@@ -351,7 +351,6 @@ class Table extends Widget with SpanningWidget { @@ -351,7 +351,6 @@ class Table extends Widget with SpanningWidget {
351 } else { 351 } else {
352 for (final dynamic cell in row) { 352 for (final dynamic cell in row) {
353 final align = cellAlignments[tableRow.length] ?? cellAlignment; 353 final align = cellAlignments[tableRow.length] ?? cellAlignment;
354 - final textAlign = _textAlign(align);  
355 tableRow.add( 354 tableRow.add(
356 Container( 355 Container(
357 alignment: align, 356 alignment: align,
@@ -360,13 +359,14 @@ class Table extends Widget with SpanningWidget { @@ -360,13 +359,14 @@ class Table extends Widget with SpanningWidget {
360 decoration: cellDecoration == null 359 decoration: cellDecoration == null
361 ? null 360 ? null
362 : cellDecoration(tableRow.length, cell, rowNum), 361 : cellDecoration(tableRow.length, cell, rowNum),
363 - child: Text(  
364 - cellFormat == null  
365 - ? cell.toString()  
366 - : cellFormat(tableRow.length, cell),  
367 - style: isOdd ? oddCellStyle : cellStyle,  
368 - textAlign: textAlign,  
369 - ), 362 + child: cell is String
  363 + ? Text(
  364 + cellFormat == null
  365 + ? cell.toString()
  366 + : cellFormat(tableRow.length, cell),
  367 + style: isOdd ? oddCellStyle : cellStyle,
  368 + textAlign: _textAlign(align))
  369 + : (cell is Widget ? cell : null),
370 ), 370 ),
371 ); 371 );
372 } 372 }