ColorUtils class

///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////

Constructors

ColorUtils.new()

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

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

Static Methods

blend(Color color1, Color color2, double ratio) → Color
Blends two colors based on a ratio (0-1, where 0 is all color1, 1 is all color2)
colorToMapboxInt(Color color) → int
//////////// //////////// Converts a Flutter Color to a Mapbox-compatible integer value
darken(Color color, double amount) → Color
Darkens a color by a percentage (0-1)
fromHex(String hexString) → Color
Converts a hex string to a Color
lighten(Color color, double amount) → Color
Lightens a color by a percentage (0-1)
toHex(Color color, {bool withHashSign = true}) → String
Converts a Color to a hex string
withAlpha(Color color, double opacity) → Color
Creates a color with opacity