Skip to main content

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

A token-driven Flutter design system for AI and HTML design workflows: an HTML twin, a component manifest and design tokens keep every screen on reusable components.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:utopia_hooks/utopia_hooks.dart';
import 'package:utopia_ui/utopia_ui.dart';

import 'pages/components_page.dart';
import 'state/theme_lab_state.dart';

void main() => runApp(const DesignSystemApp());

const _providers = <Type, Object? Function()>{ThemeLabState: useThemeLabState};

class DesignSystemApp extends HookWidget {
  const DesignSystemApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'utopia_ui - Design System',
      debugShowCheckedModeBanner: false,
      home: const ShowcaseRoot(),
      builder: (context, child) =>
          HookProviderContainerWidget(_providers, alwaysNotifyDependents: false, child: child!),
    );
  }
}

class ShowcaseRoot extends HookWidget {
  const ShowcaseRoot({super.key});

  @override
  Widget build(BuildContext context) {
    final lab = useProvided<ThemeLabState>();
    final theme = lab.buildTheme();
    return UtopiaTheme(
      data: theme,
      child: Builder(
        builder: (context) => Scaffold(
          backgroundColor: context.colors.canvas,
          body: const ComponentsPage(),
        ),
      ),
    );
  }
}
5
likes
140
points
349
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A token-driven Flutter design system for AI and HTML design workflows: an HTML twin, a component manifest and design tokens keep every screen on reusable components.

Repository (GitHub)
View/report issues

Topics

#design-system #design-tokens #ui #widget #ai

License

BSD-3-Clause (license)

Dependencies

fast_immutable_collections, flutter, freezed_annotation, intl, shimmer, utopia_collections, utopia_hooks

More

Packages that depend on utopia_ui