diff --git a/lib/widgets/table_view/table_view_row.dart b/lib/widgets/table_view/table_view_row.dart index e20a23e94..a0a513507 100644 --- a/lib/widgets/table_view/table_view_row.dart +++ b/lib/widgets/table_view/table_view_row.dart @@ -11,6 +11,7 @@ class TableViewRow extends StatelessWidget { this.decoration, this.onExpandChanged, this.padding = const EdgeInsets.all(0), + this.spacing = 0.0, }) : super(key: key); final List cells; @@ -18,6 +19,7 @@ class TableViewRow extends StatelessWidget { final Decoration? decoration; final void Function(ExpandableState)? onExpandChanged; final EdgeInsetsGeometry padding; + final double spacing; @override Widget build(BuildContext context) { @@ -28,12 +30,16 @@ class TableViewRow extends StatelessWidget { padding: padding, child: Row( children: [ - ...cells.map( - (e) => Expanded( - flex: e.flex, - child: e, + for (int i = 0; i < cells.length; i++) ...[ + if (i != 0 || i != cells.length) + SizedBox( + width: spacing, + ), + Expanded( + flex: cells[i].flex, + child: cells[i], ), - ), + ], ], ), ) @@ -43,12 +49,16 @@ class TableViewRow extends StatelessWidget { padding: padding, child: Row( children: [ - ...cells.map( - (e) => Expanded( - flex: e.flex, - child: e, + for (int i = 0; i < cells.length; i++) ...[ + if (i != 0 || i != cells.length) + SizedBox( + width: spacing, + ), + Expanded( + flex: cells[i].flex, + child: cells[i], ), - ), + ], ], ), ),