CustomAppbarWidget constructor
CustomAppbarWidget({
- Key? key,
- String? title,
- Widget? titleWidget,
- Widget? leading,
- Widget? onCloseLeading,
- double? textSize,
- bool addBackButton = true,
- bool addCloseButton = true,
- dynamic onBackPress()?,
- dynamic onClosePress()?,
- Color? backgroundColor = AppColors.activButtonColor,
- Color? backbuttonColor = AppColors.white,
- Color? closeButtonColor = AppColors.white,
- Color? textColor,
- TextStyle? textStyle,
- List<
Widget> ? actions, - dynamic onActionButtonTap()?,
- double? actionButtonWidth = 100,
- Widget? bottom,
- bool? centerTitle,
Implementation
CustomAppbarWidget({
Key? key,
this.title,
this.titleWidget,
this.leading,
this.onCloseLeading,
this.textSize,
this.addBackButton = true,
this.addCloseButton = true,
this.onBackPress,
this.onClosePress,
this.backgroundColor = AppColors.activButtonColor,
this.backbuttonColor = AppColors.white,
this.closeButtonColor = AppColors.white,
this.textColor,
this.textStyle,
this.actions,
this.onActionButtonTap,
this.actionButtonWidth = 100,
this.bottom,
this.centerTitle,
}) : assert(
textColor == null || textStyle == null,
'Cannot provide both a textColor and a textStyle\n'
'To provide both, use "textStyle: TextStyle(color: color)".',
),
super(
key: key,
child: const SizedBox.shrink(),
preferredSize:
Size.fromHeight(bottom == null ? kToolbarHeight : 98),
);