DialogTheme class Null safety

Defines a theme for Dialog widgets.

Descendant widgets obtain the current DialogTheme object using DialogTheme.of(context). Instances of DialogTheme can be customized with DialogTheme.copyWith.

titleTextStyle and contentTextStyle are used in AlertDialogs and SimpleDialogs.

See also:

Mixed in types
Annotations

Constructors

DialogTheme({Color? backgroundColor, double? elevation, ShapeBorder? shape, AlignmentGeometry? alignment, Color? iconColor, TextStyle? titleTextStyle, TextStyle? contentTextStyle, EdgeInsetsGeometry? actionsPadding})
Creates a dialog theme that can be used for ThemeData.dialogTheme.
const

Properties

actionsPadding EdgeInsetsGeometry?
Overrides the default value for AlertDialog.actionsPadding.
final
alignment AlignmentGeometry?
Overrides the default value for Dialog.alignment.
final
backgroundColor Color?
Overrides the default value for Dialog.backgroundColor.
final
contentTextStyle TextStyle?
Overrides the default value for DefaultTextStyle for SimpleDialog.children and AlertDialog.content.
final
elevation double?
Overrides the default value for Dialog.elevation.
final
hashCode int
The hash code for this object.
read-onlyoverride
iconColor Color?
Used to configure the IconTheme for the AlertDialog.icon widget.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
shape ShapeBorder?
Overrides the default value for Dialog.shape.
final
titleTextStyle TextStyle?
Overrides the default value for DefaultTextStyle for SimpleDialog.title and AlertDialog.title.
final

Methods

copyWith({Color? backgroundColor, double? elevation, ShapeBorder? shape, AlignmentGeometry? alignment, Color? iconColor, TextStyle? titleTextStyle, TextStyle? contentTextStyle, EdgeInsetsGeometry? actionsPadding}) DialogTheme
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 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(DialogTheme? a, DialogTheme? b, double t) DialogTheme
Linearly interpolate between two dialog themes.
of(BuildContext context) DialogTheme
The data from the closest DialogTheme instance given the build context.