BaseAppBar constructor

BaseAppBar({
  1. Key? key,
  2. String? titleText = '',
  3. Widget? title,
  4. Widget? action,
  5. List<Widget>? actions,
  6. bool isMaybePop = false,
  7. Widget? leading,
  8. bool enableLeading = true,
  9. double? elevation,
  10. Color? backgroundColor,
  11. IconThemeData? iconTheme,
  12. SystemUiOverlayStyle? systemOverlayStyle,
  13. bool? centerTitle = true,
  14. PreferredSizeWidget? bottom,
  15. IconThemeData? actionsIconTheme,
  16. bool automaticallyImplyLeading = true,
  17. double bottomOpacity = 1.0,
  18. bool excludeHeaderSemantics = true,
  19. Widget? flexibleSpace,
  20. double? leadingWidth,
  21. ScrollNotificationPredicate notificationPredicate = defaultScrollNotificationPredicate,
  22. bool primary = true,
  23. double? scrolledUnderElevation,
  24. Color? shadowColor,
  25. Color? foregroundColor,
  26. ShapeBorder? shape,
  27. Color? surfaceTintColor,
  28. double? titleSpacing,
  29. TextStyle? titleTextStyle,
  30. double? toolbarHeight,
  31. double toolbarOpacity = 1.0,
  32. TextStyle? toolbarTextStyle,
})

Implementation

BaseAppBar({
  super.key,
  String? titleText = '',
  Widget? title,
  Widget? action,
  List<Widget>? actions,
  bool isMaybePop = false,
  Widget? leading,
  bool enableLeading = true,
  super.elevation,
  super.backgroundColor,
  super.iconTheme,
  super.systemOverlayStyle,
  super.centerTitle = true,
  super.bottom,
  super.actionsIconTheme,
  super.automaticallyImplyLeading,
  super.bottomOpacity = 1.0,
  super.excludeHeaderSemantics = true,
  super.flexibleSpace,
  super.leadingWidth,
  super.notificationPredicate = defaultScrollNotificationPredicate,
  super.primary = true,
  super.scrolledUnderElevation,
  super.shadowColor,
  super.foregroundColor,
  super.shape,
  super.surfaceTintColor,
  super.titleSpacing,
  super.titleTextStyle,
  super.toolbarHeight,
  super.toolbarOpacity = 1.0,
  super.toolbarTextStyle,
}) : super(
          title: title ?? (titleText == null ? null : TextLarge(titleText)),
          leading: enableLeading
              ? leading ?? BackIcon(isMaybePop: isMaybePop)
              : null,
          actions: [
            if (actions != null && actions.isNotEmpty) ...actions,
            if (action != null)
              Universal(
                  margin: const EdgeInsets.only(right: 12), child: action)
          ]);