Use MihColor Across MIH

This commit is contained in:
2025-08-14 15:26:26 +02:00
parent 726c6f5213
commit 96d913629a
119 changed files with 4018 additions and 2968 deletions

View File

@@ -77,7 +77,8 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
Icon(
Icons.currency_exchange,
size: 150,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
const SizedBox(height: 20),
FittedBox(
@@ -87,8 +88,8 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
style: TextStyle(
fontSize: 30,
fontWeight: FontWeight.bold,
color:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
),
),
@@ -103,9 +104,9 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
style: TextStyle(
fontSize: 30,
fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
),
@@ -117,9 +118,9 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
style: TextStyle(
fontSize: 30,
fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
),
@@ -136,9 +137,9 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
style: TextStyle(
fontSize: 30,
fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
),
@@ -150,9 +151,9 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
style: TextStyle(
fontSize: 30,
fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
),
@@ -187,7 +188,8 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 25,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold,
),
),
@@ -207,7 +209,8 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
'$companyName makes no representations or warranties of any kind, express or implied, as to the accuracy, completeness, reliability, or suitability of the information and calculations generated by the Tool. All exchange rates and results are estimates and are subject to change without notice.',
style: TextStyle(
fontSize: 15,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.normal,
),
),
@@ -218,7 +221,8 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
'The information provided by the Tool should not be construed as financial, investment, trading, or any other form of advice. You should not make any financial decisions based solely on the output of this Tool. We expressly recommend that you seek independent professional advice and verify all data with a qualified financial advisor and/or through alternative, reliable market data sources before executing any foreign exchange transactions.',
style: TextStyle(
fontSize: 15,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.normal,
),
),
@@ -229,7 +233,8 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
'By using the Tool, you agree that $companyName, its affiliates, directors, and employees shall not be held liable for any direct, indirect, incidental, special, consequential, or exemplary damages, including but not limited to, damages for loss of profits, goodwill, use, data, or other intangible losses, resulting from: (i) the use or the inability to use the Tool; (ii) any inaccuracies, errors, or omissions in the Tool\'s calculations or data; or (iii) any reliance placed by you on the information provided by the Tool.',
style: TextStyle(
fontSize: 15,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.normal,
),
),
@@ -244,7 +249,8 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
text: TextSpan(
style: TextStyle(
fontSize: 15,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.normal,
),
children: <TextSpan>[
@@ -301,12 +307,12 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
formKey: _formKey,
formFields: <Widget>[
MihTextFormField(
fillColor: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
inputColor: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
controller: _fromAmountController,
multiLineInput: false,
requiredText: true,
@@ -346,9 +352,9 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
text: TextSpan(
style: TextStyle(
fontSize: 15,
color: MzansiInnovationHub.of(context)!
.theme
.errorColor(),
color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
children: [
const TextSpan(
@@ -358,9 +364,11 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
text: "Diclaimer",
style: TextStyle(
decoration: TextDecoration.underline,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
fontWeight: FontWeight.bold,
),
recognizer: TapGestureRecognizer()
@@ -389,16 +397,20 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
.formNotFilledCompletely(context);
}
},
buttonColor: MzansiInnovationHub.of(context)!
.theme
.successColor(),
buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
width: 300,
child: Text(
"Calculate",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -408,16 +420,20 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
onPressed: () {
clearInput();
},
buttonColor: MzansiInnovationHub.of(context)!
.theme
.errorColor(),
buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
width: 300,
child: Text(
"Clear",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -437,7 +453,9 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
child: Text(
"Error pulling Currency Exchange Data.",
style: TextStyle(
fontSize: 25, color: MihColors.getRedColor(context)),
fontSize: 25,
color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark")),
textAlign: TextAlign.center,
),
);

View File

@@ -108,8 +108,8 @@ class _SimpleCalcState extends State<SimpleCalc> {
userInput,
style: TextStyle(
fontSize: 40,
color:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
),
),
@@ -123,8 +123,8 @@ class _SimpleCalcState extends State<SimpleCalc> {
answer,
style: TextStyle(
fontSize: 30,
color:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold),
),
),
@@ -159,16 +159,18 @@ class _SimpleCalcState extends State<SimpleCalc> {
answer = '0';
});
},
buttonColor: const Color.fromRGBO(214, 171, 255, 1),
buttonColor: MihColors.getPurpleColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 50,
height: 50,
borderRadius: 5,
child: Text(
buttons[index],
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -187,18 +189,18 @@ class _SimpleCalcState extends State<SimpleCalc> {
userInput += buttons[index];
});
},
buttonColor: MzansiInnovationHub.of(context)!
.theme
.messageTextColor(),
buttonColor: MihColors.getGreyColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 50,
height: 50,
borderRadius: 5,
child: Text(
buttons[index],
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -216,18 +218,18 @@ class _SimpleCalcState extends State<SimpleCalc> {
userInput += buttons[index];
});
},
buttonColor: MzansiInnovationHub.of(context)!
.theme
.messageTextColor(),
buttonColor: MihColors.getGreyColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 50,
height: 50,
borderRadius: 5,
child: Text(
buttons[index],
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -256,18 +258,18 @@ class _SimpleCalcState extends State<SimpleCalc> {
});
}
},
buttonColor: MzansiInnovationHub.of(context)!
.theme
.messageTextColor(),
buttonColor: MihColors.getGreyColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 50,
height: 50,
borderRadius: 5,
child: Text(
buttons[index],
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -296,15 +298,17 @@ class _SimpleCalcState extends State<SimpleCalc> {
equalPressed();
});
},
buttonColor: MihColors.getRedColor(context),
buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 50,
height: 50,
borderRadius: 5,
child: Icon(
Icons.backspace,
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
);
@@ -320,16 +324,18 @@ class _SimpleCalcState extends State<SimpleCalc> {
userInput = answer;
});
},
buttonColor: MihColors.getGreenColor(context),
buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 50,
height: 50,
borderRadius: 5,
child: Text(
buttons[index],
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -348,18 +354,18 @@ class _SimpleCalcState extends State<SimpleCalc> {
equalPressed();
});
},
buttonColor: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
buttonColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 50,
height: 50,
borderRadius: 5,
child: Text(
buttons[index],
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),

