xLayout_asPage method
Implementation
xLayout_asPage(BuildContext context) {
return StatefulBuilder(builder: (context, setState) {
return WillPopScope(
onWillPop: () => cmd_Back(),
child: GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
child: Scaffold(
appBar: AppBar(
title: Text(widget.title ?? "", style: XStyles.xStyTextForLabel(Colors.white)),
backgroundColor: widget.title_BackColor,
actions: [
Row(children: [
widget.allowAddDetts
? Container(
margin: EdgeInsets.only(bottom: 5, top: 5, right: 5),
child: Row(children: [
XBtnbase(
icon: Icons.add,
onPressed: () async {
setState(() {
waiterMessage = "Sto caricando...";
isBusy = true;
});
await xOnAddDett(itemInEdit_Clone).then((value) {
super.setState(() {
waiterMessage = "";
isBusy = false;
});
});
},
icon_Size: 25,
elevation: 0,
icon_WidthArea: 30,
backGroundColor: widget.title_BackColor,
icon_Color: Colors.white,
height: 40,
width: 40,
)
]))
: Container(),
Container(margin: EdgeInsets.only(bottom: 8, right: 5), child: Row(children: xLayout_ActionsListWidgets())),
])
],
),
body: Stack(children: [
enteredInEditOnCell
? Container()
: xLayout_BodyBuild() != null
? xLayout_BodyBuild() ?? Container()
: this.xTabs.isNotEmpty
? XResizableWidget(isHorizontalSeparator: true, separatorColor: Colors.grey[700]!, separatorSize: 30, percentages: [
0.3,
0.7
], children: [
xLayout_HeadAreaBuilder(),
this.xTabs.isEmpty
? Container(height: 0)
: this.xTabs.length <= 1
? this.xTabs.map((x) => x.content!).first
: XfxSchedaTabbed(
tabController: tabController,
margin_Horizontal: 0,
tabs_BackGroundColor: Colors.grey[900],
title_Visible: false,
bottomBar_Visible: false,
bottomBar_Children: [],
numberOfTabs: this.xTabs.length,
isScrollableTabs: false,
children: this.xTabs.map((x) => x.content!).toList(),
tabs: this.xTabs,
)
])
: xLayout_HeadAreaBuilder(),
isBusy ? Container(color: Colors.black.withAlpha(180)) : Container(),
isBusy ? XStatefulWidgetBase.LoaderIndicator(isBusy, label: waiterMessage) : Container(),
]),
bottomNavigationBar: (liBottomActions.isNotEmpty)
? BottomNavigationBar(
items: liBottomActions,
type: BottomNavigationBarType.fixed,
currentIndex: 0,
onTap: (value) async => await onTapBottomBar(value),
enableFeedback: true,
showUnselectedLabels: true,
selectedFontSize: 15,
selectedLabelStyle: XStyles.xStyleText(fontSize: 14, colorText: XColors.foregroundLight),
backgroundColor: Colors.grey[900],
unselectedItemColor: XColors.foregroundLight,
unselectedFontSize: 10,
useLegacyColorScheme: false,
unselectedLabelStyle: XStyles.xStyleText(fontSize: 14, colorText: XColors.foregroundLight),
iconSize: 20,
)
: null,
)));
});
}