Merge pull request #204 from yaso-meth/QOL--Buton-Color-standardisation

QOL--Buton-Color-standardisation
This commit is contained in:
yaso-meth
2025-06-12 13:03:09 +02:00
committed by GitHub
28 changed files with 66 additions and 79 deletions

View File

@@ -100,7 +100,7 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
MihButton( MihButton(
onPressed: widget.onTap, onPressed: widget.onTap,
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.errorColor(),
width: 300, width: 300,
child: Text( child: Text(
"Delete", "Delete",
@@ -185,7 +185,7 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
MihButton( MihButton(
onPressed: widget.onTap, onPressed: widget.onTap,
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.errorColor(),
width: 300, width: 300,
child: Text( child: Text(
"Delete", "Delete",
@@ -271,7 +271,7 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
MihButton( MihButton(
onPressed: widget.onTap, onPressed: widget.onTap,
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.errorColor(),
width: 300, width: 300,
child: Text( child: Text(
"Delete", "Delete",
@@ -356,7 +356,7 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
MihButton( MihButton(
onPressed: widget.onTap, onPressed: widget.onTap,
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.errorColor(),
width: 300, width: 300,
child: Text( child: Text(
"Delete", "Delete",
@@ -441,7 +441,7 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
MihButton( MihButton(
onPressed: widget.onTap, onPressed: widget.onTap,
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.errorColor(),
width: 300, width: 300,
child: Text( child: Text(
"Delete", "Delete",

View File

@@ -71,7 +71,7 @@ class _MihAttributesState extends State<MihAttributes> {
); );
}, },
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.successColor(),
width: 100, width: 100,
child: Text( child: Text(
"Visit", "Visit",

View File

@@ -515,9 +515,8 @@ class _MihInfoState extends State<MihInfo> {
onPressed: () { onPressed: () {
MihInstallServices().installMihTrigger(context); MihInstallServices().installMihTrigger(context);
}, },
buttonColor: MzanziInnovationHub.of(context)! buttonColor:
.theme MzanziInnovationHub.of(context)!.theme.successColor(),
.secondaryColor(),
width: 300, width: 300,
child: Text( child: Text(
getInstallButtonText(), getInstallButtonText(),
@@ -538,9 +537,8 @@ class _MihInfoState extends State<MihInfo> {
), ),
); );
}, },
buttonColor: MzanziInnovationHub.of(context)! buttonColor:
.theme MzanziInnovationHub.of(context)!.theme.successColor(),
.secondaryColor(),
width: 300, width: 300,
child: Text( child: Text(
"MIH Beginners Guide", "MIH Beginners Guide",

View File

@@ -249,7 +249,7 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
updateAccessAPICall(index, "declined"); updateAccessAPICall(index, "declined");
}, },
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.errorColor(),
width: 300, width: 300,
child: Text( child: Text(
"Decline", "Decline",
@@ -267,7 +267,7 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
updateAccessAPICall(index, "approved"); updateAccessAPICall(index, "approved");
}, },
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Approve", "Approve",

View File

@@ -355,9 +355,8 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
context, context,
); );
}, },
buttonColor: MzanziInnovationHub.of(context)! buttonColor:
.theme MzanziInnovationHub.of(context)!.theme.errorColor(),
.secondaryColor(),
width: 300, width: 300,
child: Text( child: Text(
"Decline", "Decline",
@@ -383,9 +382,8 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
context, context,
); );
}, },
buttonColor: MzanziInnovationHub.of(context)! buttonColor:
.theme MzanziInnovationHub.of(context)!.theme.successColor(),
.secondaryColor(),
width: 300, width: 300,
child: Text( child: Text(
"Approve", "Approve",

View File

@@ -138,7 +138,7 @@ class _BiometricCheckState extends State<BiometricCheck> {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.successColor(), MzanziInnovationHub.of(context)!.theme.secondaryColor(),
width: 300, width: 300,
child: Text( child: Text(
"Set Up Authentication", "Set Up Authentication",
@@ -156,7 +156,7 @@ class _BiometricCheckState extends State<BiometricCheck> {
authenticateUser(); authenticateUser();
}, },
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Authenticate Now", "Authenticate Now",
@@ -229,7 +229,7 @@ class _BiometricCheckState extends State<BiometricCheck> {
authenticateUser(); authenticateUser();
}, },
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Authenticate Now", "Authenticate Now",

View File

@@ -122,7 +122,7 @@ class _ForgotPasswordState extends State<ForgotPassword> {
validateInput(); validateInput();
}, },
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Continue", "Continue",
@@ -288,7 +288,7 @@ class _ForgotPasswordState extends State<ForgotPassword> {
}, },
buttonColor: MzanziInnovationHub.of(context)! buttonColor: MzanziInnovationHub.of(context)!
.theme .theme
.secondaryColor(), .successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Reset Password", "Reset Password",

View File

@@ -239,8 +239,7 @@ class _RegisterState extends State<Register> {
onPressed: () { onPressed: () {
MihInstallServices().installMihTrigger(context); MihInstallServices().installMihTrigger(context);
}, },
buttonColor: buttonColor: MzanziInnovationHub.of(context)!.theme.successColor(),
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
width: 150, width: 150,
child: Text( child: Text(
"Install MIH", "Install MIH",

View File

@@ -290,7 +290,7 @@ class _ResetPasswordState extends State<ResetPassword> {
}, },
buttonColor: MzanziInnovationHub.of(context)! buttonColor: MzanziInnovationHub.of(context)!
.theme .theme
.secondaryColor(), .successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Reset Password", "Reset Password",

View File

@@ -305,8 +305,7 @@ class _SignInState extends State<SignIn> {
onPressed: () { onPressed: () {
MihInstallServices().installMihTrigger(context); MihInstallServices().installMihTrigger(context);
}, },
buttonColor: buttonColor: MzanziInnovationHub.of(context)!.theme.successColor(),
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
width: 150, width: 150,
child: Text( child: Text(
"Install MIH", "Install MIH",
@@ -512,7 +511,7 @@ class _SignInState extends State<SignIn> {
buttonColor: buttonColor:
MzanziInnovationHub.of(context)! MzanziInnovationHub.of(context)!
.theme .theme
.secondaryColor(), .successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Sign In", "Sign In",
@@ -530,7 +529,7 @@ class _SignInState extends State<SignIn> {
buttonColor: buttonColor:
MzanziInnovationHub.of(context)! MzanziInnovationHub.of(context)!
.theme .theme
.successColor(), .secondaryColor(),
width: 300, width: 300,
child: Text( child: Text(
"Create New Account", "Create New Account",

View File

@@ -257,9 +257,8 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
MihAlertServices().formNotFilledCompletely(context); MihAlertServices().formNotFilledCompletely(context);
} }
}, },
buttonColor: MzanziInnovationHub.of(context)! buttonColor:
.theme MzanziInnovationHub.of(context)!.theme.successColor(),
.secondaryColor(),
width: 300, width: 300,
child: Text( child: Text(
"Update", "Update",

View File

@@ -215,7 +215,7 @@ class _BuildUserListState extends State<BuildUserList> {
}, },
buttonColor: MzanziInnovationHub.of(context)! buttonColor: MzanziInnovationHub.of(context)!
.theme .theme
.secondaryColor(), .successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Add", "Add",

View File

@@ -416,7 +416,7 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
), ),
], ],
), ),
const SizedBox(height: 15), const SizedBox(height: 25),
Center( Center(
child: MihButton( child: MihButton(
onPressed: () { onPressed: () {
@@ -427,7 +427,7 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
} }
}, },
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Update", "Update",

View File

@@ -375,7 +375,7 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
} }
}, },
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Update", "Update",

View File

@@ -525,7 +525,7 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
}, },
buttonColor: MzanziInnovationHub.of(context)! buttonColor: MzanziInnovationHub.of(context)!
.theme .theme
.secondaryColor(), .successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Add", "Add",

View File

@@ -382,7 +382,7 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
} }
}, },
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Update", "Update",

View File

@@ -83,7 +83,7 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
Navigator.pop(context); Navigator.pop(context);
}, },
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.errorColor(), MzanziInnovationHub.of(context)!.theme.successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Cancel", "Cancel",

View File

@@ -141,9 +141,8 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
MihAlertServices().formNotFilledCompletely(context); MihAlertServices().formNotFilledCompletely(context);
} }
}, },
buttonColor: MzanziInnovationHub.of(context)! buttonColor:
.theme MzanziInnovationHub.of(context)!.theme.successColor(),
.secondaryColor(),
width: 300, width: 300,
child: Text( child: Text(
"Update", "Update",
@@ -191,9 +190,10 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
barrierDismissible: false, barrierDismissible: false,
builder: (context) { builder: (context) {
return MihPackageAlert( return MihPackageAlert(
alertColour: MzanziInnovationHub.of(context)!.theme.successColor(),
alertIcon: Icon( alertIcon: Icon(
Icons.favorite, Icons.favorite,
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(), color: MzanziInnovationHub.of(context)!.theme.successColor(),
size: 100, size: 100,
), ),
alertTitle: "Add to Favourites", alertTitle: "Add to Favourites",
@@ -224,7 +224,7 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
); );
}, },
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Add", "Add",
@@ -238,7 +238,6 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
), ),
], ],
), ),
alertColour: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
); );
}, },
); );
@@ -250,9 +249,10 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
barrierDismissible: false, barrierDismissible: false,
builder: (context) { builder: (context) {
return MihPackageAlert( return MihPackageAlert(
alertColour: MzanziInnovationHub.of(context)!.theme.errorColor(),
alertIcon: Icon( alertIcon: Icon(
Icons.favorite_border, Icons.favorite_border,
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(), color: MzanziInnovationHub.of(context)!.theme.errorColor(),
size: 100, size: 100,
), ),
alertTitle: "Remove From Favourites", alertTitle: "Remove From Favourites",
@@ -283,7 +283,7 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
); );
}, },
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.errorColor(),
width: 300, width: 300,
child: Text( child: Text(
"Remove", "Remove",
@@ -297,7 +297,6 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
), ),
], ],
), ),
alertColour: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
); );
}, },
); );

