CustomColors class
A class that defines a set of custom colors for use in an application.
The CustomColors
class provides a static set of color constants that can
be used to provide a consistent color scheme throughout an application. These
colors are chosen to match the branding or visual design of the application
and can be easily referenced from anywhere in the code.
The color constants defined in this class are static and immutable, and can be
accessed using the class name and the dot notation, for example CustomColors.primaryColor
.
This allows for easy and consistent usage of colors
throughout the codebase.
To add additional colors, simply define a new static Color
constant in the CustomColors
class. This can be done using the Color
constructor with a hex
code or an RGB value. For example, to define a new color named accentColor
,
you could add static const Color accentColor = Color(0xFF00FF00);
to the
CustomColors
class.
This class is intended to be used as a global color theme for the entire application,
and should be used in conjunction with a Theme
widget or a similar mechanism for
setting the theme of an application.
Constructors
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 Properties
- primaryColorModern ↔ MaterialColor
-
getter/setter pair
Static Methods
-
buildMaterialColor(
Color color) → MaterialColor