flutter_tweakcn_generator 0.2.0 copy "flutter_tweakcn_generator: ^0.2.0" to clipboard
flutter_tweakcn_generator: ^0.2.0 copied to clipboard

Converts tweakcn CSS themes into Flutter ThemeData with ColorScheme, ThemeExtension, Google Fonts, and light/dark mode support.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'home_page.dart';
import 'theme/tweakcn_theme.g.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  ThemeMode _themeMode = ThemeMode.light;

  void _toggleTheme() {
    setState(() {
      _themeMode = _themeMode == ThemeMode.light
          ? ThemeMode.dark
          : ThemeMode.light;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'tweakcn Theme Example',
      theme: TweakcnTheme.light,
      darkTheme: TweakcnTheme.dark,
      themeMode: _themeMode,
      home: HomePage(onToggleTheme: _toggleTheme),
    );
  }
}
1
likes
0
points
348
downloads

Publisher

unverified uploader

Weekly Downloads

Converts tweakcn CSS themes into Flutter ThemeData with ColorScheme, ThemeExtension, Google Fonts, and light/dark mode support.

Repository (GitHub)
View/report issues

Topics

#theme #code-generation #css #design-system #shadcn

License

unknown (license)

Dependencies

build, path, yaml

More

Packages that depend on flutter_tweakcn_generator