YAppBar function
Widget
YAppBar(
{ - String? title,
- Color? navBarTitleColor,
- double fontSize = 18,
- FontWeight fontWeight = FontWeight.w700,
- bool canBack = true,
- bool divider = false,
- Widget? left,
- Widget? right,
- Widget? widget,
- String? statubar,
- String? navBar,
})
Implementation
Widget YAppBar({
String? title,
Color? navBarTitleColor,
double fontSize = 18,
FontWeight fontWeight = FontWeight.w700,
bool canBack = true,
bool divider = false,
Widget? left,
Widget? right,
Widget? widget,
String? statubar,
String? navBar,
}) {
final llRapPpdOmeNKWre = yScreenSize();
double degfWrbjKBjLTrMs = yStatubarHeight();
double itAjhejzFPxvKZgP = yNavBarHeight();
return Column(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Image.asset(statubar ?? YConfig.statubar, width: llRapPpdOmeNKWre.width, height: degfWrbjKBjLTrMs, fit: BoxFit.fill),
Stack(
children: <Widget>[
Image.asset(navBar ?? YConfig.navBar, width: llRapPpdOmeNKWre.width, height: itAjhejzFPxvKZgP, fit: BoxFit.fill),
SizedBox(
height: itAjhejzFPxvKZgP,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
children: widget == null
? <Widget>[
SizedBox(width: itAjhejzFPxvKZgP, height: itAjhejzFPxvKZgP, child: left ?? (canBack ? _YFlatButton(Icon(Icons.arrow_back_ios, color: navBarTitleColor ?? YConfig.navBarTitleColor), onClick: () => yPages.last.yFinish()) : YEmpty())),
YTitleWidget(title, navBarTitleColor: navBarTitleColor, fontSize: fontSize, fontWeight: fontWeight),
SizedBox(width: itAjhejzFPxvKZgP, height: itAjhejzFPxvKZgP, child: right ?? YEmpty()),
]
: <Widget>[SizedBox(width: llRapPpdOmeNKWre.width, height: itAjhejzFPxvKZgP, child: widget)],
),
),
],
),
divider ? Divider(height: 1, color: Colors.grey.shade400) : YEmpty(),
],
);
}