ExpansionTileThemeData class Null safety
Used with ExpansionTileTheme to define default property values for descendant ExpansionTile widgets.
Descendant widgets obtain the current ExpansionTileThemeData object
using ExpansionTileTheme.of(context)
. Instances of
ExpansionTileThemeData can be customized with
ExpansionTileThemeData.copyWith.
A ExpansionTileThemeData is often specified as part of the overall Theme with ThemeData.expansionTileTheme.
All ExpansionTileThemeData properties are null
by default.
When a theme property is null, the ExpansionTile will provide its own
default based on the overall Theme's textTheme and
colorScheme. See the individual ExpansionTile properties for details.
See also:
- ThemeData, which describes the overall theme information for the application.
- ExpansionTileTheme which overrides the default ExpansionTileTheme of its ExpansionTile descendants.
- ThemeData.textTheme, text with a color that contrasts with the card and canvas colors.
- ThemeData.colorScheme, the thirteen colors that most Material widget default colors are based on.
- Mixed in types
- Annotations
Constructors
- ExpansionTileThemeData({Color? backgroundColor, Color? collapsedBackgroundColor, EdgeInsetsGeometry? tilePadding, AlignmentGeometry? expandedAlignment, EdgeInsetsGeometry? childrenPadding, Color? iconColor, Color? collapsedIconColor, Color? textColor, Color? collapsedTextColor})
-
Creates a ExpansionTileThemeData.
const
Properties
- backgroundColor → Color?
-
Overrides the default value of ExpansionTile.backgroundColor.
final
- childrenPadding → EdgeInsetsGeometry?
-
Overrides the default value of ExpansionTile.childrenPadding.
final
- collapsedBackgroundColor → Color?
-
Overrides the default value of ExpansionTile.collapsedBackgroundColor.
final
- collapsedIconColor → Color?
-
Overrides the default value of ExpansionTile.collapsedIconColor.
final
- collapsedTextColor → Color?
-
Overrides the default value of ExpansionTile.collapsedTextColor.
final
- expandedAlignment → AlignmentGeometry?
-
Overrides the default value of ExpansionTile.expandedAlignment.
final
- hashCode → int
-
The hash code for this object.
read-onlyoverride
- iconColor → Color?
-
Overrides the default value of ExpansionTile.iconColor.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- textColor → Color?
-
Overrides the default value of ExpansionTile.textColor.
final
- tilePadding → EdgeInsetsGeometry?
-
Overrides the default value of ExpansionTile.tilePadding.
final
Methods
-
copyWith(
{Color? backgroundColor, Color? collapsedBackgroundColor, EdgeInsetsGeometry? tilePadding, AlignmentGeometry? expandedAlignment, EdgeInsetsGeometry? childrenPadding, Color? iconColor, Color? collapsedIconColor, Color? textColor, Color? collapsedTextColor}) → ExpansionTileThemeData - 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(
ExpansionTileThemeData? a, ExpansionTileThemeData? b, double t) → ExpansionTileThemeData? - Linearly interpolate between ExpansionTileThemeData objects.