BaseAppBar constructor
BaseAppBar(
- BuildContext context, {
- Key? key,
- String title = '',
- bool logo = false,
- bool centerTitle = true,
- bool hasBackButton = true,
- VoidCallback? onBackPressed,
- BaseAppBarButton? rightBarButton,
- Color backgroundColor = Colors.transparent,
Implementation
BaseAppBar(
final BuildContext context, {
final Key? key,
final String title = '',
final bool logo = false,
final bool centerTitle = true,
final bool hasBackButton = true,
final VoidCallback? onBackPressed,
final BaseAppBarButton? rightBarButton,
final Color backgroundColor = Colors.transparent,
}) : super(
backgroundColor: backgroundColor,
brightness: Brightness.light,
elevation: 0,
key: key,
title: logo
? LegacyTheme.logoAppBar
: Text(
title,
style: TextStyles.headline4,
),
centerTitle: centerTitle,
leading: hasBackButton
? IconButton(
key: const Key('app_bar_back_button'),
icon: const Icon(
Icons.arrow_back_ios,
color: LegacyTheme.primaryColor,
),
onPressed: onBackPressed ?? () => Navigator.of(context).pop(),
)
: null,
actions: _actionsFromBarButton(context, rightBarButton),
);