pub struct MaterialBannerThemeData {
pub background_color: Option<Color>,
pub surface_tint_color: Option<Color>,
pub shadow_color: Option<Color>,
pub divider_color: Option<Color>,
pub content_text_style: Option<TextStyle>,
pub elevation: Option<f64>,
pub padding: Option<EdgeInsetsGeometry>,
pub leading_padding: Option<EdgeInsetsGeometry>,
}Expand description
Defines the visual properties of MaterialBanner widgets.
Descendant widgets obtain the current MaterialBannerThemeData object using
MaterialBannerTheme::of. Instances of MaterialBannerThemeData
can be customized with MaterialBannerThemeData::copy_with.
Typically a MaterialBannerThemeData is specified as part of the overall
Theme with ThemeData::banner_theme.
All MaterialBannerThemeData properties are null by default. When null,
the MaterialBanner will provide its own defaults.
See also:
ThemeData, which describes the overall theme information for the application.
Fields§
§background_color: Option<Color>The background color of a MaterialBanner.
surface_tint_color: Option<Color>Overrides the default value of MaterialBanner::surface_tint_color.
shadow_color: Option<Color>Overrides the default value of MaterialBanner::shadow_color.
divider_color: Option<Color>Overrides the default value of MaterialBanner::divider_color.
content_text_style: Option<TextStyle>Used to configure the DefaultTextStyle for the MaterialBanner::content
widget.
elevation: Option<f64>Default value for MaterialBanner::elevation.
If null, MaterialBanner uses a default of 0.0.
padding: Option<EdgeInsetsGeometry>The amount of space by which to inset MaterialBanner::content.
leading_padding: Option<EdgeInsetsGeometry>The amount of space by which to inset MaterialBanner::leading.
Implementations§
Source§impl MaterialBannerThemeData
impl MaterialBannerThemeData
Sourcepub fn new() -> MaterialBannerThemeData
pub fn new() -> MaterialBannerThemeData
Creates a theme that can be used for MaterialBannerTheme or
ThemeData::banner_theme; Dart’s optional named arguments are the fluent setters.
Sourcepub fn background_color(
self,
background_color: Color,
) -> MaterialBannerThemeData
pub fn background_color( self, background_color: Color, ) -> MaterialBannerThemeData
Dart MaterialBannerThemeData(backgroundColor:).
Sourcepub fn surface_tint_color(
self,
surface_tint_color: Color,
) -> MaterialBannerThemeData
pub fn surface_tint_color( self, surface_tint_color: Color, ) -> MaterialBannerThemeData
Dart MaterialBannerThemeData(surfaceTintColor:).
Sourcepub fn shadow_color(self, shadow_color: Color) -> MaterialBannerThemeData
pub fn shadow_color(self, shadow_color: Color) -> MaterialBannerThemeData
Dart MaterialBannerThemeData(shadowColor:).
Sourcepub fn divider_color(self, divider_color: Color) -> MaterialBannerThemeData
pub fn divider_color(self, divider_color: Color) -> MaterialBannerThemeData
Dart MaterialBannerThemeData(dividerColor:).
Sourcepub fn content_text_style(
self,
content_text_style: TextStyle,
) -> MaterialBannerThemeData
pub fn content_text_style( self, content_text_style: TextStyle, ) -> MaterialBannerThemeData
Dart MaterialBannerThemeData(contentTextStyle:).
Sourcepub fn elevation(self, elevation: f64) -> MaterialBannerThemeData
pub fn elevation(self, elevation: f64) -> MaterialBannerThemeData
Dart MaterialBannerThemeData(elevation:).
Sourcepub fn padding(
self,
padding: impl Into<EdgeInsetsGeometry>,
) -> MaterialBannerThemeData
pub fn padding( self, padding: impl Into<EdgeInsetsGeometry>, ) -> MaterialBannerThemeData
Dart MaterialBannerThemeData(padding:).
Sourcepub fn leading_padding(
self,
leading_padding: impl Into<EdgeInsetsGeometry>,
) -> MaterialBannerThemeData
pub fn leading_padding( self, leading_padding: impl Into<EdgeInsetsGeometry>, ) -> MaterialBannerThemeData
Dart MaterialBannerThemeData(leadingPadding:).
Sourcepub fn copy_with(&self) -> MaterialBannerThemeData
pub fn copy_with(&self) -> MaterialBannerThemeData
Creates a copy of this object 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<&MaterialBannerThemeData>,
b: Option<&MaterialBannerThemeData>,
t: f64,
) -> MaterialBannerThemeData
pub fn lerp( a: Option<&MaterialBannerThemeData>, b: Option<&MaterialBannerThemeData>, t: f64, ) -> MaterialBannerThemeData
Linearly interpolate between two Banner themes.
{@macro dart.ui.shadow.lerp}
Trait Implementations§
Source§impl Clone for MaterialBannerThemeData
impl Clone for MaterialBannerThemeData
Source§impl Debug for MaterialBannerThemeData
impl Debug for MaterialBannerThemeData
Source§impl Default for MaterialBannerThemeData
impl Default for MaterialBannerThemeData
Source§impl Diagnosticable for MaterialBannerThemeData
impl Diagnosticable for MaterialBannerThemeData
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 Display for MaterialBannerThemeData
impl Display for MaterialBannerThemeData
Source§impl MaterialBannerThemeDataGetters for MaterialBannerThemeData
impl MaterialBannerThemeDataGetters for MaterialBannerThemeData
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 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 leading_padding(&self, app: &mut App) -> Option<EdgeInsetsGeometry>
fn leading_padding(&self, app: &mut App) -> Option<EdgeInsetsGeometry>
leading_padding getter.Source§fn copy_with(&self, app: &mut App) -> MaterialBannerThemeData
fn copy_with(&self, app: &mut App) -> MaterialBannerThemeData
copyWith() with no arguments: a plain value holding what every getter
answers, for the caller’s setters to change.