One_ConcatenatedXItem<T> static method

Widget One_ConcatenatedXItem<T>({
  1. required double fontSizeForItem,
  2. required String title,
  3. required Color? titleColor,
  4. required List<T> items,
  5. required Widget widgetItemInList(
    1. T
    ),
  6. double? height,
  7. double? fontSizeForTitleOfArea,
  8. Axis? wrapDirectionForList,
  9. bool titleOnTop = true,
  10. bool borderAllAroundList = true,
  11. Color? backGroundColorTitleContainer,
  12. Color? backGroundColor,
  13. Color? titleBorderColor,
  14. double? titleContainerHeight,
  15. double? titleContainerWidth,
  16. AlignmentGeometry? titleAlignOnTop,
  17. AlignmentGeometry? titleAlignOnLeft,
  18. 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(),
            ))
  ]);
}