ai_ui_render 0.1.0 copy "ai_ui_render: ^0.1.0" to clipboard
ai_ui_render: ^0.1.0 copied to clipboard

AI-driven JSON to Flutter UI rendering framework. Safely generate Flutter UI from AI prompts with guardrailed component catalogs, streaming support, visibility conditions, and rich action handling.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.1.0 - 2026-01-23 #

Added #

  • Core Types

    • UIElement - Base UI element structure with key, type, props, children, and visibility
    • UITree - Flat tree structure optimized for LLM generation
    • DynamicValue - Support for literal values or path references to data model
    • JsonPatch - JSON patch operations for streaming updates
  • Component Catalog System

    • AiUiCatalog - Registry of allowed components (safety guardrail)
    • CatalogBuilder - Fluent API for building catalogs
    • createCatalog() - Helper function to create catalog builders
    • generateCatalogPrompt() - Generate AI prompts from catalog
  • Visibility Conditions

    • Boolean conditions (true/false)
    • Path-based conditions (truthy check on data path)
    • Auth-based conditions (signedIn/signedOut)
    • Logic expressions (and, or, not)
    • Comparison expressions (eq, neq, gt, gte, lt, lte)
  • Rendering

    • JsonRenderer - Main widget for rendering UI trees with Provider integration
    • StandaloneJsonRenderer - Standalone renderer without Provider dependency
    • ComponentRegistry - Maps component types to widget builders
    • ElementBuilder - Builds widgets from elements recursively
  • State Management (Provider)

    • DataProvider - Manages data model and auth state
    • VisibilityProvider - Evaluates visibility conditions
    • ActionProvider - Handles action execution with confirmations
    • JsonUIProvider - Combined provider widget
  • Streaming Support

    • UIStreamController - Controller for streaming UI generation
    • UIStreamProvider - InheritedWidget for stream access
    • JSONL parser for incremental updates
    • applyPatch() - Apply JSON patches to UI tree
  • Actions System

    • Action - Rich action definition with params, confirm, callbacks
    • ActionConfirm - Confirmation dialog configuration
    • resolveAction() - Resolve dynamic values in actions
    • Success/error handlers with navigation and data updates
  • Validation

    • Built-in validators: required, email, minLength, maxLength, pattern, min, max, url
    • Validators.compose() - Combine multiple validators
    • Custom validation function support

Example #

  • Complete dashboard example demonstrating all features
  • Pre-built components: Card, Text, Button, Row, Column, Icon, Badge, Divider, Spacer
2
likes
140
points
48
downloads

Publisher

verified publisherhoneymeta.com

Weekly Downloads

AI-driven JSON to Flutter UI rendering framework. Safely generate Flutter UI from AI prompts with guardrailed component catalogs, streaming support, visibility conditions, and rich action handling.

Repository (GitHub)
View/report issues

Topics

#ai #json #ui #widget #llm

Documentation

API reference

License

MIT (license)

Dependencies

flutter, http, provider

More

Packages that depend on ai_ui_render