View File

@@ -125,9 +125,8 @@ class _MihBarcodeScannerState extends State<MihBarcodeScanner>
_scannerController.stop(); _scannerController.stop();
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
buttonColor: MzanziInnovationHub.of(context)! buttonColor:
.theme MzanziInnovationHub.of(context)!.theme.errorColor(),
.secondaryColor(),
width: 100, width: 100,
height: 50, height: 50,
child: Text( child: Text(

View File

@@ -269,9 +269,8 @@ class _MihCardsState extends State<MihCards> {
MihAlertServices().formNotFilledCompletely(context); MihAlertServices().formNotFilledCompletely(context);
} }
}, },
buttonColor: MzanziInnovationHub.of(context)! buttonColor:
.theme MzanziInnovationHub.of(context)!.theme.successColor(),
.secondaryColor(),
width: 300, width: 300,
child: Text( child: Text(
"Add", "Add",

View File

@@ -441,7 +441,7 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
}, },
buttonColor: MzanziInnovationHub.of(context)! buttonColor: MzanziInnovationHub.of(context)!
.theme .theme
.secondaryColor(), .successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Re-apply", "Re-apply",

View File

@@ -190,9 +190,8 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
MihAlertServices().formNotFilledCompletely(context); MihAlertServices().formNotFilledCompletely(context);
} }
}, },
buttonColor: MzanziInnovationHub.of(context)! buttonColor:
.theme MzanziInnovationHub.of(context)!.theme.successColor(),
.secondaryColor(),
width: 300, width: 300,
child: Text( child: Text(
"Book Appointment", "Book Appointment",
@@ -323,9 +322,8 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
onPressed: () { onPressed: () {
appointmentPopUp(index, width); appointmentPopUp(index, width);
}, },
buttonColor: MzanziInnovationHub.of(context)! buttonColor:
.theme MzanziInnovationHub.of(context)!.theme.successColor(),
.secondaryColor(),
width: 300, width: 300,
child: Text( child: Text(
"Book Appointment", "Book Appointment",
@@ -350,8 +348,9 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
"business", "business",
)); ));
}, },
buttonColor: buttonColor: MzanziInnovationHub.of(context)!
MzanziInnovationHub.of(context)!.theme.successColor(), .theme
.secondaryColor(),
width: 300, width: 300,
child: Text( child: Text(
"View Medical Records", "View Medical Records",

View File

@@ -223,7 +223,7 @@ class _WaitingRoomState extends State<WaitingRoom> {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Existing Patient", "Existing Patient",
@@ -242,7 +242,7 @@ class _WaitingRoomState extends State<WaitingRoom> {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Existing MIH User", "Existing MIH User",
@@ -261,7 +261,7 @@ class _WaitingRoomState extends State<WaitingRoom> {
addAppointmentWindow(width); addAppointmentWindow(width);
}, },
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Skeleton Appointment", "Skeleton Appointment",

View File

@@ -384,7 +384,7 @@ class _ClaimStatementWindowState extends State<ClaimStatementWindow> {
} }
}, },
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Generate", "Generate",

