Skip to main content

flawless_material3_theme 0.1.0-alpha.7 copy "flawless_material3_theme: ^0.1.0-alpha.7" to clipboard
flawless_material3_theme: ^0.1.0-alpha.7 copied to clipboard

Material 3 design system implementation for Flawless.

example/flawless_material3_theme_example.dart

import 'package:flutter/material.dart';
import 'package:flawless_material3_theme/flawless_material3_theme.dart';
import 'package:flawless_theme/flawless_theme.dart';

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

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

  @override
  Widget build(BuildContext context) {
    final material3DesignSystem = Material3DesignSystem();
    return MaterialApp(
      theme: createMaterial3Theme(designSystem: material3DesignSystem),
      home: const HomeScreen(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    final ext = Theme.of(context).extension<FlawlessThemeExtension>();
    return Scaffold(
      appBar: AppBar(title: const Text('Material 3 Theme Example')),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Text(
                'Primary color: ${ext?.designSystem.colorScheme.primary ?? "N/A"}'),
            Text(
                'Button border radius: ${ext?.designSystem.componentProperties['button']?.properties['borderRadius'] ?? "N/A"}'),
          ],
        ),
      ),
    );
  }
}
0
likes
150
points
46
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Material 3 design system implementation for Flawless.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#flutter #ui #material3 #theming #design-system

License

MIT (license)

Dependencies

flawless_core, flawless_theme, flutter

More

Packages that depend on flawless_material3_theme