seedkit_theme 0.0.2
seedkit_theme: ^0.0.2 copied to clipboard
SeedKit theme primitives, ThemeData presets, and theme mode state helpers.
seedkit_theme #
SeedKit theme primitives, ThemeData presets, and theme mode state helpers for
Flutter applications.
Features #
- Builds light and dark
ThemeDatainstances with SeedKit color and text theme extensions. - Provides
SeedKitColorThemeandSeedKitTextThemefor typed access to design tokens. - Includes
ThemeCubit,ThemeRepository, andThemeProviderhelpers for storing and switching the selected theme mode. - Adds
BuildContextextensions for convenient theme access.
Getting started #
Add the package to your pubspec.yaml:
dependencies:
seedkit_theme: ^0.0.2
Then run:
flutter pub get
Usage #
Create a theme module and pass its themes to MaterialApp:
import 'package:flutter/material.dart';
import 'package:seedkit_theme/seedkit_theme.dart';
final seedKitTheme = SeedKitThemeModule(
primaryColor: const Color(0xFF4345C3),
fontFamily: 'Inter',
);
MaterialApp(
theme: seedKitTheme.light,
darkTheme: seedKitTheme.dark,
themeMode: ThemeMode.system,
);
Access SeedKit theme extensions from a widget:
import 'package:flutter/widgets.dart';
import 'package:seedkit_theme/seedkit_theme.dart';
class TitleText extends StatelessWidget {
const TitleText({super.key});
@override
Widget build(BuildContext context) {
return Text(
'SeedKit',
style: context.textTheme.heading1,
);
}
}
Additional information #
This package is part of the SeedKit ecosystem.