token_theme_kit library
token_theme_kit
A small, design-token–driven theming layer for Flutter.
This package exposes:
- Semantic color tokens (AppColorTokens)
- Typography tokens (AppTypographyTokens)
- Token-to-Material mapping (TokenColorSchemes)
- Token-aware theme builder (TokenThemeBuilder)
- Runtime theme/font controller (TokenThemeController)
- Context convenience accessors (TokenThemeContextX)
Classes
- AppColorTokens
- The semantic color token contract for an app/theme.
- AppTypographyTokens
- Typography tokens that can be applied to a base TextTheme.
- BrandColors
- Brand color roles used across the app (buttons, highlights, accents).
- SemanticColors
- Semantic state colors (status and feedback).
- SurfaceColors
- Surface and border roles for layout backgrounds and elevation.
- TextColors
- Text color roles for typical UI needs.
- ThemePair
- A pair of token palettes for light and dark mode.
-
ThemeRegistry<
T> - A registry of named themes (each theme has a light/dark ThemePair).
- TokenColorSchemes
- Converts semantic color tokens into a Material ColorScheme.
- TokenScope
- An InheritedWidget that provides AppColorTokens to the widget tree.
- TokenThemeBuilder
- Builds a token-driven ThemeData from semantic tokens.
-
TokenThemeController<
T, F> - A lightweight controller for runtime theme mode, theme selection, and font.
Extensions
- TokenThemeContextX on BuildContext
-
Convenience accessors for
token_theme_kiton a BuildContext.