AppBarTheme class

Overrides the default values of visual properties for descendant AppBar widgets.

Descendant widgets obtain the current AppBarTheme object with AppBarTheme.of(context). Instances of AppBarTheme can be customized with AppBarTheme.copyWith.

Typically an AppBarTheme is specified as part of the overall Theme with ThemeData.appBarTheme.

All AppBarTheme properties are null by default. When null, the AppBar compute its own default values, typically based on the overall theme's ThemeData.colorScheme, ThemeData.textTheme, and ThemeData.iconTheme.

Mixed in types
Annotations

Constructors

AppBarTheme({Color? color, Color? backgroundColor, Color? foregroundColor, double? elevation, double? scrolledUnderElevation, Color? shadowColor, Color? surfaceTintColor, ShapeBorder? shape, IconThemeData? iconTheme, IconThemeData? actionsIconTheme, bool? centerTitle, double? titleSpacing, double? toolbarHeight, TextStyle? toolbarTextStyle, TextStyle? titleTextStyle, SystemUiOverlayStyle? systemOverlayStyle})
Creates a theme that can be used for ThemeData.appBarTheme.
const

Properties

actionsIconTheme IconThemeData?
Overrides the default value of AppBar.actionsIconTheme in all descendant AppBar widgets.
final
backgroundColor Color?
Overrides the default value of AppBar.backgroundColor in all descendant AppBar widgets.
final
centerTitle bool?
Overrides the default value of AppBar.centerTitle property in all descendant AppBar widgets.
final
elevation double?
Overrides the default value of AppBar.elevation in all descendant AppBar widgets.
final
foregroundColor Color?
Overrides the default value of AppBar.foregroundColor in all descendant AppBar widgets.
final
hashCode int
The hash code for this object.
no setteroverride
iconTheme IconThemeData?
Overrides the default value of AppBar.iconTheme in all descendant AppBar widgets.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrolledUnderElevation double?
Overrides the default value of AppBar.scrolledUnderElevation in all descendant AppBar widgets.
final
shadowColor Color?
Overrides the default value of AppBar.shadowColor in all descendant AppBar widgets.
final
shape ShapeBorder?
Overrides the default value of AppBar.shape in all descendant AppBar widgets.
final
surfaceTintColor Color?
Overrides the default value of AppBar.surfaceTintColor in all descendant AppBar widgets.
final
systemOverlayStyle SystemUiOverlayStyle?
Overrides the default value of AppBar.systemOverlayStyle property in all descendant AppBar widgets.
final
titleSpacing double?
Overrides the default value of the obsolete AppBar.titleSpacing property in all descendant AppBar widgets.
final
titleTextStyle TextStyle?
Overrides the default value of AppBar.titleTextStyle property in all descendant AppBar widgets.
final
toolbarHeight double?
Overrides the default value of the AppBar.toolbarHeight property in all descendant AppBar widgets.
final
toolbarTextStyle TextStyle?
Overrides the default value of the obsolete AppBar.toolbarTextStyle property in all descendant AppBar widgets.
final

Methods

copyWith({IconThemeData? actionsIconTheme, Color? color, Color? backgroundColor, Color? foregroundColor, double? elevation, double? scrolledUnderElevation, Color? shadowColor, Color? surfaceTintColor, ShapeBorder? shape, IconThemeData? iconTheme, bool? centerTitle, double? titleSpacing, double? toolbarHeight, TextStyle? toolbarTextStyle, TextStyle? titleTextStyle, SystemUiOverlayStyle? systemOverlayStyle}) AppBarTheme
Creates a copy of this object with the given fields replaced with the new values.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

lerp(AppBarTheme? a, AppBarTheme? b, double t) AppBarTheme
Linearly interpolate between two AppBar themes.
of(BuildContext context) AppBarTheme
The ThemeData.appBarTheme property of the ambient Theme.