View File

@@ -210,9 +210,8 @@ class _PatientConsultationState extends State<PatientConsultation> {
MihAlertServices().formNotFilledCompletely(context); MihAlertServices().formNotFilledCompletely(context);
} }
}, },
buttonColor: MzanziInnovationHub.of(context)! buttonColor:
.theme MzanziInnovationHub.of(context)!.theme.successColor(),
.secondaryColor(),
width: 300, width: 300,
child: Text( child: Text(
"Add Note", "Add Note",

View File

@@ -392,7 +392,7 @@ class _PatientDocumentsState extends State<PatientDocuments> {
} }
}, },
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Generate", "Generate",

View File

@@ -448,7 +448,7 @@ class _AddPatientState extends State<AddPatient> {
} }
}, },
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Add", "Add",

View File

@@ -280,9 +280,8 @@ class _EditPatientState extends State<EditPatient> {
), ),
MihButton( MihButton(
onPressed: deletePatientApiCall, onPressed: deletePatientApiCall,
buttonColor: MzanziInnovationHub.of(context)! buttonColor:
.theme MzanziInnovationHub.of(context)!.theme.errorColor(),
.secondaryColor(),
width: 300, width: 300,
child: Text( child: Text(
"Delete", "Delete",
@@ -662,7 +661,7 @@ class _EditPatientState extends State<EditPatient> {
} }
}, },
buttonColor: buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Update", "Update",