ZetaColorScheme class Theme

Easily craft stunning Flutter themes using pre-set color patterns or your own choices.

While Flutter's ThemeData.from offers a starting point for ColorScheme-based themes, it sometimes defaults to the standard ThemeData factory, leading to inconsistencies, particularly in dark themes. ZetaColorScheme addresses this by ensuring a seamless theme creation with the ColorScheme approach.

Themes can be formed using a default ColorScheme, or by inputting select color values. If both a ColorScheme and individual colors are provided, the individual colors will prevail.

These factory constructors enable the creation of color-toned themes from a singular color. Additionally, ZetaColorScheme simplifies theme crafting with color-branded backgrounds, blending different color degrees, primarily the primary color.

Adjusting the themed background of the AppBar is straightforward with ZetaColorScheme, ensuring it aligns with themed colors.

Inheritance
Mixed in types
Available Extensions
Annotations

Constructors

ZetaColorScheme({required ZetaColors zetaColors, String? fontFamily = kZetaFontFamily, required Brightness brightness, @Deprecated('Use surface instead. ' 'This feature was deprecated after v3.18.0-0.1.pre.') Color? background, required Color error, @Deprecated('Use onSurface instead. ' 'This feature was deprecated after v3.18.0-0.1.pre.') Color? onBackground, required Color onError, required Color onPrimary, required Color onSecondary, required Color onSurface, required Color primary, required Color secondary, required Color surface, Color? errorContainer, Color? inversePrimary, Color? inverseSurface, Color? onErrorContainer, Color? onInverseSurface, Color? onPrimaryContainer, Color? onSecondaryContainer, Color? onSurfaceVariant, Color? onTertiary, Color? onTertiaryContainer, Color? outline, Color? outlineVariant, Color? primaryContainer, Color? scrim, Color? secondaryContainer, Color? shadow, Color? surfaceTint, @Deprecated('Use surfaceContainerHighest instead. ' 'This feature was deprecated after v3.18.0-0.1.pre.') Color? surfaceVariant, Color? tertiary, Color? tertiaryContainer, Color? primaryFixed, Color? primaryFixedDim, Color? onPrimaryFixed, Color? onPrimaryFixedVariant, Color? secondaryFixed, Color? secondaryFixedDim, Color? onSecondaryFixed, Color? onSecondaryFixedVariant, Color? surfaceDim, Color? surfaceBright, Color? surfaceContainerLowest, Color? surfaceContainerLow, Color? surfaceContainer, Color? surfaceContainerHigh, Color? surfaceContainerHighest})
Default constructor with no required properties.
const

Properties

