AppBarTheme class
Defines default property values for descendantAppBar widgets.
Descendant widgets obtain the currentAppBarThemeData object withAppBarTheme.of. Instances ofAppBarThemeData can be customizedwithAppBarThemeData.copyWith.
Typically anAppBarThemeData is specified as part of the overallTheme withThemeData.appBarTheme.
AllAppBarTheme properties arenull by default. When null, the
See also:
- ThemeData, which describes the overall theme information for theapplication.
- Inheritance
- Mixed-in types
- Annotations
Constructors
- AppBarTheme({Key?key,@Deprecated('Use backgroundColor instead. ' 'This feature was deprecated after v3.33.0-0.2.pre.')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?leadingWidth,double?toolbarHeight,TextStyle?toolbarTextStyle,TextStyle?titleTextStyle,SystemUiOverlayStyle?systemOverlayStyle,EdgeInsetsGeometry?actionsPadding,AppBarThemeData?data,Widget?child})
- Creates a theme that can be used forThemeData.appBarTheme.const
Properties
- actionsIconTheme→IconThemeData?
- Overrides the default value ofAppBar.actionsIconTheme in alldescendantAppBar widgets.no setter
- actionsPadding→EdgeInsetsGeometry?
- Overrides the default value ofAppBar.actionsPaddingproperty in all descendantAppBar widgets.no setter
- backgroundColor→Color?
- Overrides the default value ofAppBar.backgroundColor in alldescendantAppBar widgets.no setter
- centerTitle→bool?
- Overrides the default value ofAppBar.centerTitleproperty in all descendantAppBar widgets.no setter
- child→Widget
- The widget below this widget in the tree.finalinherited
- data→AppBarThemeData
- The properties used for all descendantAppBar widgets.no setter
- elevation→double?
- Overrides the default value ofAppBar.elevation in alldescendantAppBar widgets.no setter
- foregroundColor→Color?
- Overrides the default value ofAppBar.foregroundColor in alldescendantAppBar widgets.no setter
- hashCode→int
- The hash code for this object.no setterinherited
- iconTheme→IconThemeData?
- Overrides the default value ofAppBar.iconTheme in alldescendantAppBar widgets.no setter
- key→Key?
- Controls how one widget replaces another widget in the tree.finalinherited
- leadingWidth→double?
- Overrides the default value of theAppBar.leadingWidthproperty in all descendantAppBar widgets.no setter
- runtimeType→Type
- A representation of the runtime type of the object.no setterinherited
- scrolledUnderElevation→double?
- Overrides the default value ofAppBar.scrolledUnderElevation in alldescendantAppBar widgets.no setter
- shadowColor→Color?
- Overrides the default value ofAppBar.shadowColor in alldescendantAppBar widgets.no setter
- shape→ShapeBorder?
- Overrides the default value ofAppBar.shape in alldescendantAppBar widgets.no setter
- surfaceTintColor→Color?
- Overrides the default value ofAppBar.surfaceTintColor in alldescendantAppBar widgets.no setter
- systemOverlayStyle→SystemUiOverlayStyle?
- Overrides the default value ofAppBar.systemOverlayStyleproperty in all descendantAppBar widgets.no setter
- titleSpacing→double?
- Overrides the default value of the obsoleteAppBar.titleSpacingproperty in all descendantAppBar widgets.no setter
- titleTextStyle→TextStyle?
- Overrides the default value ofAppBar.titleTextStyleproperty in all descendantAppBar widgets.no setter
- toolbarHeight→double?
- Overrides the default value of theAppBar.toolbarHeightproperty in all descendantAppBar widgets.no setter
- toolbarTextStyle→TextStyle?
- Overrides the default value of the obsoleteAppBar.toolbarTextStyleproperty in all descendantAppBar widgets.no setter
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?leadingWidth,double?toolbarHeight,TextStyle?toolbarTextStyle,TextStyle?titleTextStyle,SystemUiOverlayStyle?systemOverlayStyle,EdgeInsetsGeometry?actionsPadding})→AppBarTheme - Creates a copy of this object with the given fields replaced with thenew values.
- createElement(
)→InheritedElement - Inflates this configuration to a concrete instance.inherited
- debugDescribeChildren(
)→List< DiagnosticsNode> - Returns a list ofDiagnosticsNode objects describing this node'schildren.inherited
- debugFillProperties(
DiagnosticPropertiesBuilderproperties)→ void - Add additional properties associated with the node.inherited
- noSuchMethod(
Invocationinvocation)→ 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 debuggingtools and byDiagnosticsNode.toStringDeep.inherited
- toString(
{DiagnosticLevelminLevel =DiagnosticLevel.info})→String - A string representation of this object.inherited
- toStringDeep(
{StringprefixLineOne ='',String?prefixOtherLines,DiagnosticLevelminLevel =DiagnosticLevel.debug,intwrapWidth =65})→String - Returns a string representation of this node and its descendants.inherited
- toStringShallow(
{Stringjoiner =', ',DiagnosticLevelminLevel =DiagnosticLevel.debug})→String - Returns a one-line detailed description of the object.inherited
- toStringShort(
)→String - A brief description of this object, usually just theruntimeType and thehashCode.inherited
- updateShouldNotify(
covariantAppBarThemeoldWidget)→bool - Whether the framework should notify widgets that inherit from this widget.override
- wrap(
BuildContextcontext,Widgetchild)→Widget - Return a copy of this inherited theme with the specified
child.override
Operators
- operator ==(
Objectother)→bool - The equality operator.inherited
Static Methods
- lerp(
AppBarTheme?a,AppBarTheme?b,doublet)→AppBarTheme - Linearly interpolate between two AppBar themes.
- of(
BuildContextcontext)→AppBarThemeData - Retrieves theAppBarThemeData from the closest ancestorAppBarTheme.