DialogThemeData class
Defines default property values for descendant Dialog widgets.
Descendant widgets obtain the current DialogThemeData object using
CardTheme.of(context).data
. Instances of DialogThemeData can be
customized with DialogThemeData.copyWith.
Typically a DialogThemeData is specified as part of the overall Theme with ThemeData.dialogTheme.
All DialogThemeData properties are null
by default. When null, the Dialog
will use the values from ThemeData if they exist, otherwise it will
provide its own defaults. See the individual Dialog properties for details.
See also:
- Dialog, a dialog that can be customized using this DialogTheme.
- AlertDialog, a dialog that can be customized using this DialogTheme.
- SimpleDialog, a dialog that can be customized using this DialogTheme.
- ThemeData, which describes the overall theme information for the application.
- Mixed-in types
- Annotations
Constructors
- DialogThemeData({Color? backgroundColor, double? elevation, Color? shadowColor, Color? surfaceTintColor, ShapeBorder? shape, AlignmentGeometry? alignment, Color? iconColor, TextStyle? titleTextStyle, TextStyle? contentTextStyle, EdgeInsetsGeometry? actionsPadding, Color? barrierColor, EdgeInsets? insetPadding, Clip? clipBehavior})
-
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
- barrierColor → Color?
-
Overrides the default value for barrierColor in showDialog.
final
- clipBehavior → Clip?
-
Overrides the default value of Dialog.clipBehavior.
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.
no setteroverride
- iconColor → Color?
-
Used to configure the IconTheme for the AlertDialog.icon widget.
final
- insetPadding → EdgeInsets?
-
Overrides the default value for Dialog.insetPadding.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shadowColor → Color?
-
Overrides the default value for Dialog.shadowColor.
final
- shape → ShapeBorder?
-
Overrides the default value for Dialog.shape.
final
- surfaceTintColor → Color?
-
Overrides the default value for Dialog.surfaceTintColor.
final
- titleTextStyle → TextStyle?
-
Overrides the default value for DefaultTextStyle for SimpleDialog.title and
AlertDialog.title.
final
Methods
-
copyWith(
{Color? backgroundColor, double? elevation, Color? shadowColor, Color? surfaceTintColor, ShapeBorder? shape, AlignmentGeometry? alignment, Color? iconColor, TextStyle? titleTextStyle, TextStyle? contentTextStyle, EdgeInsetsGeometry? actionsPadding, Color? barrierColor, EdgeInsets? insetPadding, Clip? clipBehavior}) → DialogThemeData - 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(
DialogThemeData? a, DialogThemeData? b, double t) → DialogThemeData - Linearly interpolate between two DialogThemeData.