One_ConcatenatedXItem<T> static method
Widget
One_ConcatenatedXItem<T>({
- required double fontSizeForItem,
- required String title,
- required Color? titleColor,
- required List<
T> items, - required Widget widgetItemInList(
- T
- double? height,
- double? fontSizeForTitleOfArea,
- Axis? wrapDirectionForList,
- bool titleOnTop = true,
- bool borderAllAroundList = true,
- Color? backGroundColorTitleContainer,
- Color? backGroundColor,
- Color? titleBorderColor,
- double? titleContainerHeight,
- double? titleContainerWidth,
- AlignmentGeometry? titleAlignOnTop,
- AlignmentGeometry? titleAlignOnLeft,
- AlignmentGeometry? alignmentChild,
Implementation
static Widget One_ConcatenatedXItem<T>({
///fontSize testi dell'Item principale (Padre)
required double fontSizeForItem,
///Titolo dell'Item principale (Padre)
required String title,
///Colore del titolo dell'Item principale (Padre)
required Color? titleColor,
///Prima lista di Items che conterrĂ l'Item principale (Padre)
required List<T> items,
///Widget per la visualizzazione per gli items della lista
required Widget Function(T) widgetItemInList,
///Altezza dell'XItem
double? height,
double? fontSizeForTitleOfArea,
Axis? wrapDirectionForList,
bool titleOnTop = true,
bool borderAllAroundList = true,
Color? backGroundColorTitleContainer,
Color? backGroundColor,
Color? titleBorderColor,
double? titleContainerHeight,
double? titleContainerWidth,
AlignmentGeometry? titleAlignOnTop,
AlignmentGeometry? titleAlignOnLeft,
AlignmentGeometry? alignmentChild,
}) {
return XItem(
title: title,
titleColor: titleColor,
titleOnTop: titleOnTop,
colorCard: backGroundColor,
titleWidthBorder: 5,
titleBorderColor: titleBorderColor ?? titleColor ?? Colors.black,
titleBackGroundColor: backGroundColorTitleContainer ?? Colors.black,
titleAlignOnTop: titleAlignOnTop ?? Alignment.center,
titleAlignOnLeft: titleAlignOnLeft ?? Alignment.centerLeft,
titleContainerHeight: titleContainerHeight ?? 40,
titleStyle: TextStyle(color: titleColor, fontSize: fontSizeForTitleOfArea, fontWeight: FontWeight.bold),
titleContainerWidth: titleOnTop == true ? double.infinity : titleContainerWidth ?? 40,
children: [
items.length == 0
// NESSUNA - VUOTO
? XContainer(
borderWidth: 5,
title: "",
titleBackColor: titleBorderColor ?? Colors.black,
borderAll: borderAllAroundList,
child: Container(
height: 100,
child: Row(children: [
Expanded(child: Text("..nessuna..", textAlign: TextAlign.center, style: XStyles.xStyleText(fontSize: 30))),
]),
))
// ITEMS
: XContainer(
heightChildContainer: height,
borderWidth: 5,
title: "",
alignmentChild: alignmentChild ?? Alignment.topCenter,
titleBackColor: titleColor,
child: Wrap(
spacing: 2,
runSpacing: 2,
direction: wrapDirectionForList ?? Axis.horizontal,
//LIST
children: items
.map(
//ITEM
widgetItemInList
//ITEM
)
.toList(),
))
]);
}