pub struct DrawerThemeData {
pub background_color: Option<Color>,
pub scrim_color: Option<Color>,
pub elevation: Option<f64>,
pub shadow_color: Option<Color>,
pub surface_tint_color: Option<Color>,
pub shape: Option<ShapeBorderRef>,
pub end_shape: Option<ShapeBorderRef>,
pub width: Option<f64>,
pub clip_behavior: Option<Clip>,
}Expand description
Defines default property values for descendant Drawer widgets.
Descendant widgets obtain the current DrawerThemeData object
using DrawerTheme::of. Instances of DrawerThemeData can be
customized with DrawerThemeData::copy_with.
Typically a DrawerThemeData is specified as part of the
overall Theme with ThemeData::drawer_theme.
All DrawerThemeData properties are null by default.
See also:
DrawerTheme, anInheritedWidgetthat propagates the theme down its subtree.ThemeData, which describes the overall theme information for the application and can customize a drawer usingThemeData::drawer_theme.
Fields§
§background_color: Option<Color>Overrides the default value of Drawer::background_color.
scrim_color: Option<Color>Overrides the default value of DrawerController::scrim_color.
elevation: Option<f64>Overrides the default value of Drawer::elevation.
shadow_color: Option<Color>Overrides the default value for Drawer::shadow_color.
surface_tint_color: Option<Color>Overrides the default value for Drawer::surface_tint_color.
shape: Option<ShapeBorderRef>Overrides the default value of Drawer::shape.
end_shape: Option<ShapeBorderRef>Overrides the default value of Drawer::shape for an end drawer.
width: Option<f64>Overrides the default value of Drawer::width.
clip_behavior: Option<Clip>Overrides the default value of Drawer::clip_behavior.
Implementations§
Source§impl DrawerThemeData
impl DrawerThemeData
Sourcepub fn new() -> DrawerThemeData
pub fn new() -> DrawerThemeData
Creates a theme that can be used for ThemeData::drawer_theme and
DrawerTheme; Dart’s optional named arguments are the fluent setters.
Sourcepub fn background_color(self, background_color: Color) -> DrawerThemeData
pub fn background_color(self, background_color: Color) -> DrawerThemeData
Dart DrawerThemeData(backgroundColor:).
Sourcepub fn scrim_color(self, scrim_color: Color) -> DrawerThemeData
pub fn scrim_color(self, scrim_color: Color) -> DrawerThemeData
Dart DrawerThemeData(scrimColor:).
Sourcepub fn elevation(self, elevation: f64) -> DrawerThemeData
pub fn elevation(self, elevation: f64) -> DrawerThemeData
Dart DrawerThemeData(elevation:).
Sourcepub fn shadow_color(self, shadow_color: Color) -> DrawerThemeData
pub fn shadow_color(self, shadow_color: Color) -> DrawerThemeData
Dart DrawerThemeData(shadowColor:).
Sourcepub fn surface_tint_color(self, surface_tint_color: Color) -> DrawerThemeData
pub fn surface_tint_color(self, surface_tint_color: Color) -> DrawerThemeData
Dart DrawerThemeData(surfaceTintColor:).
Sourcepub fn shape(self, shape: impl Into<ShapeBorderRef>) -> DrawerThemeData
pub fn shape(self, shape: impl Into<ShapeBorderRef>) -> DrawerThemeData
Dart DrawerThemeData(shape:).
Sourcepub fn end_shape(self, end_shape: impl Into<ShapeBorderRef>) -> DrawerThemeData
pub fn end_shape(self, end_shape: impl Into<ShapeBorderRef>) -> DrawerThemeData
Dart DrawerThemeData(endShape:).
Sourcepub fn width(self, width: f64) -> DrawerThemeData
pub fn width(self, width: f64) -> DrawerThemeData
Dart DrawerThemeData(width:).
Sourcepub fn clip_behavior(self, clip_behavior: Clip) -> DrawerThemeData
pub fn clip_behavior(self, clip_behavior: Clip) -> DrawerThemeData
Dart DrawerThemeData(clipBehavior:).
Sourcepub fn copy_with(&self) -> DrawerThemeData
pub fn copy_with(&self) -> DrawerThemeData
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().width(300.0)).
Sourcepub fn lerp(
a: Option<&DrawerThemeData>,
b: Option<&DrawerThemeData>,
t: f64,
) -> Option<DrawerThemeData>
pub fn lerp( a: Option<&DrawerThemeData>, b: Option<&DrawerThemeData>, t: f64, ) -> Option<DrawerThemeData>
Linearly interpolate between two drawer themes.
If both arguments are null, then null is returned.
{@macro dart.ui.shadow.lerp}
Trait Implementations§
Source§impl Clone for DrawerThemeData
impl Clone for DrawerThemeData
Source§impl Debug for DrawerThemeData
impl Debug for DrawerThemeData
Source§impl Default for DrawerThemeData
impl Default for DrawerThemeData
Source§impl Diagnosticable for DrawerThemeData
impl Diagnosticable for DrawerThemeData
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 DrawerThemeData
impl Display for DrawerThemeData
Source§impl DrawerThemeDataGetters for DrawerThemeData
impl DrawerThemeDataGetters for DrawerThemeData
Source§fn drawer_theme_data(&self) -> &DrawerThemeData
fn drawer_theme_data(&self) -> &DrawerThemeData
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 copy_with(&self, app: &mut App) -> DrawerThemeData
fn copy_with(&self, app: &mut App) -> DrawerThemeData
copyWith() with no arguments: a plain value holding what every getter
answers, for the caller’s setters to change.