Files
toaster/packages/toaster_ui
mars3142 46c8c38aa7
Test / test (push) Successful in 7m35s
initial commit
Signed-off-by: Peter Siegmund <developer@mars3142.org>
2026-04-18 14:06:56 +02:00
..
2026-04-18 14:06:56 +02:00
2026-04-18 14:06:56 +02:00
2026-04-18 14:06:56 +02:00
2026-04-18 14:06:56 +02:00
2026-04-18 14:06:56 +02:00
2026-04-18 14:06:56 +02:00
2026-04-18 14:06:56 +02:00
2026-04-18 14:06:56 +02:00
2026-04-18 14:06:56 +02:00
2026-04-18 14:06:56 +02:00
2026-04-18 14:06:56 +02:00

Toaster Ui

style: very good analysis Powered by Mason License: MIT

A Very Good Project created by Very Good CLI.

Installation 💻

In order to start using Toaster Ui you must have the Flutter SDK installed on your machine.

Install via flutter pub add:

dart pub add toaster_ui

Features

  • ThemeExtension-based theming — light and dark theme variants with custom color and spacing tokens via ThemeExtension<T>
  • Custom color tokens — semantic colors for success, warning, and info states via AppColors
  • Spacing scale — consistent spacing tokens from xxs to xxlg via AppSpacing
  • BuildContext extensions — shorthand context.appColors and context.appSpacing
  • Example widgetAppButton composing Material's FilledButton and OutlinedButton with app-specific sizing

Usage 🚀

Wrap your app with the theme:

import 'package:toaster_ui/toaster_ui.dart';

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: AppTheme.light,
      darkTheme: AppTheme.dark,
      home: const MyHomePage(),
    );
  }
}

Use widgets and tokens in your app:

AppButton(
  onPressed: () {},
  child: const Text('Click me'),
);

Access custom tokens via context extensions:

final colors = context.appColors;
final spacing = context.appSpacing;

Continuous Integration 🤖

Toaster Ui comes with a built-in GitHub Actions workflow powered by Very Good Workflows but you can also add your preferred CI/CD solution.

Out of the box, on each pull request and push, the CI formats, lints, and tests the code. This ensures the code remains consistent and behaves correctly as you add functionality or make changes. The project uses Very Good Analysis for a strict set of analysis options used by our team. Code coverage is enforced using the Very Good Workflows.


Running Tests 🧪

For first time users, install the very_good_cli:

dart pub global activate very_good_cli

To run all unit tests:

very_good test --coverage

To view the generated coverage report you can use lcov.

# Generate Coverage Report
genhtml coverage/lcov.info -o coverage/

# Open Coverage Report
open coverage/index.html