fabrik_theme 0.1.1 copy "fabrik_theme: ^0.1.1" to clipboard
fabrik_theme: ^0.1.1 copied to clipboard

A foundational theme system for Flutter apps, built on design tokens.

example/lib/main.dart

import 'package:fabrik_theme/fabrik_theme.dart';
import 'package:flutter/material.dart';

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

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

  @override
  Widget build(BuildContext context) {
    final colors = FabrikColors.custom(
      lightPrimary: Colors.green,
      darkPrimary: Colors.greenAccent,
    );

    return MaterialApp(
      title: 'Flutter Demo',
      themeMode: ThemeMode.system,
      theme: FabrikThemeBuilder.light(fontFamily: 'Roboto', colors: colors),
      darkTheme: FabrikThemeBuilder.dark(fontFamily: 'Roboto', colors: colors),
      home: const HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    final theme = FabrikTheme.of(context);

    return Scaffold(
      appBar: AppBar(title: const Text('Fabrik Theme Example')),
      body: Center(
        child: Column(
          spacing: FabrikSpacing.x5,
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Text(
              'Hello, Fabrik!',
              style: theme.typography.titleXL,
              textScaler: FabrikTextScaler.linear(context),
            ),
            Text(
              'This is a sample text using Fabrik Typography.',
              style: theme.typography.bodyLarge.copyWith(
                color: theme.colors.primary,
              ),
            ),
          ],
        ),
      ),
    );
  }
}
2
likes
160
points
25
downloads

Publisher

verified publisherfabriktool.com

Weekly Downloads

A foundational theme system for Flutter apps, built on design tokens.

Homepage
Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on fabrik_theme