Hashbrowns class
The Hashbrown class provides a generateColor method.
The Hashbrown accepts as a constructor parameter a ColorGenerator, which can be used to customize the color generation behavior of the library.
By default, Hashbrown includes two color generation strategies, pastels
and bold
.
The hashbrown class provides factories to access these generators: Hashbrown.pastels()
and Hashbrown.bold()
Constructors
- Hashbrowns(ColorGenerator _colorGenerator)
- Hashbrowns.bold()
-
Hashbrowns.bold()
creates an instance of Hashbrowns that produces vibrant surface colors and a contrasting text colorfactory - Hashbrowns.pastels()
-
Hashbrowns.pastels()
factory instantiates a Hashbrowns class with a pastel color generator. This will create a background color with a high luminance, and a darker shade foreground color.factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
generateColor(
int hashcode) → ColorSet -
generateColor
takes a hashcode (or any other integer) as a parameter and generates a ColorSet. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited