Skip to main content

CheckmarkableChipAttributes

Trait CheckmarkableChipAttributes 

Source
pub trait CheckmarkableChipAttributes {
    // Required methods
    fn show_checkmark(&self) -> Option<bool>;
    fn checkmark_color(&self) -> Option<Color>;
}
Expand description

An interface for Material Design chips that can have check marks.

The defaults mentioned in the documentation for each attribute are what the implementing classes typically use for defaults (but this class doesn’t provide or enforce them).

See also:

  • InputChip, a chip that represents a complex piece of information, such as an entity (person, place, or thing) or conversational text, in a compact form.
  • ChoiceChip, allows a single selection from a set of options. Choice chips contain related descriptive text or categories.
  • FilterChip, uses tags or descriptive words as a way to filter content.
  • https://material.io/design/components/chips.html

Required Methods§

Source

fn show_checkmark(&self) -> Option<bool>

Whether or not to show a check mark when SelectableChipAttributes::selected is true.

Defaults to true.

Source

fn checkmark_color(&self) -> Option<Color>

Color of the chip’s check mark when a check mark is visible.

This will override the color set by the platform’s brightness setting.

If null, it will defer to a color selected by the platform’s brightness setting.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§