xLayout_Render_HeadView method
Da Overridare per Modificare la Renderizzazione delle celle all'Interno dell'Head
Implementation
List<Widget> xLayout_Render_HeadView(XView xview, {bool border_Visible = true}) {
xLayout_maxRowLen = 0; //resetto
var grps = xview.cols
. //
groupListsBy((element) => element.originY)
.entries
.toList();
var lastY = grps.last.key;
double avgColsInY = 0;
grps.map((e) => avgColsInY += e.value.length).toList();
avgColsInY = avgColsInY / grps.length;
var r = grps.map(
(e) {
//x ogni Y
//x orgni sottoROW/grp
double rowLen = 0;
var child = xLayout_Render_HeadView_Widget_forY(
e,
e.value.map((e) {
var xwidgt = widget.editable ? xLayout_CellWidget_Editable(e, itemInEdit_Clone, context, itemInEdit_Clone) : xLayout_CellWidget(e, itemInEdit_Clone, context);
rowLen += 10 + 5 + xwidgt.constraints!.minWidth;
return xwidgt;
}).toList(),
lastY,
border_Visible: border_Visible,
avgColsInY > 3);
if (rowLen > xLayout_maxRowLen) xLayout_maxRowLen = rowLen;
return child;
},
).toList();
return r;
}