Migration to mih_package_toolkit
This commit is contained in:
@@ -1,140 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class MihColors {
|
||||
bool women4Change = true;
|
||||
static Color getPrimaryColor(bool darkMode) {
|
||||
if (darkMode == true) {
|
||||
return const Color(0XFF3A4454); // Original
|
||||
// return const Color(0XFF6641b2); // Women4change
|
||||
} else {
|
||||
return const Color(0XFFbedcfe); // Original
|
||||
// return const Color(0xFFE0D1FF); // Women4change
|
||||
}
|
||||
}
|
||||
|
||||
static Color getSecondaryColor(bool darkMode) {
|
||||
if (darkMode == true) {
|
||||
return const Color(0XFFbedcfe); // Original
|
||||
// return const Color(0xFFE0D1FF); // Women4change
|
||||
} else {
|
||||
return const Color(0XFF3A4454); // Original
|
||||
// return const Color(0XFF6641b2); // Women4change
|
||||
}
|
||||
}
|
||||
|
||||
static Color getSecondaryInvertedColor(bool darkMode) {
|
||||
if (darkMode == true) {
|
||||
return const Color(0XFF412301); // Original
|
||||
// return const Color(0XFF1f2e00); // Women4change
|
||||
} else {
|
||||
return const Color(0XFFc5bbab); // Original
|
||||
// return const Color(0XFF99be4d); // Women4change
|
||||
}
|
||||
}
|
||||
|
||||
static Color getHighlightColor(bool darkMode) {
|
||||
if (darkMode == true) {
|
||||
return const Color(0XFF9bc7fa);
|
||||
// return const Color(0xFFC8AFFB); // Women4change
|
||||
} else {
|
||||
return const Color(0XFF354866);
|
||||
// return const Color(0XFF6641b2); // Women4change
|
||||
}
|
||||
}
|
||||
|
||||
static Color getGreyColor(bool darkMode) {
|
||||
if (darkMode == true) {
|
||||
return const Color(0XFFc8c8c8);
|
||||
} else {
|
||||
return const Color(0XFF747474);
|
||||
}
|
||||
}
|
||||
|
||||
static Color getGreenColor(bool darkMode) {
|
||||
if (darkMode == true) {
|
||||
return const Color(0xff8ae290);
|
||||
} else {
|
||||
return const Color(0xFF41B349);
|
||||
}
|
||||
}
|
||||
|
||||
static Color getRedColor(bool darkMode) {
|
||||
if (darkMode == true) {
|
||||
return const Color(0xffD87E8B);
|
||||
} else {
|
||||
return const Color(0xffbb3d4f);
|
||||
}
|
||||
}
|
||||
|
||||
static Color getPinkColor(bool darkMode) {
|
||||
if (darkMode == true) {
|
||||
return const Color(0xffdaa2e9);
|
||||
} else {
|
||||
// Add a different shade of pink for light mode
|
||||
return const Color(0xffdaa2e9);
|
||||
}
|
||||
}
|
||||
|
||||
static Color getOrangeColor(bool darkMode) {
|
||||
if (darkMode == true) {
|
||||
return const Color(0xffd69d7d);
|
||||
} else {
|
||||
// Add a different shade of pink for light mode
|
||||
return const Color(0xFFBD7145);
|
||||
}
|
||||
}
|
||||
|
||||
static Color getYellowColor(bool darkMode) {
|
||||
if (darkMode == true) {
|
||||
return const Color(0xfff4e467);
|
||||
} else {
|
||||
// Add a different shade of pink for light mode
|
||||
return const Color(0xffd4af37);
|
||||
}
|
||||
}
|
||||
|
||||
static Color getBluishPurpleColor(bool darkMode) {
|
||||
if (darkMode == true) {
|
||||
return const Color(0xff6e7dcc);
|
||||
} else {
|
||||
// Add a different shade of pink for light mode
|
||||
return const Color(0xFF5567C0);
|
||||
}
|
||||
}
|
||||
|
||||
static Color getPurpleColor(bool darkMode) {
|
||||
if (darkMode == true) {
|
||||
return const Color(0xffb682e7);
|
||||
} else {
|
||||
// Add a different shade of pink for light mode
|
||||
return const Color(0xFF9857D4);
|
||||
}
|
||||
}
|
||||
|
||||
static Color getGoldColor(bool darkMode) {
|
||||
if (darkMode == true) {
|
||||
return const Color(0xFFD4AF37);
|
||||
} else {
|
||||
// Add a different shade of pink for light mode
|
||||
return const Color(0xffFFD700);
|
||||
}
|
||||
}
|
||||
|
||||
static Color getSilverColor(bool darkMode) {
|
||||
if (darkMode == true) {
|
||||
return const Color(0xffC0C0C0);
|
||||
} else {
|
||||
// Add a different shade of pink for light mode
|
||||
return const Color(0xFFA6A6A6);
|
||||
}
|
||||
}
|
||||
|
||||
static Color getBronze(bool darkMode) {
|
||||
if (darkMode == true) {
|
||||
return const Color(0xffB1560F);
|
||||
} else {
|
||||
// Add a different shade of pink for light mode
|
||||
return const Color(0xFFCD7F32);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
||||
import 'package:mih_package_toolkit/mih_package_toolkit.dart';
|
||||
import "package:universal_html/html.dart" as html;
|
||||
|
||||
class MihTheme {
|
||||
@@ -17,66 +17,63 @@ class MihTheme {
|
||||
ThemeData getData(bool bool) {
|
||||
return ThemeData(
|
||||
fontFamily: 'Segoe UI',
|
||||
scaffoldBackgroundColor: MihColors.getPrimaryColor(mode == "Dark"),
|
||||
scaffoldBackgroundColor: MihColors.primary(),
|
||||
colorScheme: ColorScheme(
|
||||
brightness: getBritness(),
|
||||
primary: MihColors.getSecondaryColor(mode == "Dark"),
|
||||
onPrimary: MihColors.getPrimaryColor(mode == "Dark"),
|
||||
secondary: MihColors.getPrimaryColor(mode == "Dark"),
|
||||
onSecondary: MihColors.getSecondaryColor(mode == "Dark"),
|
||||
error: MihColors.getRedColor(mode == "Dark"),
|
||||
onError: MihColors.getPrimaryColor(mode == "Dark"),
|
||||
surface: MihColors.getPrimaryColor(mode == "Dark"),
|
||||
onSurface: MihColors.getSecondaryColor(mode == "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(),
|
||||
),
|
||||
datePickerTheme: DatePickerThemeData(
|
||||
backgroundColor: MihColors.getPrimaryColor(mode == "Dark"),
|
||||
headerBackgroundColor: MihColors.getSecondaryColor(mode == "Dark"),
|
||||
headerForegroundColor: MihColors.getPrimaryColor(mode == "Dark"),
|
||||
backgroundColor: MihColors.primary(),
|
||||
headerBackgroundColor: MihColors.secondary(),
|
||||
headerForegroundColor: MihColors.primary(),
|
||||
),
|
||||
appBarTheme: AppBarTheme(
|
||||
color: MihColors.getSecondaryColor(mode == "Dark"),
|
||||
foregroundColor: MihColors.getPrimaryColor(mode == "Dark"),
|
||||
color: MihColors.secondary(),
|
||||
foregroundColor: MihColors.primary(),
|
||||
titleTextStyle: TextStyle(
|
||||
color: MihColors.getPrimaryColor(mode == "Dark"),
|
||||
color: MihColors.primary(),
|
||||
fontSize: 25,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
floatingActionButtonTheme: FloatingActionButtonThemeData(
|
||||
backgroundColor: MihColors.getSecondaryColor(mode == "Dark"),
|
||||
foregroundColor: MihColors.getPrimaryColor(mode == "Dark"),
|
||||
extendedTextStyle:
|
||||
TextStyle(color: MihColors.getPrimaryColor(mode == "Dark")),
|
||||
backgroundColor: MihColors.secondary(),
|
||||
foregroundColor: MihColors.primary(),
|
||||
extendedTextStyle: TextStyle(color: MihColors.primary()),
|
||||
),
|
||||
drawerTheme: DrawerThemeData(
|
||||
backgroundColor: MihColors.getPrimaryColor(mode == "Dark"),
|
||||
backgroundColor: MihColors.primary(),
|
||||
),
|
||||
textSelectionTheme: TextSelectionThemeData(
|
||||
cursorColor: MihColors.getPrimaryColor(mode == "Dark"),
|
||||
selectionColor:
|
||||
MihColors.getPrimaryColor(mode == "Dark").withOpacity(0.25),
|
||||
selectionHandleColor: MihColors.getPrimaryColor(mode == "Dark"),
|
||||
cursorColor: MihColors.primary(),
|
||||
selectionColor: MihColors.primary().withOpacity(0.25),
|
||||
selectionHandleColor: MihColors.primary(),
|
||||
),
|
||||
tooltipTheme: TooltipThemeData(
|
||||
decoration: BoxDecoration(
|
||||
color: MihColors.getSecondaryColor(mode == "Dark"),
|
||||
color: MihColors.secondary(),
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
border: Border.all(
|
||||
width: 1.0,
|
||||
color: MihColors.getPrimaryColor(mode == "Dark"),
|
||||
color: MihColors.primary(),
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color:
|
||||
MihColors.getPrimaryColor(mode == "Dark").withOpacity(0.18),
|
||||
color: MihColors.primary().withOpacity(0.18),
|
||||
blurRadius: 6,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
],
|
||||
),
|
||||
textStyle: TextStyle(
|
||||
color: MihColors.getPrimaryColor(mode == "Dark"),
|
||||
color: MihColors.primary(),
|
||||
fontSize: 13,
|
||||
height: 1.2,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user