WowAppBar constructor

WowAppBar({
  1. Key? key,
  2. TextStyle? titleTextStyle,
  3. TextStyle? toolbarTextStyle,
  4. Color? backgroundColor,
  5. double? elevation,
  6. bool? centerTitle,
  7. double? leadingWidth,
  8. List<Widget>? actions,
  9. PreferredSizeWidget? bottom,
  10. Widget? flexibleSpace,
  11. double? toolbarHeight,
  12. String? title,
  13. Color? color,
  14. dynamic onTapBack()?,
  15. Widget? titleWidget,
  16. Widget? leading,
  17. bool hasLeading = true,
})

Implementation

WowAppBar({
  super.key,
  super.titleTextStyle,
  super.toolbarTextStyle,
  super.backgroundColor,
  super.elevation,
  super.centerTitle,
  super.leadingWidth,
  super.actions,
  super.bottom,
  super.flexibleSpace,
  super.toolbarHeight,
  String? title,
  Color? color,
  Function()? onTapBack,
  Widget? titleWidget,
  Widget? leading,
  bool hasLeading = true,
}) : super(
        leading: hasLeading
            ? (leading ??
                Align(
                  alignment: Alignment.centerLeft,
                  child: WowBackButton(
                    color: color,
                    onPressed: onTapBack,
                  ),
                ))
            : null,
        title: titleWidget ??
            WowText(
              title,
              style: titleTextStyle ?? WowTextStyle.title,
              textAlign:
                  (centerTitle ?? true) ? TextAlign.center : TextAlign.start,
            ),
        automaticallyImplyLeading: false,
      );