YAppBar function

Widget YAppBar({
  1. String? title,
  2. Color? navBarTitleColor,
  3. double fontSize = 18,
  4. FontWeight fontWeight = FontWeight.w700,
  5. bool canBack = true,
  6. bool divider = false,
  7. Widget? left,
  8. Widget? right,
  9. Widget? widget,
  10. String? statubar,
  11. 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(),
    ],
  );
}