xLayout_RenderDett_HeadDataView method
Override per cambiare widget dell'HeadView dei dettagli degli Items dell'Elenco
Implementation
List<Widget> xLayout_RenderDett_HeadDataView(XView xview, dynamic item, {bool border_Visible = true, List<XCol>? liColsToUse, bool isForComplexItem = false}) {
xLayout_maxRowLen = 0; //resetto
var grps = (liColsToUse != null ? liColsToUse : widget.view!.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((xCol) {
var xwidgt = Container(
padding: EdgeInsets.symmetric(horizontal: 2, vertical: widget.pageMode_Active ? 2 : 3),
// decoration: BoxDecoration(
// color: (xCol.xmodelXprop.col_Color == Color(0xff000000) ? XColors.foregroundLight : xCol.xmodelXprop.col_Color).withAlpha(40),
// border: Border.all(width: 1, color: xCol.xmodelXprop.col_Color == Color(0xff000000) ? XColors.foregroundLight.withAlpha(150) : xCol.xmodelXprop.col_Color.withAlpha(150)),
// ),
// alignment: widget.isEditable && isForComplexItem ? Alignment.center : null,
constraints: BoxConstraints(minWidth: xCol.width * widget.xApp!.KforScale, maxWidth: xCol.width * widget.xApp!.KforScale),
child: widget.isEditable && isForComplexItem ? xLayout_CellWidget_Editable(xCol, item, context, item) : xLayout_Item_RowWidgets(xCol, item));
rowLen += 10 + 5 + xwidgt.constraints!.minWidth;
return xwidgt;
}).toList(),
lastY,
avgColsInY > 3);
if (rowLen > xLayout_maxRowLen) xLayout_maxRowLen = rowLen;
return child;
},
).toList();
return r;
}