CustomAppbarWidget constructor

CustomAppbarWidget({
  1. Key? key,
  2. String? title,
  3. Widget? titleWidget,
  4. Widget? leading,
  5. Widget? onCloseLeading,
  6. double? textSize,
  7. bool addBackButton = true,
  8. bool addCloseButton = true,
  9. dynamic onBackPress()?,
  10. dynamic onClosePress()?,
  11. Color? backgroundColor = AppColors.activButtonColor,
  12. Color? backbuttonColor = AppColors.white,
  13. Color? closeButtonColor = AppColors.white,
  14. Color? textColor,
  15. TextStyle? textStyle,
  16. List<Widget>? actions,
  17. dynamic onActionButtonTap()?,
  18. double? actionButtonWidth = 100,
  19. Widget? bottom,
  20. 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),
      );