AppBar constructor
- Key? key,
- Widget? leading,
- bool automaticallyImplyLeading = true,
- Widget? title,
- List<
Widget> ? actions, - Widget? flexibleSpace,
- PreferredSizeWidget? bottom,
- double? elevation,
- double? scrolledUnderElevation,
- ScrollNotificationPredicate notificationPredicate = defaultScrollNotificationPredicate,
- Color? shadowColor,
- Color? surfaceTintColor,
- ShapeBorder? shape,
- Color? backgroundColor,
- Color? foregroundColor,
- IconThemeData? iconTheme,
- IconThemeData? actionsIconTheme,
- bool primary = true,
- bool? centerTitle,
- bool excludeHeaderSemantics = false,
- double? titleSpacing,
- double toolbarOpacity = 1.0,
- double bottomOpacity = 1.0,
- double? toolbarHeight,
- double? leadingWidth,
- TextStyle? toolbarTextStyle,
- TextStyle? titleTextStyle,
- SystemUiOverlayStyle? systemOverlayStyle,
- bool forceMaterialTransparency = false,
- Clip? clipBehavior,
Creates a Material Design app bar.
If elevation is specified, it must be non-negative.
Typically used in the Scaffold.appBar property.
Implementation
AppBar({
super.key,
this.leading,
this.automaticallyImplyLeading = true,
this.title,
this.actions,
this.flexibleSpace,
this.bottom,
this.elevation,
this.scrolledUnderElevation,
this.notificationPredicate = defaultScrollNotificationPredicate,
this.shadowColor,
this.surfaceTintColor,
this.shape,
this.backgroundColor,
this.foregroundColor,
this.iconTheme,
this.actionsIconTheme,
this.primary = true,
this.centerTitle,
this.excludeHeaderSemantics = false,
this.titleSpacing,
this.toolbarOpacity = 1.0,
this.bottomOpacity = 1.0,
this.toolbarHeight,
this.leadingWidth,
this.toolbarTextStyle,
this.titleTextStyle,
this.systemOverlayStyle,
this.forceMaterialTransparency = false,
this.clipBehavior,
}) : assert(elevation == null || elevation >= 0.0),
preferredSize = _PreferredAppBarSize(toolbarHeight, bottom?.preferredSize.height);