theme_kit 1.0.2
theme_kit: ^1.0.2 copied to clipboard
Make theming with your custom Design System enjoyable.
import 'package:flutter/material.dart';
import 'package:theme_kit/theme_kit.dart';
sealed class AtomizeText extends TKText {
AtomizeText(super.data, {super.key});
///Returns a Display XL text
///Display M text is used for large texts in large displays.
static TKText displayXL(String data) => TKText(data).styles(
fontSize: 48,
fontWeight: TKFontWeight.bold,
fontFamily: TKFontFamily.inter,
);
}
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Example',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: FirstPage(),
);
}
}
class FirstPage extends StatelessWidget {
const FirstPage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
children: [
AtomizeText.displayXL("Display XL").styles(
color: Colors.red,
fontWeight: TKFontWeight.bold,
),
AtomizeText.displayXL("Display XL 2").styles(
fontFamily: TKFontFamily.inter,
),
],
),
);
}
}