simpleAppBar function
Implementation
PreferredSizeWidget simpleAppBar({
String title = "",
TextStyle? titleStyle,
Color backgroundColor = AppColor.appWhite,
List<Widget>? actions,
Function()? onBackPressed,
bool hideBackButton = false,
bool centerTitle = false,
}) {
return AppBar(
centerTitle: centerTitle,
title: Text(
title,
style:
titleStyle ??
const TextStyle(
color: AppColor.appBlack,
fontSize: 18,
fontWeight: FontWeight.w600,
),
),
leading:
hideBackButton
? const SizedBox.shrink()
: GestureDetector(
onTap: onBackPressed,
child: const Icon(
Icons.arrow_back_ios_new,
color: AppColor.appBlack,
),
),
backgroundColor: backgroundColor,
actions: actions,
elevation: 0,
);
}