getCustomAppBar method
dynamic
getCustomAppBar(})
Implementation
getCustomAppBar(BuildContext context,
{required String? appBarTitle,
required Function? onBackButtonPress,
Color? backgroundColor,
double? elevation,
bool? centerTitle,
List<Widget>? actions,
Widget? icon,
bool? isIconVisible,
bool? isNext,
Color? appTitleColor,
Widget? titleWidget,
Color? iconColor}) {
return AppBar(
iconTheme: IconThemeData(
color: iconColor ??= AppColors.appColorBlack85, //change your color here
),
title: titleWidget ??
Text(
appBarTitle ?? "",
style: appBarTitle != null
? TextStyleElements.headline6
.copyWith(color: appTitleColor, fontWeight: FontWeight.w600)
: TextStyleElements.headline5,
),
backgroundColor: backgroundColor ??= AppColors.appColorTransparent,
elevation: elevation ??= 0.0,
leading: Visibility(
visible: isIconVisible ??= true,
child: IconButton(
icon: icon ??= const Icon(
Icons.keyboard_backspace_rounded,
),
onPressed: onBackButtonPress as void Function()?,
)),
actions: actions,
centerTitle: centerTitle ??= true,
);
}