BasicAppBar constructor
BasicAppBar({
- Key? key,
- String? titleText,
- Widget? title,
- Widget? action,
- List<
Widget> ? actions, - bool isMaybePop = false,
- double? elevation,
- Widget? leading,
- Color? backgroundColor,
- bool enableLeading = true,
- 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
BasicAppBar({
super.key,
String? titleText,
Widget? title,
Widget? action,
List<Widget>? actions,
bool isMaybePop = false,
double? elevation,
Widget? leading,
Color? backgroundColor,
bool enableLeading = true,
IconThemeData? iconTheme,
SystemUiOverlayStyle? 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 ??
TextLarge(titleText,
color: GlobalConfig().config.appBarConfig?.titleColor),
leading: enableLeading
? leading ?? BackIcon(isMaybePop: isMaybePop)
: const SizedBox(),
elevation:
elevation ?? GlobalConfig().config.appBarConfig?.elevation,
systemOverlayStyle: systemOverlayStyle ??
GlobalConfig().config.appBarConfig?.systemOverlayStyle,
iconTheme:
iconTheme ?? GlobalConfig().config.appBarConfig?.iconTheme,
actions: actions ??
[
if (action != null)
Container(
width: 100,
alignment: Alignment.centerRight,
margin: const EdgeInsets.only(right: 16),
child: action)
],
backgroundColor: backgroundColor ??
GlobalConfig().config.appBarConfig?.backgroundColor);