pub struct BadgeThemeData {
pub background_color: Option<Color>,
pub text_color: Option<Color>,
pub small_size: Option<f64>,
pub large_size: Option<f64>,
pub text_style: Option<TextStyle>,
pub padding: Option<EdgeInsetsGeometry>,
pub alignment: Option<AlignmentGeometry>,
pub offset: Option<Offset>,
}Expand description
Overrides the default properties values for descendant Badge widgets.
Descendant widgets obtain the current BadgeThemeData object
using BadgeTheme::of. Instances of BadgeThemeData can
be customized with BadgeThemeData::copy_with.
Typically a BadgeThemeData is specified as part of the
overall Theme with ThemeData::badge_theme.
All BadgeThemeData properties are null by default.
When null, the Badge will use the values from ThemeData
if they exist, otherwise it will provide its own defaults.
See also:
ThemeData, which describes the overall theme information for the application.
Fields§
§background_color: Option<Color>Overrides the default value for Badge::background_color.
text_color: Option<Color>Overrides the default value for Badge::text_color.
small_size: Option<f64>Overrides the default value for Badge::small_size.
large_size: Option<f64>Overrides the default value for Badge::large_size.
text_style: Option<TextStyle>Overrides the default value for Badge::text_style.
padding: Option<EdgeInsetsGeometry>Overrides the default value for Badge::padding.
alignment: Option<AlignmentGeometry>Overrides the default value for Badge::alignment.
offset: Option<Offset>Overrides the default value for Badge::offset.
Implementations§
Source§impl BadgeThemeData
impl BadgeThemeData
Sourcepub fn new() -> BadgeThemeData
pub fn new() -> BadgeThemeData
Creates the set of color, style, and size properties used to configure
Badge; Dart’s optional named arguments are the fluent setters.
Sourcepub fn background_color(self, background_color: Color) -> BadgeThemeData
pub fn background_color(self, background_color: Color) -> BadgeThemeData
Dart BadgeThemeData(backgroundColor:).
Sourcepub fn text_color(self, text_color: Color) -> BadgeThemeData
pub fn text_color(self, text_color: Color) -> BadgeThemeData
Dart BadgeThemeData(textColor:).
Sourcepub fn small_size(self, small_size: f64) -> BadgeThemeData
pub fn small_size(self, small_size: f64) -> BadgeThemeData
Dart BadgeThemeData(smallSize:).
Sourcepub fn large_size(self, large_size: f64) -> BadgeThemeData
pub fn large_size(self, large_size: f64) -> BadgeThemeData
Dart BadgeThemeData(largeSize:).
Sourcepub fn text_style(self, text_style: TextStyle) -> BadgeThemeData
pub fn text_style(self, text_style: TextStyle) -> BadgeThemeData
Dart BadgeThemeData(textStyle:).
Sourcepub fn padding(self, padding: impl Into<EdgeInsetsGeometry>) -> BadgeThemeData
pub fn padding(self, padding: impl Into<EdgeInsetsGeometry>) -> BadgeThemeData
Dart BadgeThemeData(padding:).
Sourcepub fn alignment(self, alignment: AlignmentGeometry) -> BadgeThemeData
pub fn alignment(self, alignment: AlignmentGeometry) -> BadgeThemeData
Dart BadgeThemeData(alignment:).
Sourcepub fn offset(self, offset: Offset) -> BadgeThemeData
pub fn offset(self, offset: Offset) -> BadgeThemeData
Dart BadgeThemeData(offset:).
Sourcepub fn copy_with(&self) -> BadgeThemeData
pub fn copy_with(&self) -> BadgeThemeData
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().small_size(4.0)).
Sourcepub fn lerp(
a: Option<&BadgeThemeData>,
b: Option<&BadgeThemeData>,
t: f64,
) -> BadgeThemeData
pub fn lerp( a: Option<&BadgeThemeData>, b: Option<&BadgeThemeData>, t: f64, ) -> BadgeThemeData
Linearly interpolate between two Badge themes.
{@macro dart.ui.shadow.lerp}
Trait Implementations§
Source§impl BadgeThemeDataGetters for BadgeThemeData
impl BadgeThemeDataGetters for BadgeThemeData
Source§fn badge_theme_data(&self) -> &BadgeThemeData
fn badge_theme_data(&self) -> &BadgeThemeData
super(...)
arguments a defaults struct keeps.Source§fn copy_with(&self, app: &mut App) -> BadgeThemeData
fn copy_with(&self, app: &mut App) -> BadgeThemeData
copyWith() with no arguments: a plain value holding what every getter
answers, for the caller’s setters to change.Source§impl Clone for BadgeThemeData
impl Clone for BadgeThemeData
Source§impl Debug for BadgeThemeData
impl Debug for BadgeThemeData
Source§impl Default for BadgeThemeData
impl Default for BadgeThemeData
Source§impl Diagnosticable for BadgeThemeData
impl Diagnosticable for BadgeThemeData
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:).