xLayout_Render_HeadView_Widget_forY method
Da overridare per Modificare la composizione dei pezzi dell'HEAD
Implementation
Widget xLayout_Render_HeadView_Widget_forY(
MapEntry<int, List<XCol<dynamic>>> e,
List<Widget> children,
int lastY,
bool border_separator, {
bool border_Visible = true,
Color? border_color,
}) {
late BoxDecoration? border;
late EdgeInsets? margin;
if (border_Visible) {
if (lastY == e.key) {
if (children.length == 1) {
margin = null;
border = BoxDecoration(
border: Border(
bottom: BorderSide(width: 2, color: border_color ?? widget.title_Color ?? XColors.foregroundLight),
left: BorderSide(width: 2, color: border_color ?? widget.title_Color ?? XColors.foregroundLight),
right: BorderSide(width: 2, color: border_color ?? widget.title_Color ?? XColors.foregroundLight),
));
} else {
Color(0xff87d37c);
//ultima e GRANDE
margin = !border_separator ? null : EdgeInsets.only(top: 10);
border = BoxDecoration(border: Border(bottom: BorderSide(width: 2, color: border_color ?? widget.title_Color ?? XColors.foregroundLight), left: BorderSide(width: 2, color: border_color ?? widget.title_Color ?? XColors.foregroundLight), right: BorderSide(width: 2, color: border_color ?? widget.title_Color ?? XColors.foregroundLight), top: border_separator ? BorderSide(width: 2, color: border_color ?? widget.title_Color ?? XColors.foregroundLight) : BorderSide.none));
}
} else {
//prima e altre Y
margin = e.key == 0 || children.length == 1 || !border_separator ? null : EdgeInsets.only(top: 10);
if (children.length == 1 || !border_separator)
border = BoxDecoration(border: border_Visible ? Border.symmetric(vertical: BorderSide(width: 2, color: border_color ?? widget.title_Color ?? XColors.foregroundLight)) : null);
else
border = BoxDecoration(border: border_Visible ? Border.all(width: 2, color: border_color ?? widget.title_Color ?? XColors.foregroundLight) : null);
}
} else
border = null;
margin = null;
return Container(
decoration: border,
margin: margin,
//padding: border != null ? null : EdgeInsets.only(left: 5, right: 5),
padding: EdgeInsets.only(left: 5, right: 5, top: 4),
child: Column(mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [
widget.modePage_Active ? Container(width: 0, height: 0) : xLayout_GetTitleWidget(e.key),
widget.modePage_Active ? Container(width: 0, height: 0) : (widget.title_Widgets_OnTopHeader == null ? Container(width: 0, height: 0) : SizedBox(height: 15)),
Container(
padding: border_Visible ? EdgeInsets.only(bottom: 4, top: 4) : EdgeInsets.only(top: 0, bottom: 0, left: 0, right: 0),
alignment: Alignment.topLeft,
margin: border_Visible ? EdgeInsets.only(top: 5, left: 0, right: 0) : EdgeInsets.only(top: 0, bottom: 0, left: 0, right: 0),
child: Wrap(
runSpacing: 15,
spacing: 5,
direction: Axis.horizontal,
alignment: WrapAlignment.start,
runAlignment: WrapAlignment.start,
crossAxisAlignment: WrapCrossAlignment.start,
children: children,
))
]));
}