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

@@ -94,7 +94,8 @@ class _PatientAccessRequestState extends State<Appointments> {
Icon(
MihIcons.calendar,
size: 165,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
const SizedBox(height: 10),
Text(
@@ -104,7 +105,8 @@ class _PatientAccessRequestState extends State<Appointments> {
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
),
const SizedBox(height: 25),
@@ -115,8 +117,8 @@ class _PatientAccessRequestState extends State<Appointments> {
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.normal,
color:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
children: [
TextSpan(text: "Press "),
@@ -125,9 +127,9 @@ class _PatientAccessRequestState extends State<Appointments> {
child: Icon(
Icons.menu,
size: 20,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
TextSpan(
@@ -150,7 +152,7 @@ class _PatientAccessRequestState extends State<Appointments> {
// "No Appointments for $selectedDay",
// style: TextStyle(
// fontSize: 25,
// color: MzansiInnovationHub.of(context)!.theme.messageTextColor(),
// color: MihColors.getGreyColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ),
// textAlign: TextAlign.center,
// softWrap: true,
@@ -186,11 +188,12 @@ class _PatientAccessRequestState extends State<Appointments> {
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: _appointmentTitleController,
multiLineInput: false,
requiredText: true,
@@ -219,11 +222,12 @@ class _PatientAccessRequestState extends State<Appointments> {
),
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: _appointmentDescriptionIDController,
multiLineInput: true,
height: 250,
@@ -243,14 +247,16 @@ class _PatientAccessRequestState extends State<Appointments> {
MihAlertServices().formNotFilledCompletely(context);
}
},
buttonColor: MihColors.getGreenColor(context),
buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 300,
child: Text(
"Add",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -354,7 +360,7 @@ class _PatientAccessRequestState extends State<Appointments> {
});
}),
// Divider(
// color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
// color: MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ),
Row(
mainAxisSize: MainAxisSize.max,
@@ -376,9 +382,11 @@ class _PatientAccessRequestState extends State<Appointments> {
"Error pulling appointments",
style: TextStyle(
fontSize: 25,
color: MzansiInnovationHub.of(context)!
.theme
.errorColor()),
color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark")),
textAlign: TextAlign.center,
),
);
@@ -399,15 +407,19 @@ class _PatientAccessRequestState extends State<Appointments> {
SpeedDialChild(
child: Icon(
Icons.add,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
label: "Add Appointment",
labelBackgroundColor: MihColors.getGreenColor(context),
labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold,
),
backgroundColor: MihColors.getGreenColor(context),
backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () {
addAppointmentWindow(width);
},