pub struct MaterialAccentColor { /* private fields */ }Expand description
Defines a single accent color as well a swatch of four shades of the accent color.
The color’s shades are referred to by index, the colors with smaller
indices are lighter, larger indices are darker. There are four valid
indices: 100, 200, 400, and 700. The value of this color should be the
same as the value of index 200 and shade200.
See also:
Colors, which defines all of the standard material colors.- https://material.io/go/design-theming#color-color-schemes
Implementations§
Source§impl MaterialAccentColor
impl MaterialAccentColor
Sourcepub fn new(
primary: Color,
swatch: impl IntoIterator<Item = (i32, Color)>,
) -> MaterialAccentColor
pub fn new( primary: Color, swatch: impl IntoIterator<Item = (i32, Color)>, ) -> MaterialAccentColor
Creates a color swatch with a variety of shades appropriate for accent colors.
Sourcepub const fn from_static(
primary: Color,
swatch: &'static [(i32, Color)],
) -> MaterialAccentColor
pub const fn from_static( primary: Color, swatch: &'static [(i32, Color)], ) -> MaterialAccentColor
Dart’s const MaterialAccentColor(primary, {...}), for a table written in the source.
Methods from Deref<Target = ColorSwatch<i32>>§
Trait Implementations§
Source§impl Clone for MaterialAccentColor
impl Clone for MaterialAccentColor
Source§impl ColorExtension for MaterialAccentColor
impl ColorExtension for MaterialAccentColor
Source§fn eq_extension(&self, other: &dyn ColorExtension) -> bool
fn eq_extension(&self, other: &dyn ColorExtension) -> bool
Dart’s
== override on the subclass, called once the values compared equal. other
is the same runtime type when it downcasts; any other type is unequal, as Dart’s
runtimeType check makes it.Source§impl Debug for MaterialAccentColor
impl Debug for MaterialAccentColor
Source§impl Deref for MaterialAccentColor
impl Deref for MaterialAccentColor
Source§type Target = ColorSwatch<i32>
type Target = ColorSwatch<i32>
The resulting type after dereferencing.
Source§fn deref(&self) -> &ColorSwatch<i32>
fn deref(&self) -> &ColorSwatch<i32>
Dereferences the value.
Source§impl From<MaterialAccentColor> for AnyColor
impl From<MaterialAccentColor> for AnyColor
Source§fn from(color: MaterialAccentColor) -> AnyColor
fn from(color: MaterialAccentColor) -> AnyColor
Converts to this type from the input type.
Source§impl PartialEq for MaterialAccentColor
impl PartialEq for MaterialAccentColor
impl StructuralPartialEq for MaterialAccentColor
Auto Trait Implementations§
impl Forget for MaterialAccentColor
impl Freeze for MaterialAccentColor
impl Move for MaterialAccentColor
impl RefUnwindSafe for MaterialAccentColor
impl Send for MaterialAccentColor
impl Sync for MaterialAccentColor
impl Unpin for MaterialAccentColor
impl UnsafeUnpin for MaterialAccentColor
impl UnwindSafe for MaterialAccentColor
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
Mutably borrows from an owned value. Read more