pub struct BottomSheetThemeData {Show 13 fields
pub background_color: Option<Color>,
pub surface_tint_color: Option<Color>,
pub elevation: Option<f64>,
pub modal_background_color: Option<Color>,
pub modal_barrier_color: Option<Color>,
pub shadow_color: Option<Color>,
pub modal_elevation: Option<f64>,
pub shape: Option<ShapeBorderRef>,
pub show_drag_handle: Option<bool>,
pub drag_handle_color: Option<AnyColor>,
pub drag_handle_size: Option<Size>,
pub clip_behavior: Option<Clip>,
pub constraints: Option<BoxConstraints>,
}Expand description
Defines default property values for BottomSheet’s Material.
Descendant widgets obtain the current BottomSheetThemeData object
using Theme::of(app, context).bottom_sheet_theme. Instances of
BottomSheetThemeData can be customized with
BottomSheetThemeData::copy_with.
Typically a BottomSheetThemeData is specified as part of the
overall Theme with ThemeData::bottom_sheet_theme.
All BottomSheetThemeData properties are null by default.
When null, the BottomSheet 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 BottomSheet::background_color.
If null, BottomSheet defaults to Material’s default.
surface_tint_color: Option<Color>Overrides the default value for surfaceTintColor.
If null, BottomSheet will not display an overlay color.
See Material::surface_tint_color for more details.
elevation: Option<f64>Overrides the default value for BottomSheet::elevation.
{@macro material_ui.material.elevation}
If null, BottomSheet defaults to 0.0.
modal_background_color: Option<Color>Value for BottomSheet::background_color when the Bottom sheet is presented
as a modal bottom sheet.
modal_barrier_color: Option<Color>Overrides the default value for barrier color when the Bottom sheet is presented as a modal bottom sheet.
shadow_color: Option<Color>Overrides the default value for BottomSheet::shadow_color.
modal_elevation: Option<f64>Value for BottomSheet::elevation when the Bottom sheet is presented as a
modal bottom sheet.
shape: Option<ShapeBorderRef>Overrides the default value for BottomSheet::shape.
If null, no overriding shape is specified for BottomSheet, so the
BottomSheet is rectangular.
show_drag_handle: Option<bool>Overrides the default value for BottomSheet::show_drag_handle.
drag_handle_color: Option<AnyColor>Overrides the default value for BottomSheet::drag_handle_color.
drag_handle_size: Option<Size>Overrides the default value for BottomSheet::drag_handle_size.
clip_behavior: Option<Clip>Overrides the default value for BottomSheet::clip_behavior.
If null, BottomSheet uses Clip::None.
constraints: Option<BoxConstraints>Constrains the size of the BottomSheet.
If null, the bottom sheet’s size will be unconstrained.
Implementations§
Source§impl BottomSheetThemeData
impl BottomSheetThemeData
Sourcepub fn new() -> BottomSheetThemeData
pub fn new() -> BottomSheetThemeData
Creates a theme that can be used for ThemeData::bottom_sheet_theme; Dart’s optional
named arguments are the fluent setters.
Sourcepub fn background_color(self, background_color: Color) -> BottomSheetThemeData
pub fn background_color(self, background_color: Color) -> BottomSheetThemeData
Dart BottomSheetThemeData(backgroundColor:).
Sourcepub fn surface_tint_color(
self,
surface_tint_color: Color,
) -> BottomSheetThemeData
pub fn surface_tint_color( self, surface_tint_color: Color, ) -> BottomSheetThemeData
Dart BottomSheetThemeData(surfaceTintColor:).
Sourcepub fn elevation(self, elevation: f64) -> BottomSheetThemeData
pub fn elevation(self, elevation: f64) -> BottomSheetThemeData
Dart BottomSheetThemeData(elevation:).
Sourcepub fn modal_background_color(
self,
modal_background_color: Color,
) -> BottomSheetThemeData
pub fn modal_background_color( self, modal_background_color: Color, ) -> BottomSheetThemeData
Dart BottomSheetThemeData(modalBackgroundColor:).
Sourcepub fn modal_barrier_color(
self,
modal_barrier_color: Color,
) -> BottomSheetThemeData
pub fn modal_barrier_color( self, modal_barrier_color: Color, ) -> BottomSheetThemeData
Dart BottomSheetThemeData(modalBarrierColor:).
Sourcepub fn shadow_color(self, shadow_color: Color) -> BottomSheetThemeData
pub fn shadow_color(self, shadow_color: Color) -> BottomSheetThemeData
Dart BottomSheetThemeData(shadowColor:).
Sourcepub fn modal_elevation(self, modal_elevation: f64) -> BottomSheetThemeData
pub fn modal_elevation(self, modal_elevation: f64) -> BottomSheetThemeData
Dart BottomSheetThemeData(modalElevation:).
Sourcepub fn shape(self, shape: impl Into<ShapeBorderRef>) -> BottomSheetThemeData
pub fn shape(self, shape: impl Into<ShapeBorderRef>) -> BottomSheetThemeData
Dart BottomSheetThemeData(shape:).
Sourcepub fn show_drag_handle(self, show_drag_handle: bool) -> BottomSheetThemeData
pub fn show_drag_handle(self, show_drag_handle: bool) -> BottomSheetThemeData
Dart BottomSheetThemeData(showDragHandle:).
Sourcepub fn drag_handle_color(
self,
drag_handle_color: impl Into<AnyColor>,
) -> BottomSheetThemeData
pub fn drag_handle_color( self, drag_handle_color: impl Into<AnyColor>, ) -> BottomSheetThemeData
Dart BottomSheetThemeData(dragHandleColor:).
Sourcepub fn drag_handle_size(self, drag_handle_size: Size) -> BottomSheetThemeData
pub fn drag_handle_size(self, drag_handle_size: Size) -> BottomSheetThemeData
Dart BottomSheetThemeData(dragHandleSize:).
Sourcepub fn clip_behavior(self, clip_behavior: Clip) -> BottomSheetThemeData
pub fn clip_behavior(self, clip_behavior: Clip) -> BottomSheetThemeData
Dart BottomSheetThemeData(clipBehavior:).
Sourcepub fn constraints(self, constraints: BoxConstraints) -> BottomSheetThemeData
pub fn constraints(self, constraints: BoxConstraints) -> BottomSheetThemeData
Dart BottomSheetThemeData(constraints:).
Sourcepub fn copy_with(&self) -> BottomSheetThemeData
pub fn copy_with(&self) -> BottomSheetThemeData
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(4.0)).
Sourcepub fn lerp(
a: Option<&BottomSheetThemeData>,
b: Option<&BottomSheetThemeData>,
t: f64,
) -> Option<BottomSheetThemeData>
pub fn lerp( a: Option<&BottomSheetThemeData>, b: Option<&BottomSheetThemeData>, t: f64, ) -> Option<BottomSheetThemeData>
Linearly interpolate between two bottom sheet themes.
If both arguments are null then null is returned.
{@macro dart.ui.shadow.lerp}
Trait Implementations§
Source§impl BottomSheetThemeDataGetters for BottomSheetThemeData
impl BottomSheetThemeDataGetters for BottomSheetThemeData
Source§fn bottom_sheet_theme_data(&self) -> &BottomSheetThemeData
fn bottom_sheet_theme_data(&self) -> &BottomSheetThemeData
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 modal_background_color(&self, app: &mut App) -> Option<Color>
fn modal_background_color(&self, app: &mut App) -> Option<Color>
modal_background_color getter.Source§fn modal_barrier_color(&self, app: &mut App) -> Option<Color>
fn modal_barrier_color(&self, app: &mut App) -> Option<Color>
modal_barrier_color getter.Source§fn drag_handle_color(&self, app: &mut App) -> Option<AnyColor>
fn drag_handle_color(&self, app: &mut App) -> Option<AnyColor>
drag_handle_color 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) -> BottomSheetThemeData
fn copy_with(&self, app: &mut App) -> BottomSheetThemeData
copyWith() with no arguments: a plain value holding what every getter
answers, for the caller’s setters to change.Source§impl Clone for BottomSheetThemeData
impl Clone for BottomSheetThemeData
Source§impl Debug for BottomSheetThemeData
impl Debug for BottomSheetThemeData
Source§impl Default for BottomSheetThemeData
impl Default for BottomSheetThemeData
Source§impl Diagnosticable for BottomSheetThemeData
impl Diagnosticable for BottomSheetThemeData
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:).