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 mkmvlaluTtVhsNOU = yScreenSize();
double KKyamBNgcWWQxCHE = yStatubarHeight();
double IAKzXrrQkXhCoUyf = yNavBarHeight();
return Column(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Image.asset(statubar ?? YConfig.statubar, width: mkmvlaluTtVhsNOU.width, height: KKyamBNgcWWQxCHE, fit: BoxFit.fill),
Stack(
children: <Widget>[
Image.asset(navBar ?? YConfig.navBar, width: mkmvlaluTtVhsNOU.width, height: IAKzXrrQkXhCoUyf, fit: BoxFit.fill),
SizedBox(
height: IAKzXrrQkXhCoUyf,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
children: widget == null
? <Widget>[
SizedBox(width: IAKzXrrQkXhCoUyf, height: IAKzXrrQkXhCoUyf, 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: IAKzXrrQkXhCoUyf, height: IAKzXrrQkXhCoUyf, child: right ?? YEmpty()),
]
: <Widget>[SizedBox(width: mkmvlaluTtVhsNOU.width, height: IAKzXrrQkXhCoUyf, child: widget)],
),
),
],
),
divider ? Divider(height: 1, color: Colors.grey.shade400) : YEmpty(),
],
);
}