appBarExpandTitle function
Implementation
AppBar appBarExpandTitle(BuildContext context,
{required String title,
required String subTitle,
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: Column(
crossAxisAlignment: Platform.isAndroid
? CrossAxisAlignment.start
: CrossAxisAlignment.center,
children: [
Text(title).semiBold16(color: colorText ?? titleTextColor),
Text(subTitle).regularContext12(color: colorText ?? subTitleTextColor),
],
),
actions: [action != null ? action : Container()],
brightness: Brightness.light,
);
}