zeta_theme library

Zeta Flutter Theme.

See Zeta Flutter Utils package for details.

Classes

InternalProvider
Provider used within ZetaProvider, placed within FutureBuilder to allow time for theme data to be pulled from async function
InternalProviderState
State for InternalProvider.
Zeta
An InheritedWidget that provides access to Zeta theme settings.
ZetaAnimationLength
Tokenised durations used for animations
ZetaBorders
Temporary class to hold border values.
ZetaColors
The semantic tokens for colors
ZetaColorsAA
The semantic colors for AA
ZetaColorsAAA
The semantic colors for AAA
ZetaColorSwatch
Contains shades from 10 (light) to 100 (dark).
ZetaCustomTheme
A custom theme that can be used to define custom colors for the app.
ZetaDefaultThemeService
A default implementation of ZetaThemeService that uses SharedPreferences to store the theme data.
ZetaPrimitives
Interface used for zeta color primitives
ZetaPrimitivesDark
Dark primitives
ZetaPrimitivesLight
Light primitives
ZetaProvider
A widget that provides Zeta theming and contrast data down the widget tree.
ZetaProviderState
The state associated with ZetaProvider.
ZetaPureColorSwatch
A swatch of colors with values 0 (light), 500 (medium) and 1000(dark).
ZetaRadius
The semantic tokens for radius
ZetaRadiusAA
The semantic radius for AA
ZetaRadiusAAA
The semantic radius for AAA
ZetaRoundedScope
Sets a default rounded value for all of its Zeta children.
ZetaSemantics
The semantic tokens for Zeta
ZetaSemanticsAA
The semantic tokens for AA
ZetaSemanticsAAA
The semantic tokens for AAA
ZetaSpacing
The semantic tokens for spacing
ZetaSpacingAA
The semantic spacing for AA
ZetaSpacingAAA
The semantic spacing for AAA
ZetaTextStyles
Typography in Zeta style.
ZetaThemeService
ZetaThemeService is an abstract class. It provides the structure for loading and saving themes in Zeta application.
ZetaThemeServiceData
ZetaThemeData is a class that holds the theme data to be stored with the theme service.

Enums

DeviceType
Enum to define device types.
ZetaContrast
ZetaAccessibilityStandard is an enumeration that defines the Web Content Accessibility Guidelines (WCAG) 2.1. It includes two levels of conformance: AA (minimum) and AAA (enhanced).

Extensions

BreakpointFull on BuildContext
Utils to determine the DeviceType from the current context.
BreakpointLocal on BoxConstraints
Utils to determine the DeviceType from some box constraints.
Rounded on BuildContext
Extension used on BuildContext to get rounded.
ZetaColorExtensions on Color
Extensions on Color to brighten, lighten, darken and blend colors and can get a shade for gradients.
ZetaSemanticColorExtension on ZetaColors
Extensions on ZetaColors to provide additional functionality.
ZetaThemeModeExtension on ThemeMode
Extensions on ThemeMode to provide additional functionality.

Constants

kZetaFontFamily → const String
Default font family for Zeta System.
kZetaIconSize → const double
Default icon size for Zeta System.
kZetaSwatchPrimaryIndex → const int
Primary color shade index for ZetaColorSwatch.
kZetaSwatchTargetContrasts → const Map<int, double>
Target contrast values for different color shades of ZetaColorSwatch.
zetaTextTheme → const TextTheme
ZetaTextStyles combined into a TextTheme.

Properties

allPrimitives Map<String, Type>
All primitives
getter/setter pair

Functions

generateZetaTheme({required Brightness brightness, required ColorScheme colorScheme, ThemeData? existingTheme, String? fontFamily}) ThemeData
Creates a variant of ThemeData with added Zeta styles.

Typedefs

ZetaAppBuilder = Widget Function(BuildContext context, ThemeData light, ThemeData dark, ThemeMode themeMode)
A typedef for the ZetaAppBuilder function which passes BuildContext, light ThemeData, dark ThemeData and ThemeMode and returns a Widget.