DialogTheme class
Defines a theme for Dialog widgets.
Descendant widgets obtain the current DialogThemeData object using DialogTheme.of. Instances of DialogTheme can be customized with DialogTheme.copyWith.
titleTextStyle and contentTextStyle are used in AlertDialogs and SimpleDialogs.
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.
- Inheritance
- Mixed-in types
- Annotations
Constructors
- DialogTheme.new({Key? key, 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? data, Widget? child})
-
Creates a dialog theme that can be used for ThemeData.dialogTheme.
const
Properties
- actionsPadding → EdgeInsetsGeometry?
-
Overrides the default value for AlertDialog.actionsPadding.
no setter
- alignment → AlignmentGeometry?
-
Overrides the default value for Dialog.alignment.
no setter
- backgroundColor → Color?
-
Overrides the default value for Dialog.backgroundColor.
no setter
- barrierColor → Color?
-
Overrides the default value for barrierColor in showDialog.
no setter
- child → Widget
-
The widget below this widget in the tree.
finalinherited
- clipBehavior → Clip?
-
Overrides the default value of Dialog.clipBehavior.
no setter
- contentTextStyle → TextStyle?
-
Overrides the default value for DefaultTextStyle for SimpleDialog.children and
AlertDialog.content.
no setter
- data → DialogThemeData
-
The properties used for all descendant Dialog widgets.
no setter
- elevation → double?
-
Overrides the default value for Dialog.elevation.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- iconColor → Color?
-
Used to configure the IconTheme for the AlertDialog.icon widget.
no setter
- insetPadding → EdgeInsets?
-
Overrides the default value for Dialog.insetPadding.
no setter
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shadowColor → Color?
-
Overrides the default value for Dialog.shadowColor.
no setter
- shape → ShapeBorder?
-
Overrides the default value for Dialog.shape.
no setter
- surfaceTintColor → Color?
-
Overrides the default value for Dialog.surfaceTintColor.
no setter
- titleTextStyle → TextStyle?
-
Overrides the default value for DefaultTextStyle for SimpleDialog.title and
AlertDialog.title.
no setter
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}) → DialogTheme - Creates a copy of this object but 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.
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
-
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 DialogTheme 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(
DialogTheme? a, DialogTheme? b, double t) → DialogTheme - Linearly interpolate between two dialog themes.
-
of(
BuildContext context) → DialogThemeData - The ThemeData.dialogTheme property of the ambient Theme.