Skip to main content

ListTileTheme

Struct ListTileTheme 

Source
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: WidgetRef

Implementations§

Source§

impl ListTileTheme

Source

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.

Source

pub fn key(self, key: KeyRef) -> ListTileTheme

Dart ListTileTheme(key:).

Source

pub fn data(self, data: ListTileThemeData) -> ListTileTheme

Dart ListTileTheme(data:).

Source

pub fn dense(self, dense: bool) -> ListTileTheme

Dart ListTileTheme(dense:).

Source

pub fn style(self, style: ListTileStyle) -> ListTileTheme

Dart ListTileTheme(style:).

Source

pub fn shape(self, shape: impl Into<ShapeBorderRef>) -> ListTileTheme

Dart ListTileTheme(shape:).

Source

pub fn selected_color(self, selected_color: impl Into<Color>) -> ListTileTheme

Dart ListTileTheme(selectedColor:).

Source

pub fn icon_color(self, icon_color: impl Into<AnyColor>) -> ListTileTheme

Dart ListTileTheme(iconColor:).

Source

pub fn text_color(self, text_color: impl Into<AnyColor>) -> ListTileTheme

Dart ListTileTheme(textColor:).

Source

pub fn content_padding( self, content_padding: impl Into<EdgeInsetsGeometry>, ) -> ListTileTheme

Dart ListTileTheme(contentPadding:).

Source

pub fn tile_color(self, tile_color: impl Into<Color>) -> ListTileTheme

Dart ListTileTheme(tileColor:).

Source

pub fn selected_tile_color( self, selected_tile_color: impl Into<Color>, ) -> ListTileTheme

Dart ListTileTheme(selectedTileColor:).

Source

pub fn enable_feedback(self, enable_feedback: impl Into<bool>) -> ListTileTheme

Dart ListTileTheme(enableFeedback:).

Source

pub fn mouse_cursor( self, mouse_cursor: impl Into<WidgetStatePropertyRef<Option<MouseCursorRef>>>, ) -> ListTileTheme

Dart ListTileTheme(mouseCursor:).

Source

pub fn horizontal_title_gap( self, horizontal_title_gap: impl Into<f64>, ) -> ListTileTheme

Dart ListTileTheme(horizontalTitleGap:).

Source

pub fn min_vertical_padding( self, min_vertical_padding: impl Into<f64>, ) -> ListTileTheme

Dart ListTileTheme(minVerticalPadding:).

Source

pub fn min_leading_width( self, min_leading_width: impl Into<f64>, ) -> ListTileTheme

Dart ListTileTheme(minLeadingWidth:).

Source

pub fn control_affinity( self, control_affinity: impl Into<ListTileControlAffinity>, ) -> ListTileTheme

Dart ListTileTheme(controlAffinity:).

Source

pub fn effective_data(&self) -> ListTileThemeData

The configuration of this theme: Dart’s data getter.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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);
Source

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl InheritedTheme for ListTileTheme

Source§

fn wrap( &self, _app: &mut App, _context: BuildContext, child: WidgetRef, ) -> WidgetRef

Return a copy of this inherited theme with the specified child. Read more
Source§

impl InheritedWidget for ListTileTheme

Source§

fn key(&self) -> Option<&KeyRef>

Source§

fn child(&self) -> &WidgetRef

The widget below this widget in the tree.
Source§

fn update_should_notify(&self, old_widget: &ListTileTheme) -> bool

Whether the framework should notify widgets that inherit from this widget. Read more
Source§

fn as_inherited_theme(&self) -> Option<&dyn InheritedTheme>

Dart’s 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, )

Dart’s 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.
Source§

fn debug_check_constructor(&self)

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 ListTileTheme
where *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 ListTileTheme

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<W> IntoWidget<InheritedKind> for W
where W: InheritedWidget,

Source§

fn into_widget(self) -> Rc<dyn Widget>

The widget as a tree node, made where this is called: its creation_location.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>