AppBarTheme class Null safety

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({Brightness? brightness, Color? color, Color? backgroundColor, Color? foregroundColor, double? elevation, Color? shadowColor, IconThemeData? iconTheme, IconThemeData? actionsIconTheme, TextTheme? textTheme, bool? centerTitle, double? titleSpacing, TextStyle? toolbarTextStyle, TextStyle? titleTextStyle, SystemUiOverlayStyle? systemOverlayStyle, bool? backwardsCompatibility})
Creates a theme that can be used for ThemeData.appBarTheme.
const

Properties

actionsIconTheme IconThemeData?
Overrides the default value of AppBar.actionsIconTheme in all descendant widgets. [...]
final
backgroundColor Color?
Overrides the default value of AppBar.backgroundColor in all descendant AppBar widgets. [...]
final
backwardsCompatibility bool?
Overrides the default value of AppBar.backwardsCompatibility property in all descendant AppBar widgets.
final
brightness Brightness?
This property is obsolete, please use systemOverlayStyle instead. [...]
final
centerTitle bool?
Overrides the default value for AppBar.centerTitle. property in all descendant widgets.
final
color Color?
Obsolete property that overrides the default value of AppBar.backgroundColor in all descendant AppBar widgets. [...]
read-only
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 widgets. [...]
final
hashCode int
The hash code for this object. [...]
read-only, override
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.
read-only, inherited
shadowColor Color?
Overrides the default value for AppBar.shadowColor in all descendant widgets.
final
systemOverlayStyle SystemUiOverlayStyle?
Overrides the default value of AppBar.systemOverlayStyle property in all descendant AppBar widgets.
final
textTheme TextTheme?
Overrides the default value of the obsolete AppBar.textTheme property in all descendant AppBar widgets. [...]
final
titleSpacing double?
Overrides the default value for 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
toolbarTextStyle TextStyle?
Overrides the default value for the obsolete AppBar.toolbarTextStyle property in all descendant AppBar widgets. [...]
final

Methods

copyWith({IconThemeData? actionsIconTheme, Brightness? brightness, Color? color, Color? backgroundColor, Color? foregroundColor, double? elevation, Color? shadowColor, IconThemeData? iconTheme, TextTheme? textTheme, bool? centerTitle, double? titleSpacing, TextStyle? toolbarTextStyle, TextStyle? titleTextStyle, SystemUiOverlayStyle? systemOverlayStyle, bool? backwardsCompatibility}) 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 non-existent 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.