flutter_mcp_ui_core 0.5.1 copy "flutter_mcp_ui_core: ^0.5.1" to clipboard
flutter_mcp_ui_core: ^0.5.1 copied to clipboard

Core models, constants, and utilities for Flutter MCP UI system. Shared foundation for renderer and generator packages.

flutter_mcp_ui_core #

Core models, constants, and utilities for the Flutter MCP UI system. Shared foundation for the renderer and generator packages, implementing the MCP UI DSL 1.4 specification.

Features #

  • Shared data models — UI definitions, widgets, actions, bindings.
  • Material 3 theme systemThemeDefinition mirrors the canonical 14-token-domain spec (color, typography, spacing, shape, elevation, motion, density, breakpoints, border, opacity, focus ring, z-index, components) with optional light/dark overrides.
  • M3 28-role color + 6 semantic roles, surface tonal scale, HCT seed palettes.
  • 15-role typography, 9-step spacing on the 8pt grid, 7-family shapes, 6-level elevation, M3 state-layer opacities.
  • DTCG (W3C Design Tokens) codec — ThemeDefinition.toDtcg() / fromDtcg() for round-trip with Tokens Studio, Style Dictionary, Claude Design exports.
  • Type-safe constants — widget types and property keys.
  • Validation framework — schema, references, and theme validators.
  • Utilities — JSON manipulation, type conversion, property helpers.
  • Structured exceptions for clear error reporting.
  • DSL version management — compatibility checks and migration utilities.

Quick Start #

import 'package:flutter_mcp_ui_core/flutter_mcp_ui_core.dart';

// Themes round-trip through the W3C DTCG interchange format (spec §5b).
final theme = ThemeDefinition.defaultLight(seedHex: '#6750A4');
final dtcg = theme.toDtcg();
final restored = ThemeDefinition.fromDtcg(dtcg);

// Widget subtrees are built from the canonical type constants, so a typo is
// a compile error rather than a widget that silently fails to render.
final layout = WidgetConfig(
  type: WidgetTypes.linear,
  properties: {'direction': 'vertical'},
  children: [
    WidgetConfig(type: WidgetTypes.text, properties: {'content': 'Hello'}),
  ],
);

Support #

License #

MIT — see LICENSE.

3
likes
0
points
212
downloads

Publisher

verified publishermakemind.dev

Weekly Downloads

Core models, constants, and utilities for Flutter MCP UI system. Shared foundation for renderer and generator packages.

Homepage
Repository (GitHub)
View/report issues

Topics

#ui #json #mcp #flutter #widget

License

unknown (license)

Dependencies

collection, flutter, json_schema, material_color_utilities, mcp_bundle, meta

More

Packages that depend on flutter_mcp_ui_core