getCustomAppBarWithProfileImage method
dynamic
getCustomAppBarWithProfileImage(})
Implementation
getCustomAppBarWithProfileImage(BuildContext context,
{required String appBarTitle,
required Function onBackButtonPress,
Color? backgroundColor,
double? elevation,
required String imageUrl,
bool? centerTitle,
List<Widget>? actions,
Widget? icon,
bool? isIconVisible,
bool? isNext,
Color? appTitleColor,
Color? iconColor}) {
return AppBar(
iconTheme: IconThemeData(
color: iconColor ??=
AppColors.primaryTextColor, //change your color here
),
title: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Visibility(
visible: isIconVisible ??= true,
child: IconButton(
icon: icon ??= const Icon(
Icons.keyboard_backspace_rounded,
size: 20,
// add custom icons also
),
onPressed: onBackButtonPress as void Function()?,
)),
Text(
appBarTitle,
// ignore: unnecessary_null_comparison
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,
child: IconButton(
icon: icon,
onPressed: onBackButtonPress as void Function()?,
)),
actions: actions,
centerTitle: centerTitle ??= true,
);
}