appBarNomal function

AppBar appBarNomal(
  1. BuildContext context,
  2. String title, {
  3. bool showBack = true,
  4. Widget? action,
  5. Color? colorBackground,
  6. Color? colorText,
})

Implementation

AppBar appBarNomal(BuildContext context, String title,
    {bool showBack = true,
    Widget? action,
    Color? colorBackground,
    Color? colorText}) {
  return AppBar(
    backgroundColor: colorBackground ?? Colors.white,
    centerTitle: Platform.isIOS,
    leading: showBack ? BackButton(color: titleTextColor) : Container(),
    title: Text(
      title,
      style: TextStyle(
          color: colorText ?? titleTextColor,
          fontWeight: FontWeight.w600,
          fontSize: 16),
    ),
    actions: [action != null ? action : Container()],
    brightness: Brightness.light,
  );
}