mega_ui_kit 0.0.12
mega_ui_kit: ^0.0.12 copied to clipboard
Flutter UI kit with themeable semantic colors (MegaColorScheme), design tokens, and Mega-aligned widgets. Brand colors are provided by your app — see example.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:mega_ui_kit/mega_ui_kit.dart';
import 'package:mega_ui_kit_example/kitchen_sink_page.dart';
import 'package:mega_ui_kit_example/theme/mega_brand_colors.dart';
void main() {
runApp(const MegaKitchenSinkApp());
}
class MegaKitchenSinkApp extends StatefulWidget {
const MegaKitchenSinkApp({super.key});
@override
State<MegaKitchenSinkApp> createState() => _MegaKitchenSinkAppState();
}
class _MegaKitchenSinkAppState extends State<MegaKitchenSinkApp> {
ThemeMode _themeMode = ThemeMode.light;
void _toggleTheme() {
setState(() {
_themeMode =
_themeMode == ThemeMode.light ? ThemeMode.dark : ThemeMode.light;
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'MegaUIKit',
theme: MegaTheme.light(colors: MegaBrandColors.light),
darkTheme: MegaTheme.dark(colors: MegaBrandColors.dark),
themeMode: _themeMode,
debugShowCheckedModeBanner: false,
home: KitchenSinkPage(
onToggleTheme: _toggleTheme,
themeMode: _themeMode,
),
);
}
}