dievas 0.0.4
dievas: ^0.0.4 copied to clipboard
Dievas design system. Flutter theme and component layer.
Dievas #
The Dievas design system.
Flutter theme and component layer.
Built on dievas_tokens for primitive and semantic design tokens.
Features #
- Theme contract —
DievasThemeDatainterface withDievasGlobalThemeDatasealed abstract base for brand themes - Default themes —
DievasLightThemeDataandDievasDarkThemeData - 35+ components — buttons, form inputs, display, feedback, overlays, navigation, and utility widgets
- InheritedModel — efficient sub-system accessors (
context.colors,context.typography, etc.) - Responsive grid —
DievasGridwith breakpoint-aware layout - Localization —
DievasLocalizationsdelegate with context extension
Usage #
import 'package:flutter/material.dart';
import 'package:dievas/dievas.dart';
void main() => runApp(
DievasScope(
lightTheme: DievasLightThemeData(),
darkTheme: DievasDarkThemeData(),
child: const MyApp(),
),
);
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
final colors = context.colors;
return MaterialApp(
theme: context.theme.material,
home: Scaffold(
backgroundColor: colors.background.bgBase,
body: Center(
child: DievasFilledButton(
label: 'Hello Dievas',
onPressed: () {},
),
),
),
);
}
}
License #
MIT