AppBarTheme class
Defines default property values for descendant AppBar widgets.
Descendant widgets obtain the current AppBarThemeData object with 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 AppBarTheme properties are null
by default. When null, the
See also:
- ThemeData, which describes the overall theme information for the application.
- Inheritance
- Mixed-in types
- Annotations
Constructors
- AppBarTheme.new({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 for ThemeData.appBarTheme.
const
Properties
- actionsIconTheme → IconThemeData?
-
Overrides the default value of AppBar.actionsIconTheme in all
descendant AppBar widgets.
no setter
- actionsPadding → EdgeInsetsGeometry?
-
Overrides the default value of AppBar.actionsPadding
property in all descendant AppBar widgets.
no setter
- backgroundColor → Color?
-
Overrides the default value of AppBar.backgroundColor in all
descendant AppBar widgets.
no setter
- centerTitle → bool?
-
Overrides the default value of AppBar.centerTitle
property in all descendant AppBar widgets.
no setter
- child → Widget
-
The widget below this widget in the tree.
finalinherited
- data → AppBarThemeData
-
The properties used for all descendant AppBar widgets.
no setter
- elevation → double?
-
Overrides the default value of AppBar.elevation in all
descendant AppBar widgets.
no setter
- foregroundColor → Color?
-
Overrides the default value of AppBar.foregroundColor in all
descendant AppBar widgets.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- iconTheme → IconThemeData?
-
Overrides the default value of AppBar.iconTheme in all
descendant AppBar widgets.
no setter
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leadingWidth → double?
-
Overrides the default value of the AppBar.leadingWidth
property in all descendant AppBar widgets.
no setter
- 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.
no setter
- shadowColor → Color?
-
Overrides the default value of AppBar.shadowColor in all
descendant AppBar widgets.
no setter
- shape → ShapeBorder?
-
Overrides the default value of AppBar.shape in all
descendant AppBar widgets.
no setter
- surfaceTintColor → Color?
-
Overrides the default value of AppBar.surfaceTintColor in all
descendant AppBar widgets.
no setter
- systemOverlayStyle → SystemUiOverlayStyle?
-
Overrides the default value of AppBar.systemOverlayStyle
property in all descendant AppBar widgets.
no setter
- titleSpacing → double?
-
Overrides the default value of the obsolete AppBar.titleSpacing
property in all descendant AppBar widgets.
no setter
- titleTextStyle → TextStyle?
-
Overrides the default value of AppBar.titleTextStyle
property in all descendant AppBar widgets.
no setter
- toolbarHeight → double?
-
Overrides the default value of the AppBar.toolbarHeight
property in all descendant AppBar widgets.
no setter
- toolbarTextStyle → TextStyle?
-
Overrides the default value of the obsolete AppBar.toolbarTextStyle
property in all descendant AppBar 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 the new values.
-
createElement(
) → InheritedElement -
Inflates this configuration to a concrete instance.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
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
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
-
updateShouldNotify(
covariant AppBarTheme oldWidget) → bool -
Whether the framework should notify widgets that inherit from this widget.
override
-
wrap(
BuildContext context, Widget child) → Widget -
Return a copy of this inherited theme with the specified
child
.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
lerp(
AppBarTheme? a, AppBarTheme? b, double t) → AppBarTheme - Linearly interpolate between two AppBar themes.
-
of(
BuildContext context) → AppBarThemeData - Returns the closest AppBarThemeData instance given the build context.