View File

@@ -111,8 +111,8 @@ class _TipCalcState extends State<TipCalc> {
children: [
FaIcon(
FontAwesomeIcons.coins,
color:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35,
),
const SizedBox(width: 15),
@@ -122,8 +122,8 @@ class _TipCalcState extends State<TipCalc> {
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
color:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
),
],
@@ -134,7 +134,8 @@ class _TipCalcState extends State<TipCalc> {
style: TextStyle(
fontSize: 30,
fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
),
const Divider(),
@@ -144,8 +145,8 @@ class _TipCalcState extends State<TipCalc> {
children: [
FaIcon(
FontAwesomeIcons.moneyBills,
color:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35,
),
const SizedBox(width: 15),
@@ -155,8 +156,8 @@ class _TipCalcState extends State<TipCalc> {
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
color:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
),
],
@@ -167,7 +168,8 @@ class _TipCalcState extends State<TipCalc> {
style: TextStyle(
fontSize: 30,
fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
),
Text(
@@ -176,7 +178,8 @@ class _TipCalcState extends State<TipCalc> {
style: TextStyle(
fontSize: 30,
fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
),
if (splitBillController.text == "Yes") const Divider(),
@@ -187,8 +190,8 @@ class _TipCalcState extends State<TipCalc> {
children: [
FaIcon(
FontAwesomeIcons.peopleGroup,
color:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35,
),
const SizedBox(width: 15),
@@ -198,9 +201,9 @@ class _TipCalcState extends State<TipCalc> {
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
],
@@ -212,8 +215,8 @@ class _TipCalcState extends State<TipCalc> {
style: TextStyle(
fontSize: 30,
fontWeight: FontWeight.bold,
color:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
),
if (splitBillController.text == "Yes")
@@ -223,8 +226,8 @@ class _TipCalcState extends State<TipCalc> {
style: TextStyle(
fontSize: 30,
fontWeight: FontWeight.bold,
color:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
),
SizedBox(height: 10),
@@ -268,10 +271,10 @@ class _TipCalcState extends State<TipCalc> {
formKey: _formKey,
formFields: [
MihTextFormField(
fillColor:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
inputColor:
MzansiInnovationHub.of(context)!.theme.primaryColor(),
fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: billAmountController,
multiLineInput: false,
requiredText: true,
@@ -283,10 +286,10 @@ class _TipCalcState extends State<TipCalc> {
),
const SizedBox(height: 10),
MihTextFormField(
fillColor:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
inputColor:
MzansiInnovationHub.of(context)!.theme.primaryColor(),
fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: tipPercentageController,
multiLineInput: false,
requiredText: true,
@@ -300,10 +303,10 @@ class _TipCalcState extends State<TipCalc> {
MihToggle(
hintText: "Split Bill",
initialPostion: splitPosition,
fillColor:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
secondaryFillColor:
MzansiInnovationHub.of(context)!.theme.primaryColor(),
fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
secondaryFillColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onChange: (value) {
setState(() {
splitBillController.text = value ? "Yes" : "No";
@@ -340,12 +343,12 @@ class _TipCalcState extends State<TipCalc> {
children: [
MihNumericStepper(
controller: noPeopleController,
fillColor: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
inputColor: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
hintText: "No. People",
requiredText: temp == "Yes",
minValue: 2,
@@ -393,14 +396,16 @@ class _TipCalcState extends State<TipCalc> {
MihAlertServices().formNotFilledCompletely(context);
}
},
buttonColor: MihColors.getGreenColor(context),
buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 300,
child: Text(
"Calculate",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -410,14 +415,16 @@ class _TipCalcState extends State<TipCalc> {
onPressed: () {
clearInput();
},
buttonColor: MihColors.getRedColor(context),
buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 300,
child: Text(
"Clear",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),