pub struct ListTileTheme {Show 18 fields
pub key: Option<KeyRef>,
pub data: Option<ListTileThemeData>,
pub dense: Option<bool>,
pub shape: Option<ShapeBorderRef>,
pub style: Option<ListTileStyle>,
pub selected_color: Option<Color>,
pub icon_color: Option<AnyColor>,
pub text_color: Option<AnyColor>,
pub content_padding: Option<EdgeInsetsGeometry>,
pub tile_color: Option<Color>,
pub selected_tile_color: Option<Color>,
pub enable_feedback: Option<bool>,
pub mouse_cursor: Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>,
pub horizontal_title_gap: Option<f64>,
pub min_vertical_padding: Option<f64>,
pub min_leading_width: Option<f64>,
pub control_affinity: Option<ListTileControlAffinity>,
pub child: WidgetRef,
}Expand description
An inherited widget that defines color and style parameters for ListTiles
in this widget’s subtree.
Values specified here are used for ListTile properties that are not given
an explicit non-null value.
The Drawer widget specifies a tile theme for its children which sets
style to ListTileStyle::Drawer.
The fields other than data are Dart’s obsolete constructor arguments,
read through the effective_* methods that stand for Dart’s getters of the same names.
Fields§
§key: Option<KeyRef>§data: Option<ListTileThemeData>Dart’s _data: the configuration given to the constructor.
dense: Option<bool>§shape: Option<ShapeBorderRef>§style: Option<ListTileStyle>§selected_color: Option<Color>§icon_color: Option<AnyColor>§text_color: Option<AnyColor>§content_padding: Option<EdgeInsetsGeometry>§tile_color: Option<Color>§selected_tile_color: Option<Color>§enable_feedback: Option<bool>§mouse_cursor: Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>§horizontal_title_gap: Option<f64>§min_vertical_padding: Option<f64>§min_leading_width: Option<f64>§control_affinity: Option<ListTileControlAffinity>§child: WidgetRefImplementations§
Source§impl ListTileTheme
impl ListTileTheme
Sourcepub fn new<K>(child: impl IntoWidget<K>) -> ListTileTheme
pub fn new<K>(child: impl IntoWidget<K>) -> ListTileTheme
Creates a list tile theme that defines the color and style parameters for
descendant ListTiles.
Only the data parameter should be used. The other parameters are
redundant (are now obsolete) and will be deprecated in a future update.
Sourcepub fn key(self, key: KeyRef) -> ListTileTheme
pub fn key(self, key: KeyRef) -> ListTileTheme
Dart ListTileTheme(key:).
Sourcepub fn data(self, data: ListTileThemeData) -> ListTileTheme
pub fn data(self, data: ListTileThemeData) -> ListTileTheme
Dart ListTileTheme(data:).
Sourcepub fn dense(self, dense: bool) -> ListTileTheme
pub fn dense(self, dense: bool) -> ListTileTheme
Dart ListTileTheme(dense:).
Sourcepub fn style(self, style: ListTileStyle) -> ListTileTheme
pub fn style(self, style: ListTileStyle) -> ListTileTheme
Dart ListTileTheme(style:).
Sourcepub fn shape(self, shape: impl Into<ShapeBorderRef>) -> ListTileTheme
pub fn shape(self, shape: impl Into<ShapeBorderRef>) -> ListTileTheme
Dart ListTileTheme(shape:).
Sourcepub fn selected_color(self, selected_color: impl Into<Color>) -> ListTileTheme
pub fn selected_color(self, selected_color: impl Into<Color>) -> ListTileTheme
Dart ListTileTheme(selectedColor:).
Sourcepub fn icon_color(self, icon_color: impl Into<AnyColor>) -> ListTileTheme
pub fn icon_color(self, icon_color: impl Into<AnyColor>) -> ListTileTheme
Dart ListTileTheme(iconColor:).
Sourcepub fn text_color(self, text_color: impl Into<AnyColor>) -> ListTileTheme
pub fn text_color(self, text_color: impl Into<AnyColor>) -> ListTileTheme
Dart ListTileTheme(textColor:).
Sourcepub fn content_padding(
self,
content_padding: impl Into<EdgeInsetsGeometry>,
) -> ListTileTheme
pub fn content_padding( self, content_padding: impl Into<EdgeInsetsGeometry>, ) -> ListTileTheme
Dart ListTileTheme(contentPadding:).
Sourcepub fn tile_color(self, tile_color: impl Into<Color>) -> ListTileTheme
pub fn tile_color(self, tile_color: impl Into<Color>) -> ListTileTheme
Dart ListTileTheme(tileColor:).
Sourcepub fn selected_tile_color(
self,
selected_tile_color: impl Into<Color>,
) -> ListTileTheme
pub fn selected_tile_color( self, selected_tile_color: impl Into<Color>, ) -> ListTileTheme
Dart ListTileTheme(selectedTileColor:).
Sourcepub fn enable_feedback(self, enable_feedback: impl Into<bool>) -> ListTileTheme
pub fn enable_feedback(self, enable_feedback: impl Into<bool>) -> ListTileTheme
Dart ListTileTheme(enableFeedback:).
Sourcepub fn mouse_cursor(
self,
mouse_cursor: impl Into<WidgetStatePropertyRef<Option<MouseCursorRef>>>,
) -> ListTileTheme
pub fn mouse_cursor( self, mouse_cursor: impl Into<WidgetStatePropertyRef<Option<MouseCursorRef>>>, ) -> ListTileTheme
Dart ListTileTheme(mouseCursor:).
Sourcepub fn horizontal_title_gap(
self,
horizontal_title_gap: impl Into<f64>,
) -> ListTileTheme
pub fn horizontal_title_gap( self, horizontal_title_gap: impl Into<f64>, ) -> ListTileTheme
Dart ListTileTheme(horizontalTitleGap:).
Sourcepub fn min_vertical_padding(
self,
min_vertical_padding: impl Into<f64>,
) -> ListTileTheme
pub fn min_vertical_padding( self, min_vertical_padding: impl Into<f64>, ) -> ListTileTheme
Dart ListTileTheme(minVerticalPadding:).
Sourcepub fn min_leading_width(
self,
min_leading_width: impl Into<f64>,
) -> ListTileTheme
pub fn min_leading_width( self, min_leading_width: impl Into<f64>, ) -> ListTileTheme
Dart ListTileTheme(minLeadingWidth:).
Sourcepub fn control_affinity(
self,
control_affinity: impl Into<ListTileControlAffinity>,
) -> ListTileTheme
pub fn control_affinity( self, control_affinity: impl Into<ListTileControlAffinity>, ) -> ListTileTheme
Dart ListTileTheme(controlAffinity:).
Sourcepub fn effective_data(&self) -> ListTileThemeData
pub fn effective_data(&self) -> ListTileThemeData
The configuration of this theme: Dart’s data getter.
Sourcepub fn effective_dense(&self) -> Option<bool>
pub fn effective_dense(&self) -> Option<bool>
Overrides the default value of ListTile::dense.
This property is obsolete: please use the data
ListTileThemeData::dense property instead.
Sourcepub fn effective_shape(&self) -> Option<ShapeBorderRef>
pub fn effective_shape(&self) -> Option<ShapeBorderRef>
Overrides the default value of ListTile::shape.
This property is obsolete: please use the data
ListTileThemeData::shape property instead.
Sourcepub fn effective_style(&self) -> Option<ListTileStyle>
pub fn effective_style(&self) -> Option<ListTileStyle>
Overrides the default value of ListTile::style.
This property is obsolete: please use the data
ListTileThemeData::style property instead.
Sourcepub fn effective_selected_color(&self) -> Option<Color>
pub fn effective_selected_color(&self) -> Option<Color>
Overrides the default value of ListTile::selected_color.
This property is obsolete: please use the data
ListTileThemeData::selected_color property instead.
Sourcepub fn effective_icon_color(&self) -> Option<AnyColor>
pub fn effective_icon_color(&self) -> Option<AnyColor>
Overrides the default value of ListTile::icon_color.
This property is obsolete: please use the data
ListTileThemeData::icon_color property instead.
Sourcepub fn effective_text_color(&self) -> Option<AnyColor>
pub fn effective_text_color(&self) -> Option<AnyColor>
Overrides the default value of ListTile::text_color.
This property is obsolete: please use the data
ListTileThemeData::text_color property instead.
Sourcepub fn effective_content_padding(&self) -> Option<EdgeInsetsGeometry>
pub fn effective_content_padding(&self) -> Option<EdgeInsetsGeometry>
Overrides the default value of ListTile::content_padding.
This property is obsolete: please use the data
ListTileThemeData::content_padding property instead.
Sourcepub fn effective_tile_color(&self) -> Option<Color>
pub fn effective_tile_color(&self) -> Option<Color>
Overrides the default value of ListTile::tile_color.
This property is obsolete: please use the data
ListTileThemeData::tile_color property instead.
Sourcepub fn effective_selected_tile_color(&self) -> Option<Color>
pub fn effective_selected_tile_color(&self) -> Option<Color>
Overrides the default value of ListTile::selected_tile_color.
This property is obsolete: please use the data
ListTileThemeData::selected_tile_color property instead.
Sourcepub fn effective_horizontal_title_gap(&self) -> Option<f64>
pub fn effective_horizontal_title_gap(&self) -> Option<f64>
Overrides the default value of ListTile::horizontal_title_gap.
This property is obsolete: please use the data
ListTileThemeData::horizontal_title_gap property instead.
Sourcepub fn effective_min_vertical_padding(&self) -> Option<f64>
pub fn effective_min_vertical_padding(&self) -> Option<f64>
Overrides the default value of ListTile::min_vertical_padding.
This property is obsolete: please use the data
ListTileThemeData::min_vertical_padding property instead.
Sourcepub fn effective_min_leading_width(&self) -> Option<f64>
pub fn effective_min_leading_width(&self) -> Option<f64>
Overrides the default value of ListTile::min_leading_width.
This property is obsolete: please use the data
ListTileThemeData::min_leading_width property instead.
Sourcepub fn effective_enable_feedback(&self) -> Option<bool>
pub fn effective_enable_feedback(&self) -> Option<bool>
Overrides the default value of ListTile::enable_feedback.
This property is obsolete: please use the data
ListTileThemeData::enable_feedback property instead.
Sourcepub fn effective_control_affinity(&self) -> Option<ListTileControlAffinity>
pub fn effective_control_affinity(&self) -> Option<ListTileControlAffinity>
Overrides the default value of CheckboxListTile::control_affinity
or ExpansionTile::control_affinity or SwitchListTile::control_affinity or
RadioListTile::control_affinity.
This property is obsolete: please use the
ListTileThemeData::control_affinity property instead.
Sourcepub fn of(app: &mut App, context: BuildContext) -> ListTileThemeData
pub fn of(app: &mut App, context: BuildContext) -> ListTileThemeData
The data property of the closest instance of this class that
encloses the given context.
If there is no enclosing ListTileTheme widget, then
ThemeData::list_tile_theme is used (see Theme::of).
Typical usage is as follows:
let theme = ListTileTheme::of(app, context);Sourcepub fn merge<K>(child: impl IntoWidget<K>) -> ListTileThemeMerge
pub fn merge<K>(child: impl IntoWidget<K>) -> ListTileThemeMerge
Creates a list tile theme that controls the color and style parameters for
ListTiles, and merges in the current list tile theme, if any.
Dart’s optional named arguments are the setters of the ListTileThemeMerge this
returns.
Trait Implementations§
Source§impl Debug for ListTileTheme
impl Debug for ListTileTheme
Source§impl InheritedTheme for ListTileTheme
impl InheritedTheme for ListTileTheme
Source§impl InheritedWidget for ListTileTheme
impl InheritedWidget for ListTileTheme
Source§fn update_should_notify(&self, old_widget: &ListTileTheme) -> bool
fn update_should_notify(&self, old_widget: &ListTileTheme) -> bool
Source§fn as_inherited_theme(&self) -> Option<&dyn InheritedTheme>
fn as_inherited_theme(&self) -> Option<&dyn InheritedTheme>
this is InheritedTheme: an inherited widget that is an InheritedTheme
answers with itself, which is what InheritedTheme::capture collects.Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
debugFillProperties: the properties a dump shows for this widget, in Dart’s
order. Dart’s Widget base only sets the dense tree style, which the framework does.Auto Trait Implementations§
impl !RefUnwindSafe for ListTileTheme
impl !Send for ListTileTheme
impl !Sync for ListTileTheme
impl !UnwindSafe for ListTileTheme
impl Forget for ListTileTheme
impl Freeze for ListTileThemewhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
*const RcInner<dyn ShapeBorder> is !null: Freeze,
PhantomData<RcInner<dyn ShapeBorder>>: Freeze,
&'static dyn ColorExtension: Freeze,
*const RcInner<dyn ColorExtension> is !null: Freeze,
PhantomData<RcInner<dyn ColorExtension>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
*const RcInner<Paint> is !null: Freeze,
PhantomData<RcInner<Paint>>: Freeze,
PhantomData<Shadow>: Freeze,
PhantomData<FontFeature>: Freeze,
PhantomData<FontVariation>: Freeze,
*const RcInner<dyn WidgetStateProperty<Option<Rc<dyn MouseCursor>>>> is !null: Freeze,
PhantomData<RcInner<dyn WidgetStateProperty<Option<Rc<dyn MouseCursor>>>>>: Freeze,
*const RcInner<dyn Widget> is !null: Freeze,
PhantomData<RcInner<dyn Widget>>: Freeze,
impl Move for ListTileTheme
impl Unpin for ListTileTheme
impl UnsafeUnpin for ListTileThemewhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
*const RcInner<dyn ShapeBorder> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn ShapeBorder>>: UnsafeUnpin,
&'static dyn ColorExtension: UnsafeUnpin,
*const RcInner<dyn ColorExtension> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn ColorExtension>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
*const RcInner<Paint> is !null: UnsafeUnpin,
PhantomData<RcInner<Paint>>: UnsafeUnpin,
PhantomData<Shadow>: UnsafeUnpin,
PhantomData<FontFeature>: UnsafeUnpin,
PhantomData<FontVariation>: UnsafeUnpin,
*const RcInner<dyn WidgetStateProperty<Option<Rc<dyn MouseCursor>>>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn WidgetStateProperty<Option<Rc<dyn MouseCursor>>>>>: UnsafeUnpin,
*const RcInner<dyn Widget> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Widget>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<W> IntoWidget<InheritedKind> for Wwhere
W: InheritedWidget,
impl<W> IntoWidget<InheritedKind> for Wwhere
W: InheritedWidget,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
creation_location.