background Color
A color that typically appears behind scrollable content.
no setterinherited
brightness Brightness
The overall brightness of this color scheme.
finalinherited
error Color
The color to use for input validation errors, e.g. for InputDecoration.errorText.
finalinherited
errorContainer Color
A color used for error elements needing less emphasis than error.
no setterinherited
fontFamily String?
Name of the font family to use as default font for the text theme in created theme.
final
hashCode int
The hash code for this object.
no setteroverride
inversePrimary Color
An accent color used for displaying a highlight color on inverseSurface backgrounds, like button text in a SnackBar.
no setterinherited
inverseSurface Color
A surface color used for displaying the reverse of what’s seen in the surrounding UI, for example in a SnackBar to bring attention to an alert.
no setterinherited
onBackground Color
A color that's clearly legible when drawn on background.
no setterinherited
onError Color
A color that's clearly legible when drawn on error.
finalinherited
onErrorContainer Color
A color that's clearly legible when drawn on errorContainer.
no setterinherited
onInverseSurface Color
A color that's clearly legible when drawn on inverseSurface.
no setterinherited
onPrimary Color
A color that's clearly legible when drawn on primary.
finalinherited
onPrimaryContainer Color
A color that's clearly legible when drawn on primaryContainer.
no setterinherited
onPrimaryFixed Color
A color that is used for text and icons that exist on top of elements having primaryFixed color.
no setterinherited
onPrimaryFixedVariant Color
A color that provides a lower-emphasis option for text and icons than onPrimaryFixed.
no setterinherited
onSecondary Color
A color that's clearly legible when drawn on secondary.
finalinherited
onSecondaryContainer Color
A color that's clearly legible when drawn on secondaryContainer.
no setterinherited
onSecondaryFixed Color
A color that is used for text and icons that exist on top of elements having secondaryFixed color.
no setterinherited
onSecondaryFixedVariant Color
A color that provides a lower-emphasis option for text and icons than onSecondaryFixed.
no setterinherited
onSurface Color
A color that's clearly legible when drawn on surface.
finalinherited
onSurfaceVariant Color
A color that's clearly legible when drawn on surfaceVariant.
no setterinherited
onTertiary Color
A color that's clearly legible when drawn on tertiary.
no setterinherited
onTertiaryContainer Color
A color that's clearly legible when drawn on tertiaryContainer.
no setterinherited
onTertiaryFixed Color
A color that is used for text and icons that exist on top of elements having tertiaryFixed color.
no setterinherited
onTertiaryFixedVariant Color
A color that provides a lower-emphasis option for text and icons than onTertiaryFixed.
no setterinherited
outline Color
A utility color that creates boundaries and emphasis to improve usability.
no setterinherited
outlineVariant Color
A utility color that creates boundaries for decorative elements when a 3:1 contrast isn’t required, such as for dividers or decorative elements.
no setterinherited
primary Color
The color displayed most frequently across your app’s screens and components.
finalinherited
primaryContainer Color
A color used for elements needing less emphasis than primary.
no setterinherited
primaryFixed Color
A substitute for primaryContainer that's the same color for the dark and light themes.
no setterinherited
primaryFixedDim Color
A color used for elements needing more emphasis than primaryFixed.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrim Color
A color use to paint the scrim around of modal components.
no setterinherited
secondary Color
An accent color used for less prominent components in the UI, such as filter chips, while expanding the opportunity for color expression.
finalinherited
secondaryContainer Color
A color used for elements needing less emphasis than secondary.
no setterinherited
secondaryFixed Color
A substitute for secondaryContainer that's the same color for the dark and light themes.
no setterinherited
secondaryFixedDim Color
A color used for elements needing more emphasis than secondaryFixed.
no setterinherited
shadow Color
A color use to paint the drop shadows of elevated components.
no setterinherited
surface Color
The background color for widgets like Scaffold.
finalinherited
surfaceBright Color
A color that's always the lightest in the dark or light theme.
no setterinherited
surfaceContainer Color
A recommended color role for a distinct area within the surface.
no setterinherited
surfaceContainerHigh Color
A surface container color with a darker tone. It is used to create more emphasis than surfaceContainer but less emphasis than surfaceContainerHighest.
no setterinherited
surfaceContainerHighest Color
A surface container color with the darkest tone. It is used to create the most emphasis against the surface.
no setterinherited
surfaceContainerLow Color
A surface container color with a lighter tone that creates less emphasis than surfaceContainer but more emphasis than surfaceContainerLowest.
no setterinherited
surfaceContainerLowest Color
A surface container color with the lightest tone and the least emphasis relative to the surface.
no setterinherited
surfaceDim Color
A color that's always darkest in the dark or light theme.
no setterinherited
surfaceTint Color
A color used as an overlay on a surface color to indicate a component's elevation.
no setterinherited
surfaceVariant Color
A color variant of surface that can be used for differentiation against a component using surface.
no setterinherited
tertiary Color
A color used as a contrasting accent that can balance primary and secondary colors or bring heightened attention to an element, such as an input field.
no setterinherited
tertiaryContainer Color
A color used for elements needing less emphasis than tertiary.
no setterinherited
tertiaryFixed Color
A substitute for tertiaryContainer that's the same color for dark and light themes.
no setterinherited
tertiaryFixedDim Color
A color used for elements needing more emphasis than tertiaryFixed.
no setterinherited
zetaColors ZetaColors
Current instance of the ZetaColors
final

Methods

copyWith({ZetaColors? zetaColors, String? fontFamily, Brightness? brightness, Color? primary, Color? onPrimary, Color? primaryContainer, Color? onPrimaryContainer, Color? primaryFixed, Color? primaryFixedDim, Color? onPrimaryFixed, Color? onPrimaryFixedVariant, Color? secondary, Color? onSecondary, Color? secondaryContainer, Color? onSecondaryContainer, Color? secondaryFixed, Color? secondaryFixedDim, Color? onSecondaryFixed, Color? onSecondaryFixedVariant, Color? tertiary, Color? onTertiary, Color? tertiaryContainer, Color? onTertiaryContainer, Color? tertiaryFixed, Color? tertiaryFixedDim, Color? onTertiaryFixed, Color? onTertiaryFixedVariant, Color? error, Color? onError, Color? errorContainer, Color? onErrorContainer, Color? background, Color? onBackground, Color? surface, Color? onSurface, Color? surfaceVariant, Color? surfaceDim, Color? surfaceBright, Color? surfaceContainerLowest, Color? surfaceContainerLow, Color? surfaceContainer, Color? surfaceContainerHigh, Color? surfaceContainerHighest, Color? onSurfaceVariant, Color? outline, Color? outlineVariant, Color? shadow, Color? scrim, Color? inverseSurface, Color? onInverseSurface, Color? inversePrimary, Color? surfaceTint}) ZetaColorScheme
Creates the copy of the current scheme from the provided values.
override
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

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