TkfAppBar constructor
TkfAppBar({})
Implementation
TkfAppBar(
{super.key,
String? backButtonTestKey,
Color backColor = kAppBarBackground,
Color? iconColor,
title = '',
isLeading = true,
required Function onPop,
TextStyle? titleStyle,
centerTitle = false,
Widget? titleWidget})
: super(
preferredSize: const Size.fromHeight(kToolbarHeight),
child: AppBar(
leading: isLeading
? TkfBackButton(
onPress: () => onPop(),
iconColor: iconColor,
testKeyName: backButtonTestKey,
)
: null,
automaticallyImplyLeading: isLeading,
backgroundColor: backColor,
elevation: 0.0,
centerTitle: centerTitle,
title: titleWidget ??
Padding(
padding: const EdgeInsets.only(bottom: 0.0),
child: Text(
title,
style: titleStyle,
),
),
toolbarHeight: kToolbarHeight,
),
);