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, title_Color: titleColor, title_OnTop: titleOnTop, card_Color: backGroundColor, title_WidthBorder: 5, title_BorderColor: titleBorderColor ?? titleColor ?? Colors.black, title_BackGroundColor: backGroundColorTitleContainer ?? Colors.black, title_AlignOnTop: titleAlignOnTop ?? Alignment.center, title_AlignOnLeft: titleAlignOnLeft ?? Alignment.centerLeft, title_ContainerHeight: titleContainerHeight ?? 40, title_Style: TextStyle(color: titleColor, fontSize: fontSizeForTitleOfArea, fontWeight: FontWeight.bold), title_ContainerWidth: titleOnTop == true ? double.infinity : titleContainerWidth ?? 40, children: [
items.length == 0
// NESSUNA - VUOTO
? XContainer(
borderWidth: 5,
title: "",
title_BackColor: 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,
title_BackColor: titleColor,
child: Wrap(
spacing: 2,
runSpacing: 2,
direction: wrapDirectionForList ?? Axis.horizontal,
//LIST
children: items
.map(
//ITEM
widgetItemInList
//ITEM
)
.toList(),
))
]);
}