ColorAttribute class

Color attribute

Inheritance
Implementers
Annotations
  • @freezed

Constructors

ColorAttribute(Color color)
Constructor
factory
ColorAttribute.backgroundColor(Color color)
Background color
factory
ColorAttribute.textColor(Color color)
Text color
factory

Properties

color Color
no setterinherited
copyWith → $ColorAttributeCopyWith<ColorAttribute>
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_ColorAttribute value), {required TResult backgroundColor(BackgroundColorAttribute value), required TResult textColor(TextColorAttribute value)}) → TResult
inherited
maybeMap<TResult extends Object?>(TResult $default(_ColorAttribute value)?, {TResult backgroundColor(BackgroundColorAttribute value)?, TResult textColor(TextColorAttribute value)?, required TResult orElse()}) → TResult
inherited
maybeWhen<TResult extends Object?>(TResult $default(Color color)?, {TResult backgroundColor(Color color)?, TResult textColor(Color color)?, required TResult orElse()}) → TResult
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(Color color), {required TResult backgroundColor(Color color), required TResult textColor(Color color)}) → TResult
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

create<T extends ColorAttribute>(Color color) → T
Creates instance of type ColorAttribute