MinColors class
Paleta de colores del sistema de diseño MiniUI.
Sigue la convención de tokens de shadcn/ui, donde cada token de color tiene un par foreground asociado para garantizar el contraste necesario.
Tokens principales
| Token | Uso |
|---|---|
background / foreground |
Fondo principal de la app y texto sobre él. |
card / cardForeground |
Superficies de tarjetas (MinCard). |
popover / popoverForeground |
Paneles flotantes (dropdowns, popovers). |
primary / primaryForeground |
Acento principal (botones primarios). |
secondary / secondaryForeground |
Variante secundaria. |
muted / mutedForeground |
Fondos atenuados y texto secundario. |
accent / accentForeground |
Estados hover y selección. |
destructive / destructiveForeground |
Errores y acciones destructivas. |
border |
Color de bordes generales. |
input |
Color de bordes de campos de entrada. |
ring |
Color del ring de foco. |
Uso
final colors = context.theme.colors;
Container(color: colors.card)
Text('Hola', style: TextStyle(color: colors.foreground))
Paletas predefinidas: MinColors.light y MinColors.dark.
Constructors
- MinColors({required Color background, required Color foreground, required Color card, required Color cardForeground, required Color popover, required Color popoverForeground, required Color primary, required Color primaryForeground, required Color secondary, required Color secondaryForeground, required Color muted, required Color mutedForeground, required Color accent, required Color accentForeground, required Color destructive, required Color destructiveForeground, required Color border, required Color input, required Color ring})
-
const
Properties
- accent → Color
-
final
- accentForeground → Color
-
final
- background → Color
-
final
- border → Color
-
final
- card → Color
-
final
- cardForeground → Color
-
final
- destructive → Color
-
final
- destructiveForeground → Color
-
final
- foreground → Color
-
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- input → Color
-
final
- muted → Color
-
final
- mutedForeground → Color
-
final
- popover → Color
-
final
- popoverForeground → Color
-
final
- primary → Color
-
final
- primaryForeground → Color
-
final
- ring → Color
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secondary → Color
-
final
- secondaryForeground → Color
-
final
Methods
-
copyWith(
{Color? background, Color? foreground, Color? card, Color? cardForeground, Color? popover, Color? popoverForeground, Color? primary, Color? primaryForeground, Color? secondary, Color? secondaryForeground, Color? muted, Color? mutedForeground, Color? accent, Color? accentForeground, Color? destructive, Color? destructiveForeground, Color? border, Color? input, Color? ring}) → MinColors -
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.
override