BaseAppBar constructor

BaseAppBar(
  1. BuildContext context, {
  2. Key? key,
  3. String title = '',
  4. bool centerTitle = true,
  5. bool hasBackButton = true,
  6. VoidCallback? onBackPressed,
  7. BaseAppBarButton? rightBarButton,
  8. 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),
      );