tooklit update pt1

This commit is contained in:
2026-03-20 09:35:49 +02:00
parent 865d9997e1
commit 98e9beb1cb
11 changed files with 191 additions and 41 deletions

View File

@@ -18,20 +18,20 @@ class _MyAppState extends State<MyApp> {
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
scaffoldBackgroundColor: MihColors.primary(),
colorScheme: ColorScheme(
brightness: Brightness.dark,
primary: MihColors.secondary(),
onPrimary: MihColors.primary(),
secondary: MihColors.primary(),
onSecondary: MihColors.secondary(),
error: MihColors.red(),
onError: MihColors.primary(),
surface: MihColors.primary(),
onSurface: MihColors.secondary(),
),
),
// theme: ThemeData(
// scaffoldBackgroundColor: MihColors.primary(),
// colorScheme: ColorScheme(
// brightness: Brightness.dark,
// primary: MihColors.secondary(),
// onPrimary: MihColors.primary(),
// secondary: MihColors.primary(),
// onSecondary: MihColors.secondary(),
// error: MihColors.red(),
// onError: MihColors.primary(),
// surface: MihColors.primary(),
// onSurface: MihColors.secondary(),
// ),
// ),
home: const HomePage(),
);
}

View File

@@ -25,6 +25,8 @@ class _ExamplePackageState extends State<ExamplePackage> {
@override
Widget build(BuildContext context) {
return MihPackage(
backgroundColor: MihColors.primary(),
titleColor: MihColors.secondary(),
packageActionButton: actionButton(),
packageTools: tools(),
packageToolBodies: toolBodies(),
@@ -40,6 +42,7 @@ class _ExamplePackageState extends State<ExamplePackage> {
Widget actionButton() {
return MihPackageAction(
iconColor: MihColors.secondary(),
icon: Icon(Icons.arrow_back),
iconSize: 35,
onTap: () {
@@ -65,7 +68,12 @@ class _ExamplePackageState extends State<ExamplePackage> {
selectedbodyIndex = 1;
});
};
return MihPackageTools(tools: temp, selectedIndex: selectedbodyIndex);
return MihPackageTools(
toolColor: MihColors.green(),
onSelectedIconColor: MihColors.primary(),
tools: temp,
selectedIndex: selectedbodyIndex,
);
}
List<Widget> toolBodies() {