pub struct CarouselViewThemeData {
pub padding: Option<EdgeInsets>,
pub background_color: Option<Color>,
pub elevation: Option<f64>,
pub shape: Option<OutlinedBorderRef>,
pub item_clip_behavior: Option<Clip>,
pub overlay_color: Option<WidgetStatePropertyRef<Option<Color>>>,
}Expand description
Defines default property values for descendant CarouselView
widgets.
Descendant widgets obtain the current CarouselViewThemeData object using
CarouselViewTheme::of. Instances of CarouselViewThemeData can be customized with
CarouselViewThemeData::copy_with.
Typically a CarouselViewThemeData is specified as part of the overall Theme with
ThemeData::carousel_view_theme.
All CarouselViewThemeData properties are None by default. When null, the
CarouselView will use the values from the default values
provided by the carousel.
See also:
CarouselViewTheme, anInheritedWidgetthat propagates the theme down its subtree.ThemeData::carousel_view_theme, which describes the overall theme information for the application.
Fields§
§padding: Option<EdgeInsets>The amount of space surrounding each carousel item.
If null, CarouselView defaults to EdgeInsets::all(4.0).
background_color: Option<Color>The background color of each carousel item.
If null, CarouselView defaults to
ColorScheme::surface.
elevation: Option<f64>The z-coordinate of each carousel item’s Material.
If null, CarouselView defaults to 0.0.
shape: Option<OutlinedBorderRef>The shape of each carousel item’s Material.
Defines each item’s Material::shape.
If null, CarouselView defaults to a
RoundedRectangleBorder with a circular border radius of 28.0.
item_clip_behavior: Option<Clip>The clip behavior of each carousel item.
If null, CarouselView defaults to Clip::AntiAlias.
overlay_color: Option<WidgetStatePropertyRef<Option<Color>>>The highlight color of each carousel item in the different WidgetStates.
If null, CarouselView defaults to
ColorScheme::onSurface with the Material 3 opacities for hover, focus and press.
Implementations§
Source§impl CarouselViewThemeData
impl CarouselViewThemeData
Sourcepub fn new() -> CarouselViewThemeData
pub fn new() -> CarouselViewThemeData
Creates a theme that can be used for ThemeData::carousel_view_theme. Dart’s
optional named arguments are the fluent setters.
Sourcepub fn padding(self, padding: EdgeInsets) -> CarouselViewThemeData
pub fn padding(self, padding: EdgeInsets) -> CarouselViewThemeData
Dart CarouselViewThemeData(padding:).
Sourcepub fn background_color(self, background_color: Color) -> CarouselViewThemeData
pub fn background_color(self, background_color: Color) -> CarouselViewThemeData
Dart CarouselViewThemeData(backgroundColor:).
Sourcepub fn elevation(self, elevation: f64) -> CarouselViewThemeData
pub fn elevation(self, elevation: f64) -> CarouselViewThemeData
Dart CarouselViewThemeData(elevation:).
Sourcepub fn shape(self, shape: impl Into<OutlinedBorderRef>) -> CarouselViewThemeData
pub fn shape(self, shape: impl Into<OutlinedBorderRef>) -> CarouselViewThemeData
Dart CarouselViewThemeData(shape:).
Sourcepub fn item_clip_behavior(
self,
item_clip_behavior: Clip,
) -> CarouselViewThemeData
pub fn item_clip_behavior( self, item_clip_behavior: Clip, ) -> CarouselViewThemeData
Dart CarouselViewThemeData(itemClipBehavior:).
Sourcepub fn overlay_color(
self,
overlay_color: WidgetStatePropertyRef<Option<Color>>,
) -> CarouselViewThemeData
pub fn overlay_color( self, overlay_color: WidgetStatePropertyRef<Option<Color>>, ) -> CarouselViewThemeData
Dart CarouselViewThemeData(overlayColor:).
Sourcepub fn copy_with(&self) -> CarouselViewThemeData
pub fn copy_with(&self) -> CarouselViewThemeData
Creates a copy of this object but with the given fields replaced with the new values:
Dart’s copyWith, whose named arguments are the fluent setters on the copy.
Sourcepub fn lerp(
a: Option<&CarouselViewThemeData>,
b: Option<&CarouselViewThemeData>,
t: f64,
) -> CarouselViewThemeData
pub fn lerp( a: Option<&CarouselViewThemeData>, b: Option<&CarouselViewThemeData>, t: f64, ) -> CarouselViewThemeData
Linearly interpolate between two carousel themes.
{@macro dart.ui.shadow.lerp}
Trait Implementations§
Source§impl Clone for CarouselViewThemeData
impl Clone for CarouselViewThemeData
Source§impl Debug for CarouselViewThemeData
impl Debug for CarouselViewThemeData
Source§impl Default for CarouselViewThemeData
impl Default for CarouselViewThemeData
Source§impl Diagnosticable for CarouselViewThemeData
impl Diagnosticable for CarouselViewThemeData
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:).