table function
Widget
table(
- dynamic Item,
- dynamic map, {
- dynamic show = false,
})
Implementation
Widget table(Item, map,{show=false}) {
//List<Widget> ld= [];
// ld.sublist(1).toList();
return
SingleChildScrollView(
scrollDirection: Axis.horizontal,
physics: BouncingScrollPhysics(),
child:
// Container(
// constraints: BoxConstraints(maxHeight: 400,
// minHeight: 200),
// child:
Table(
// columnWidths: const <int, TableColumnWidth>{
// 0: IntrinsicColumnWidth(),
// 1: FlexColumnWidth(),
// //2: FixedColumnWidth(64),
// },
defaultColumnWidth: IntrinsicColumnWidth(),
defaultVerticalAlignment: TableCellVerticalAlignment.middle,
border: TableBorder.all(
color: Colors.black26, width: 0.5, style: BorderStyle.solid),
children: Item['rows']
.map<TableRow>((e) => TableRow(
children: e
.map<Widget>((es) => Padding(
padding: const EdgeInsets.only(bottom: 8, top: 8),
child: Row(
mainAxisSize: MainAxisSize.min,
children: FormListWedgit(es['components'], map,pType: 1,show: show),
),
))
.toList()))
.toList(),
)
);
}