AppBarThemeData class
Defines default property values for descendant AppBar widgets.
Descendant widgets obtain the current AppBarThemeData object using AppBarTheme.of. Instances of AppBarThemeData can be customized with AppBarThemeData.copyWith.
Typically an AppBarThemeData is specified as part of the overall Theme with ThemeData.appBarTheme.
All AppBarThemeData properties are null
by default. When null, the AppBar
will use the values from ThemeData if they exist, otherwise it will
provide its own defaults. See the individual AppBar properties for details.
See also:
- Mixed-in types
- Annotations
Constructors
- AppBarThemeData.new({Color? backgroundColor, Color? foregroundColor, @Deprecated('Use backgroundColor instead. ' 'This feature was deprecated after v3.33.0-0.2.pre.') Color? color, double? elevation, double? scrolledUnderElevation, Color? shadowColor, Color? surfaceTintColor, ShapeBorder? shape, IconThemeData? iconTheme, IconThemeData? actionsIconTheme, bool? centerTitle, double? titleSpacing, double? leadingWidth, double? toolbarHeight, TextStyle? toolbarTextStyle, TextStyle? titleTextStyle, SystemUiOverlayStyle? systemOverlayStyle, EdgeInsetsGeometry? actionsPadding})
-
Creates an app bar theme that can be used with ThemeData.appBarTheme.
const
Properties
- actionsIconTheme → IconThemeData?
-
Overrides the default value of AppBar.actionsIconTheme.
final
- actionsPadding → EdgeInsetsGeometry?
-
Overrides the default value of AppBar.actionsPadding.
final
- backgroundColor → Color?
-
Overrides the default value of AppBar.backgroundColor.
final
- centerTitle → bool?
-
Overrides the default value of AppBar.centerTitle.
final
- elevation → double?
-
Overrides the default value of AppBar.elevation.
final
- foregroundColor → Color?
-
Overrides the default value of AppBar.foregroundColor.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- iconTheme → IconThemeData?
-
Overrides the default value of AppBar.iconTheme.
final
- leadingWidth → double?
-
Overrides the default value of AppBar.leadingWidth.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrolledUnderElevation → double?
-
Overrides the default value of AppBar.scrolledUnderElevation.
final
- shadowColor → Color?
-
Overrides the default value of AppBar.shadowColor.
final
- shape → ShapeBorder?
-
Overrides the default value of AppBar.shape.
final
- surfaceTintColor → Color?
-
Overrides the default value of AppBar.surfaceTintColor.
final
- systemOverlayStyle → SystemUiOverlayStyle?
-
Overrides the default value of AppBar.systemOverlayStyle.
final
- titleSpacing → double?
-
Overrides the default value of AppBar.titleSpacing.
final
- titleTextStyle → TextStyle?
-
Overrides the default value of AppBar.titleTextStyle.
final
- toolbarHeight → double?
-
Overrides the default value of AppBar.toolbarHeight.
final
- toolbarTextStyle → TextStyle?
-
Overrides the default value of AppBar.toolbarTextStyle.
final
Methods
-
copyWith(
{Color? backgroundColor, Color? foregroundColor, Color? color, double? elevation, double? scrolledUnderElevation, Color? shadowColor, Color? surfaceTintColor, ShapeBorder? shape, IconThemeData? iconTheme, IconThemeData? actionsIconTheme, bool? centerTitle, double? titleSpacing, double? leadingWidth, double? toolbarHeight, TextStyle? toolbarTextStyle, TextStyle? titleTextStyle, SystemUiOverlayStyle? systemOverlayStyle, EdgeInsetsGeometry? actionsPadding}) → AppBarThemeData - Creates a copy of this object but 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(
AppBarThemeData a, AppBarThemeData b, double t) → AppBarThemeData - Linearly interpolate between two app bar themes.