xLayout_AppBarCustom method
Override per cambiare l'AppBar Custom
Implementation
Widget xLayout_AppBarCustom() {
var mcq = MediaQuery.of(context).size;
return OrientationBuilder(builder: (context, orientation) {
return Slidable(
key: ValueKey(0),
startActionPane: xAppBar_Widgets_LEFT == null || xAppBar_Widgets_LEFT!.isEmpty
? null
: ActionPane(motion: ScrollMotion(), extentRatio: xAppBar_Widgets_LEFT_WidthArea ?? (xAppBar_Widgets_LEFT!.length > 1 ? 0.5 : 0.3), dragDismissible: false, children: [
Container(
alignment: Alignment.centerRight,
padding: EdgeInsets.symmetric(horizontal: 4),
child: Wrap(
spacing: 7,
runSpacing: 7,
runAlignment: WrapAlignment.center,
alignment: WrapAlignment.center,
direction: Axis.vertical,
children: xAppBar_Widgets_LEFT!,
))
]),
endActionPane: xAppBar_Widgets_RIGHT == null || xAppBar_Widgets_RIGHT!.isEmpty
? null
: ActionPane(motion: ScrollMotion(), extentRatio: xAppBar_Widgets_RIGHT_WidthArea ?? (xAppBar_Widgets_RIGHT!.length > 1 ? 0.5 : 0.3), dragDismissible: false, children: [
Container(
alignment: Alignment.centerRight,
padding: EdgeInsets.symmetric(horizontal: 4),
child: Wrap(
spacing: 7,
runSpacing: 7,
runAlignment: WrapAlignment.center,
alignment: WrapAlignment.center,
direction: Axis.vertical,
children: xAppBar_Widgets_RIGHT!,
))
]),
child: Container(
padding: EdgeInsets.only(
top: kIsWeb.not() && Platform.isAndroid
? mcq.width > 450
? 0
: 40
: 0),
width: MediaQuery.of(context).size.width,
color: XSchedaState.color_AppBar_Background,
child: Wrap(alignment: WrapAlignment.spaceBetween, runAlignment: WrapAlignment.center, crossAxisAlignment: WrapCrossAlignment.center, children: [
Column(mainAxisAlignment: MainAxisAlignment.center, children: [
InkWell(
splashColor: Colors.transparent,
enableFeedback: false,
onTap: (widget.schedaMode ?? false) ? null : () => widget.onTapBack != null ? widget.onTapBack!() : widget.xApp!.state.scaffoldKey_MainMenu.currentState!.openDrawer(),
child: Container(
child: Row(mainAxisSize: MainAxisSize.min, children: [
(widget.schedaMode ?? false) ? Container() : Container(width: 40, child: Icon(Icons.arrow_back, color: widget.title_Color)),
Flexible(child: widget.title_Widget ?? Text(widget.title_Text, style: widget.title_Style ?? XStyles.xStyTextForLabel(textColor: widget.title_Color ?? XColors.foregroundLight), overflow: TextOverflow.ellipsis)),
]))),
xLayout_Title_BottomWidget() ?? Container(height: 0, width: 0),
]),
Row(mainAxisSize: MainAxisSize.min, children: [
Container(margin: EdgeInsets.symmetric(vertical: 5, horizontal: 5), child: Row(children: xLayout_Actions())),
widget.onRefresh_ScrollDownList == null
? Container()
: XBtnbase(
icon: Icons.replay_outlined,
onPressed: widget.onRefresh_ScrollDownList != null ? () => widget.onRefresh_ScrollDownList!(context) : () {},
width: 40,
height: 40,
margin: EdgeInsets.all(5),
)
])
])));
});
}