pub struct DialogThemeData {Show 14 fields
pub background_color: Option<Color>,
pub elevation: Option<f64>,
pub shadow_color: Option<Color>,
pub surface_tint_color: Option<Color>,
pub shape: Option<ShapeBorderRef>,
pub alignment: Option<AlignmentGeometry>,
pub title_text_style: Option<TextStyle>,
pub content_text_style: Option<TextStyle>,
pub actions_padding: Option<EdgeInsetsGeometry>,
pub icon_color: Option<Color>,
pub barrier_color: Option<Color>,
pub inset_padding: Option<EdgeInsets>,
pub clip_behavior: Option<Clip>,
pub constraints: Option<BoxConstraints>,
}Expand description
Defines default property values for descendant Dialog widgets.
Descendant widgets obtain the current DialogThemeData object using
DialogTheme::of. Instances of DialogThemeData can be
customized with DialogThemeData::copy_with.
Typically a DialogThemeData is specified as part of the overall Theme
with ThemeData::dialog_theme.
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 thisDialogTheme.AlertDialog, a dialog that can be customized using thisDialogTheme.SimpleDialog, a dialog that can be customized using thisDialogTheme.ThemeData, which describes the overall theme information for the application.
Fields§
§background_color: Option<Color>Overrides the default value for Dialog::background_color.
elevation: Option<f64>Overrides the default value for Dialog::elevation.
shadow_color: Option<Color>Overrides the default value for Dialog::shadow_color.
surface_tint_color: Option<Color>Overrides the default value for Dialog::surface_tint_color.
shape: Option<ShapeBorderRef>Overrides the default value for Dialog::shape.
alignment: Option<AlignmentGeometry>Overrides the default value for Dialog::alignment.
title_text_style: Option<TextStyle>Overrides the default value for DefaultTextStyle for SimpleDialog::title and
AlertDialog::title.
content_text_style: Option<TextStyle>Overrides the default value for DefaultTextStyle for SimpleDialog::children and
AlertDialog::content.
actions_padding: Option<EdgeInsetsGeometry>Overrides the default value for AlertDialog::actions_padding.
icon_color: Option<Color>Used to configure the IconTheme for the AlertDialog::icon widget.
barrier_color: Option<Color>Overrides the default value for barrier_color in ShowDialog.
inset_padding: Option<EdgeInsets>Overrides the default value for Dialog::inset_padding.
clip_behavior: Option<Clip>Overrides the default value of Dialog::clip_behavior.
constraints: Option<BoxConstraints>Constrains the size of the Dialog.
If null, the bottom sheet’s size will be unconstrained.
Implementations§
Source§impl DialogThemeData
impl DialogThemeData
Sourcepub fn new() -> DialogThemeData
pub fn new() -> DialogThemeData
Creates a dialog theme that can be used for ThemeData::dialog_theme.
Sourcepub fn background_color(self, background_color: Color) -> DialogThemeData
pub fn background_color(self, background_color: Color) -> DialogThemeData
Dart DialogThemeData(backgroundColor:).
Sourcepub fn elevation(self, elevation: f64) -> DialogThemeData
pub fn elevation(self, elevation: f64) -> DialogThemeData
Dart DialogThemeData(elevation:).
Sourcepub fn shadow_color(self, shadow_color: Color) -> DialogThemeData
pub fn shadow_color(self, shadow_color: Color) -> DialogThemeData
Dart DialogThemeData(shadowColor:).
Sourcepub fn surface_tint_color(self, surface_tint_color: Color) -> DialogThemeData
pub fn surface_tint_color(self, surface_tint_color: Color) -> DialogThemeData
Dart DialogThemeData(surfaceTintColor:).
Sourcepub fn shape(self, shape: impl Into<ShapeBorderRef>) -> DialogThemeData
pub fn shape(self, shape: impl Into<ShapeBorderRef>) -> DialogThemeData
Dart DialogThemeData(shape:).
Sourcepub fn alignment(self, alignment: AlignmentGeometry) -> DialogThemeData
pub fn alignment(self, alignment: AlignmentGeometry) -> DialogThemeData
Dart DialogThemeData(alignment:).
Sourcepub fn icon_color(self, icon_color: Color) -> DialogThemeData
pub fn icon_color(self, icon_color: Color) -> DialogThemeData
Dart DialogThemeData(iconColor:).
Sourcepub fn title_text_style(self, title_text_style: TextStyle) -> DialogThemeData
pub fn title_text_style(self, title_text_style: TextStyle) -> DialogThemeData
Dart DialogThemeData(titleTextStyle:).
Sourcepub fn content_text_style(
self,
content_text_style: TextStyle,
) -> DialogThemeData
pub fn content_text_style( self, content_text_style: TextStyle, ) -> DialogThemeData
Dart DialogThemeData(contentTextStyle:).
Sourcepub fn actions_padding(
self,
actions_padding: impl Into<EdgeInsetsGeometry>,
) -> DialogThemeData
pub fn actions_padding( self, actions_padding: impl Into<EdgeInsetsGeometry>, ) -> DialogThemeData
Dart DialogThemeData(actionsPadding:).
Sourcepub fn barrier_color(self, barrier_color: Color) -> DialogThemeData
pub fn barrier_color(self, barrier_color: Color) -> DialogThemeData
Dart DialogThemeData(barrierColor:).
Sourcepub fn inset_padding(self, inset_padding: EdgeInsets) -> DialogThemeData
pub fn inset_padding(self, inset_padding: EdgeInsets) -> DialogThemeData
Dart DialogThemeData(insetPadding:).
Sourcepub fn clip_behavior(self, clip_behavior: Clip) -> DialogThemeData
pub fn clip_behavior(self, clip_behavior: Clip) -> DialogThemeData
Dart DialogThemeData(clipBehavior:).
Sourcepub fn constraints(self, constraints: BoxConstraints) -> DialogThemeData
pub fn constraints(self, constraints: BoxConstraints) -> DialogThemeData
Dart DialogThemeData(constraints:).
Sourcepub fn copy_with(&self) -> DialogThemeData
pub fn copy_with(&self) -> DialogThemeData
Creates a copy of this object but with the given fields replaced with the new values.
Dart’s named arguments are the fluent setters on the copy
(data.copy_with().elevation(2.0)).
Sourcepub fn lerp(
a: Option<&DialogThemeData>,
b: Option<&DialogThemeData>,
t: f64,
) -> DialogThemeData
pub fn lerp( a: Option<&DialogThemeData>, b: Option<&DialogThemeData>, t: f64, ) -> DialogThemeData
Linearly interpolate between two dialog themes.
{@macro dart.ui.shadow.lerp}
Trait Implementations§
Source§impl Clone for DialogThemeData
impl Clone for DialogThemeData
Source§impl Debug for DialogThemeData
impl Debug for DialogThemeData
Source§impl Default for DialogThemeData
impl Default for DialogThemeData
Source§impl Diagnosticable for DialogThemeData
impl Diagnosticable for DialogThemeData
Source§fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
Source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
Object.runtimeType as diagnostics print it: the last segment of
the Rust type path, without generic arguments.Source§fn identity_hash(&self) -> u64
fn identity_hash(&self) -> u64
Object.hashCode as diagnostics print it: the object’s address.Source§fn to_string_short(&self) -> String
fn to_string_short(&self) -> String
Source§fn to_diagnostics_node(&self) -> DiagnosticableNode
fn to_diagnostics_node(&self) -> DiagnosticableNode
DiagnosticsNode::to_string_deep.Source§fn to_diagnostics_node_with(
&self,
name: Option<String>,
style: Option<DiagnosticsTreeStyle>,
) -> DiagnosticableNode
fn to_diagnostics_node_with( &self, name: Option<String>, style: Option<DiagnosticsTreeStyle>, ) -> DiagnosticableNode
toDiagnosticsNode(name:, style:).Source§fn to_string(&self) -> String
fn to_string(&self) -> String
toString: a single-line description with properties and no
children. Read moreSource§fn to_string_at(&self, min_level: DiagnosticLevel) -> String
fn to_string_at(&self, min_level: DiagnosticLevel) -> String
toString(minLevel:).Source§impl DialogThemeDataGetters for DialogThemeData
impl DialogThemeDataGetters for DialogThemeData
Source§fn dialog_theme_data(&self) -> &DialogThemeData
fn dialog_theme_data(&self) -> &DialogThemeData
super(...)
arguments a defaults struct keeps.Source§fn surface_tint_color(&self, app: &mut App) -> Option<Color>
fn surface_tint_color(&self, app: &mut App) -> Option<Color>
surface_tint_color getter.Source§fn title_text_style(&self, app: &mut App) -> Option<TextStyle>
fn title_text_style(&self, app: &mut App) -> Option<TextStyle>
title_text_style getter.Source§fn content_text_style(&self, app: &mut App) -> Option<TextStyle>
fn content_text_style(&self, app: &mut App) -> Option<TextStyle>
content_text_style getter.Source§fn actions_padding(&self, app: &mut App) -> Option<EdgeInsetsGeometry>
fn actions_padding(&self, app: &mut App) -> Option<EdgeInsetsGeometry>
actions_padding getter.Source§fn inset_padding(&self, app: &mut App) -> Option<EdgeInsets>
fn inset_padding(&self, app: &mut App) -> Option<EdgeInsets>
inset_padding getter.Source§fn constraints(&self, app: &mut App) -> Option<BoxConstraints>
fn constraints(&self, app: &mut App) -> Option<BoxConstraints>
constraints getter.Source§fn copy_with(&self, app: &mut App) -> DialogThemeData
fn copy_with(&self, app: &mut App) -> DialogThemeData
copyWith() with no arguments: a plain value holding what every getter
answers, for the caller’s setters to change.