xLayout_HeadAreaBuilder method

Widget xLayout_HeadAreaBuilder({
  1. XView? xclView,
})

Widget che torna il Widget dell'Header della Scheda con anche gli slider a destra e sinistra con le azioni

Implementation

Widget xLayout_HeadAreaBuilder({XView? xclView}) {
  return widget.xHead_Show
      ? Container(
          alignment: Alignment.topCenter,
          child: Slidable(
              key: ValueKey(0),
              startActionPane: xActions_LEFT == null || xActions_LEFT!.isEmpty
                  ? null
                  : ActionPane(motion: ScrollMotion(), extentRatio: xActions_LEFT_Width ?? (xActions_LEFT!.length > 1 ? 0.5 : 0.3), dragDismissible: false, children: [
                      Container(
                          alignment: Alignment.topCenter,
                          child: Wrap(
                              spacing: 3,
                              runSpacing: 3,
                              direction: Axis.vertical,
                              children: xActions_LEFT!
                                  .map((xclAction) => XSlidableAction(
                                        flex: 1,
                                        autoClose: xclAction.autoClose,
                                        margin: EdgeInsets.only(bottom: 3),
                                        width: xclAction.width,
                                        height: xclAction.height,
                                        label_Style: xclAction.label_Style,
                                        isVertical_BTN: xclAction.isVertical_BTN,
                                        toolTip: xclAction.toolTip,
                                        action_Child: xclAction.child,
                                        onPressed: (context) async => await xclAction.cmd!(itemInEdit_Clone, setState, context),
                                        backgroundColor: xclAction.background_Color ?? Colors.grey[900]!,
                                        foregroundColor: xclAction.label_Color ?? xclAction.icon_Color ?? Colors.white,
                                        icon: xclAction.icon ?? null,
                                        icon_Image: xclAction.icon_Image ?? null,
                                        label: xclAction.label ?? "",
                                      ))
                                  .toList()))
                    ]),
              endActionPane: xActions_RIGHT == null || xActions_RIGHT!.isEmpty
                  ? null
                  : ActionPane(motion: ScrollMotion(), extentRatio: xActions_RIGHT_Width ?? (xActions_RIGHT!.length > 1 ? 0.5 : 0.3), dragDismissible: false, children: [
                      Container(
                          alignment: Alignment.topCenter,
                          child: Wrap(
                              spacing: 3,
                              runSpacing: 3,
                              direction: Axis.vertical,
                              children: xActions_RIGHT!
                                  .map((xclAction) => XSlidableAction(
                                        flex: 1,
                                        autoClose: xclAction.autoClose,
                                        margin: EdgeInsets.only(bottom: 3),
                                        width: xclAction.width,
                                        height: xclAction.height,
                                        label_Style: xclAction.label_Style,
                                        isVertical_BTN: xclAction.isVertical_BTN,
                                        toolTip: xclAction.toolTip,
                                        action_Child: xclAction.child,
                                        onPressed: (context) async => await xclAction.cmd!(itemInEdit_Clone, setState, context),
                                        backgroundColor: xclAction.background_Color ?? Colors.grey[900]!,
                                        foregroundColor: xclAction.label_Color ?? xclAction.icon_Color ?? Colors.white,
                                        icon: xclAction.icon ?? null,
                                        icon_Image: xclAction.icon_Image ?? null,
                                        label: xclAction.label ?? "",
                                      ))
                                  .toList()))
                    ]),
              child: enteredInEditOnCell
                  ? Container(
                      height: 2,
                      width: MediaQuery.of(context).size.width,
                    )
                  : _buildWidgetOfHead(xclView: xclView!)))
      : Container();
}