BaseAppBar constructor
BaseAppBar({
- Key? key,
- String? titleText = '',
- Widget? title,
- Widget? action,
- List<
Widget> ? actions, - bool isMaybePop = false,
- Widget? leading,
- bool enableLeading = true,
- double? elevation,
- Color? backgroundColor,
- IconThemeData? iconTheme,
- SystemUiOverlayStyle? systemOverlayStyle,
- bool? centerTitle = true,
- PreferredSizeWidget? bottom,
- IconThemeData? actionsIconTheme,
- bool automaticallyImplyLeading = true,
- double bottomOpacity = 1.0,
- bool excludeHeaderSemantics = true,
- Widget? flexibleSpace,
- double? leadingWidth,
- ScrollNotificationPredicate notificationPredicate = defaultScrollNotificationPredicate,
- bool primary = true,
- double? scrolledUnderElevation,
- Color? shadowColor,
- Color? foregroundColor,
- ShapeBorder? shape,
- Color? surfaceTintColor,
- double? titleSpacing,
- TextStyle? titleTextStyle,
- double? toolbarHeight,
- double toolbarOpacity = 1.0,
- 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)
]);