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

@@ -162,15 +162,19 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
SpeedDialChild(
child: Icon(
Icons.delete,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
label: "Delete Employee",
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: () {
showDeleteWarning(index);
},
@@ -190,10 +194,10 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
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: fnameController,
multiLineInput: false,
requiredText: true,
@@ -202,10 +206,10 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
),
const SizedBox(height: 10.0),
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: lnameController,
multiLineInput: false,
requiredText: true,
@@ -256,14 +260,16 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
MihAlertServices().formNotFilledCompletely(context);
}
},
buttonColor: MihColors.getGreenColor(context),
buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 300,
child: Text(
"Update",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -307,7 +313,8 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
physics: const NeverScrollableScrollPhysics(),
separatorBuilder: (BuildContext context, index) {
return Divider(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
);
},
itemCount: widget.employees.length,
@@ -325,7 +332,8 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
subtitle: Text(
"${widget.employees[index].username}\n${widget.employees[index].email}\nAccess: ${widget.employees[index].access}",
style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
),
onTap: () {

View File

@@ -1,6 +1,7 @@
import 'dart:convert';
import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
@@ -142,12 +143,12 @@ class _BuildUserListState extends State<BuildUserList> {
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: usernameController,
multiLineInput: false,
requiredText: true,
@@ -156,12 +157,12 @@ class _BuildUserListState extends State<BuildUserList> {
),
const SizedBox(height: 10.0),
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: emailController,
multiLineInput: false,
requiredText: true,
@@ -213,16 +214,16 @@ class _BuildUserListState extends State<BuildUserList> {
.formNotFilledCompletely(context);
}
},
buttonColor: MzansiInnovationHub.of(context)!
.theme
.successColor(),
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,
),
@@ -256,7 +257,8 @@ class _BuildUserListState extends State<BuildUserList> {
physics: const NeverScrollableScrollPhysics(),
separatorBuilder: (BuildContext context, index) {
return Divider(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
);
},
itemCount: widget.users.length,
@@ -271,7 +273,8 @@ class _BuildUserListState extends State<BuildUserList> {
subtitle: Text(
"Email: ${hideEmail(widget.users[index].email)}",
style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
),
onTap: () {

View File

@@ -62,11 +62,13 @@ class _MihAddBookmarkAlertState extends State<MihAddBookmarkAlert> {
@override
Widget build(BuildContext context) {
return MihPackageAlert(
alertColour: MihColors.getSecondaryColor(context),
alertColour: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
alertIcon: Icon(
Icons.warning_rounded,
size: 100,
color: MihColors.getSecondaryColor(context),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
alertTitle: "Bookmark Business",
alertBody: Column(
@@ -74,7 +76,8 @@ class _MihAddBookmarkAlertState extends State<MihAddBookmarkAlert> {
Text(
"Are you sure you want to save ${widget.business.Name} to your Mzansi Directory?",
style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 15,
),
),
@@ -88,12 +91,13 @@ class _MihAddBookmarkAlertState extends State<MihAddBookmarkAlert> {
onPressed: () async {
Navigator.of(context).pop();
},
buttonColor: MihColors.getRedColor(context),
buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
child: Text(
"Cancel",
style: TextStyle(
color:
MzansiInnovationHub.of(context)!.theme.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -104,12 +108,13 @@ class _MihAddBookmarkAlertState extends State<MihAddBookmarkAlert> {
onPressed: () {
addBookmark(widget.business.business_id);
},
buttonColor: MihColors.getGreenColor(context),
buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
child: Text(
"Bookmark Business",
style: TextStyle(
color:
MzansiInnovationHub.of(context)!.theme.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),

View File

@@ -35,7 +35,8 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
RedactedConfiguration getRedactedConfiguration() {
return RedactedConfiguration(
// redactedColor: Colors.pink,
redactedColor: MzansiInnovationHub.of(context)!.theme.primaryColor(),
redactedColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
);
}
@@ -52,7 +53,8 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
alertIcon: Icon(
Icons.warning_rounded,
size: 100,
color: MihColors.getRedColor(context),
color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
alertTitle: "Error Making Call",
alertBody: Column(
@@ -60,15 +62,16 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Text(
"We couldn't open your phone app to call ${widget.business.contact_no}. To fix this, make sure you have a phone application installed and it's set as your default dialer.",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 15,
),
),
],
),
alertColour: MihColors.getRedColor(context),
alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
);
});
}
@@ -102,7 +105,8 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
alertIcon: Icon(
Icons.warning_rounded,
size: 100,
color: MihColors.getRedColor(context),
color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
alertTitle: "Error Creating Email",
alertBody: Column(
@@ -110,15 +114,16 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Text(
"We couldn't launch your email app to send a message to ${widget.business.bus_email}. To fix this, please confirm that you have an email application installed and that it's set as your default.",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 15,
),
),
],
),
alertColour: MihColors.getRedColor(context),
alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
);
});
}
@@ -143,7 +148,8 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
alertIcon: Icon(
Icons.warning_rounded,
size: 100,
color: MihColors.getRedColor(context),
color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
alertTitle: "Error Creating Maps",
alertBody: Column(
@@ -151,15 +157,16 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Text(
"There was an issue opening maps for ${widget.business.Name}. This usually happens if you don't have a maps app installed or it's not set as your default. Please install one to proceed.",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 15,
),
),
],
),
alertColour: MihColors.getRedColor(context),
alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
);
});
}
@@ -171,7 +178,8 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
alertIcon: Icon(
Icons.warning_rounded,
size: 100,
color: MihColors.getRedColor(context),
color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
alertTitle: "Error Creating Maps",
alertBody: Column(
@@ -179,15 +187,16 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Text(
"There was an issue opening maps for ${widget.business.Name}. This usually happens if you don't have a maps app installed or it's not set as your default. Please install one to proceed.",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 15,
),
),
],
),
alertColour: MihColors.getRedColor(context),
alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
);
});
}
@@ -211,7 +220,8 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
alertIcon: Icon(
Icons.warning_rounded,
size: 100,
color: MihColors.getRedColor(context),
color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
alertTitle: "Error Opening Website",
alertBody: Column(
@@ -219,15 +229,16 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Text(
"We couldn't open the link to $newUrl. To view this website, please ensure you have a web browser installed and set as your default.",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 15,
),
),
],
),
alertColour: MihColors.getRedColor(context),
alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
);
});
}
@@ -239,7 +250,8 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
alertIcon: Icon(
Icons.warning_rounded,
size: 100,
color: MihColors.getRedColor(context),
color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
alertTitle: "Error Opening Website",
alertBody: Column(
@@ -247,15 +259,16 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Text(
"We couldn't open the link to $newUrl. To view this website, please ensure you have a web browser installed and set as your default.",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 15,
),
),
],
),
alertColour: MihColors.getRedColor(context),
alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
);
});
}
@@ -270,12 +283,12 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Function()? ontap,
) {
return Material(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
child: InkWell(
onTap: ontap,
splashColor: MzansiInnovationHub.of(context)!
.theme
.primaryColor()
splashColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark")
.withOpacity(0.2),
borderRadius: BorderRadius.circular(15),
child: Padding(
@@ -297,8 +310,8 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
child: Icon(
icon,
// size: 35,
color:
MzansiInnovationHub.of(context)!.theme.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
),
).redacted(
@@ -318,9 +331,9 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
height: 1.0,
),
).redacted(
@@ -333,9 +346,9 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w700,
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
).redacted(
context: context,
@@ -385,16 +398,16 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Widget build(BuildContext context) {
// double screenWidth = MediaQuery.of(context).size.width;
return Material(
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor()
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark")
.withValues(alpha: 0.6),
borderRadius: BorderRadius.circular(25),
elevation: 10,
shadowColor: Colors.black,
child: Container(
decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(10),
),
child: Column(
@@ -404,7 +417,8 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
"Call",
"Give us a quick call.",
Icons.phone,
MihColors.getGreenColor(context),
MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
false,
() {
// print("Calling ${widget.cellNumber}");
@@ -412,13 +426,15 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
},
),
Divider(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
_buildContactInfo(
"Email",
"Send us an email.",
Icons.email,
MihColors.getPinkColor(context),
MihColors.getPinkColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
false,
() {
// print("Emailing ${widget.email}");
@@ -434,14 +450,15 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
child: Column(
children: [
Divider(
color:
MzansiInnovationHub.of(context)!.theme.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
_buildContactInfo(
"Location",
"Come visit us.",
Icons.location_on,
MihColors.getOrangeColor(context),
MihColors.getOrangeColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
false,
() {
final latitude = double.parse(
@@ -463,14 +480,15 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
child: Column(
children: [
Divider(
color:
MzansiInnovationHub.of(context)!.theme.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
_buildContactInfo(
"Website",
"Find out more about us.",
Icons.vpn_lock,
MihColors.getRedColor(context),
MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
false,
() {
_launchWebsite(widget.business.website);
@@ -489,9 +507,9 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Divider(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
Container(
@@ -499,7 +517,9 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
"Loading Rating",
"Loading your rating.",
Icons.star_rate_rounded,
MihColors.getYellowColor(context),
MihColors.getYellowColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
true,
null,
),
@@ -519,16 +539,18 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Divider(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
_buildContactInfo(
ratingDisplayTitle,
"Let us know how we are doing.",
Icons.star_rate_rounded,
MihColors.getYellowColor(context),
MihColors.getYellowColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
false,
() {
businessReviewRatingWindow(
@@ -550,9 +572,9 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Divider(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
Container(
@@ -560,7 +582,9 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
"Loading Bookmark",
"Loading your bookmark.",
Icons.bookmark_add_rounded,
MihColors.getBluishPurpleColor(context),
MihColors.getBluishPurpleColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
true,
null,
),
@@ -580,9 +604,9 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Divider(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
_buildContactInfo(
@@ -591,7 +615,9 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
bookmarkBusiness == null
? Icons.bookmark_add_rounded
: Icons.bookmark_remove_rounded,
MihColors.getBluishPurpleColor(context),
MihColors.getBluishPurpleColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
false,
() {
// _launchWebsite(widget.website);
@@ -610,14 +636,14 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
// Padding(
// padding: const EdgeInsets.symmetric(horizontal: 10.0),
// child: Divider(
// color: MzansiInnovationHub.of(context)!.theme.primaryColor(),
// color: MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ),
// ),
// _buildContactInfo(
// "Bookmark",
// "Save us for later.",
// Icons.bookmark_add_rounded,
// MihColors.getBluishPurpleColor(context),
// MihColors.getBluishPurpleColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// () {
// // _launchWebsite(widget.website);
// print("Saving ${widget.business.Name} to Directory");
@@ -628,7 +654,7 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
// Padding(
// padding: const EdgeInsets.symmetric(horizontal: 10.0),
// child: Divider(
// color: MzansiInnovationHub.of(context)!.theme.primaryColor(),
// color: MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ),
// ),
],

View File

@@ -77,11 +77,13 @@ class _MihDeleteBookmarkAlertState extends State<MihDeleteBookmarkAlert> {
@override
Widget build(BuildContext context) {
return MihPackageAlert(
alertColour: MihColors.getSecondaryColor(context),
alertColour: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
alertIcon: Icon(
Icons.warning_rounded,
size: 100,
color: MihColors.getSecondaryColor(context),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
alertTitle: "Remove Bookmark",
alertBody: Column(
@@ -89,7 +91,8 @@ class _MihDeleteBookmarkAlertState extends State<MihDeleteBookmarkAlert> {
Text(
"Are you sure you want to remove ${widget.business.Name} from your Mzansi Directory?",
style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 15,
),
),
@@ -103,12 +106,13 @@ class _MihDeleteBookmarkAlertState extends State<MihDeleteBookmarkAlert> {
onPressed: () async {
Navigator.of(context).pop();
},
buttonColor: MihColors.getGreenColor(context),
buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
child: Text(
"Cancel",
style: TextStyle(
color:
MzansiInnovationHub.of(context)!.theme.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -121,12 +125,13 @@ class _MihDeleteBookmarkAlertState extends State<MihDeleteBookmarkAlert> {
deleteBookmark(
widget.bookmarkBusiness!.idbookmarked_businesses);
},
buttonColor: MihColors.getRedColor(context),
buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
child: Text(
"Remove Business",
style: TextStyle(
color:
MzansiInnovationHub.of(context)!.theme.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),

View File

@@ -52,11 +52,13 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
showDialog(
context: context,
builder: (context) => MihPackageAlert(
alertColour: MihColors.getRedColor(context),
alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
alertIcon: Icon(
Icons.warning_rounded,
size: 100,
color: MihColors.getRedColor(context),
color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
alertTitle: "Delete Review",
alertBody: Column(
@@ -64,7 +66,8 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
Text(
"Are you sure you want to delete this review? This action cannot be undone.",
style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 15,
),
),
@@ -117,12 +120,14 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
}
});
},
buttonColor: MihColors.getRedColor(context),
buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
child: Text(
"Delete",
style: TextStyle(
color:
MzansiInnovationHub.of(context)!.theme.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -133,12 +138,14 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
onPressed: () {
Navigator.of(context).pop();
},
buttonColor: MihColors.getGreenColor(context),
buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
child: Text(
"Cancel",
style: TextStyle(
color:
MzansiInnovationHub.of(context)!.theme.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -154,9 +161,11 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
Color getMissionVisionLimitColor(int limit) {
if (_counter.value <= limit) {
return MzansiInnovationHub.of(context)!.theme.secondaryColor();
return MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} else {
return MihColors.getRedColor(context);
return MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
}
}
@@ -300,15 +309,19 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
SpeedDialChild(
child: Icon(
Icons.delete,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
label: "Delete Review",
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: () {
showDeleteReviewAlert();
},
@@ -336,9 +349,9 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
"Business Rating",
textAlign: TextAlign.left,
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 18,
fontWeight: FontWeight.bold,
),
@@ -353,14 +366,18 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
filledIcon: Icons.star,
emptyIcon: Icons.star_border,
halfFilledIcon: Icons.star_half,
filledColor: MihColors.getYellowColor(context),
filledColor: MihColors.getYellowColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
// filledColor: MzansiInnovationHub.of(context)!
// .theme
// .secondaryColor(),
emptyColor: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
halfFilledColor: MihColors.getYellowColor(context),
emptyColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
halfFilledColor: MihColors.getYellowColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
// MzansiInnovationHub.of(context)!
// .theme
// .secondaryColor(),
@@ -376,11 +393,15 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
filledIcon: Icons.star,
emptyIcon: Icons.star_border,
halfFilledIcon: Icons.star_half,
filledColor: MihColors.getYellowColor(context),
emptyColor: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
halfFilledColor: MihColors.getYellowColor(context),
filledColor: MihColors.getYellowColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
emptyColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
halfFilledColor: MihColors.getYellowColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
isHalfAllowed: true,
initialRating: widget.businessReview != null
? double.parse(_reviewScoreController.text)
@@ -402,11 +423,12 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
visible: widget.readOnly,
child: MihTextFormField(
// width: 200,
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: _reviewReviewerController,
multiLineInput: false,
requiredText: true,
@@ -420,10 +442,10 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
const SizedBox(height: 10),
MihTextFormField(
// width: 200,
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: _reviewTitleController,
multiLineInput: false,
requiredText: true,
@@ -437,10 +459,10 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
const SizedBox(height: 10),
MihTextFormField(
height: 250,
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: _reviewDescriptionController,
multiLineInput: true,
requiredText: widget.readOnly,
@@ -500,16 +522,18 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
MihAlertServices().formNotFilledCompletely(context);
}
},
buttonColor: MihColors.getGreenColor(context),
buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 300,
child: Text(
widget.businessReview != null
? "Update Review"
: "Add Review",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),

View File

@@ -3,6 +3,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MzansiBusinessProfileTile extends StatefulWidget {
final BusinessArguments arguments;
@@ -31,12 +32,15 @@ class _MzansiBusinessProfileTileState extends State<MzansiBusinessProfileTile> {
appName: "Business Profile",
appIcon: Icon(
MihIcons.businessProfile,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// size: widget.packageSize,
),
iconSize: widget.packageSize,
primaryColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
secondaryColor: MzansiInnovationHub.of(context)!.theme.primaryColor(),
primaryColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
secondaryColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
);
}
}

View File

@@ -3,6 +3,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart';
import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MzansiSetupBusinessProfileTile extends StatefulWidget {
final AppUser signedInUser;
@@ -32,11 +33,14 @@ class _MzansiSetupBusinessProfileTileState
appName: "Set Up Business",
appIcon: Icon(
MihIcons.businessSetup,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
iconSize: widget.packageSize,
primaryColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
secondaryColor: MzansiInnovationHub.of(context)!.theme.primaryColor(),
primaryColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
secondaryColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
);
}
}

View File

@@ -105,7 +105,8 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
return MihPackageAlert(
alertIcon: Icon(
Icons.warning_rounded,
color: MihColors.getRedColor(context),
color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
alertTitle: "Error Updating Business Details",
alertBody: Column(
@@ -113,14 +114,15 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
Text(
"An error occurred while updating the business details. Please check internet connection and try again.",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
],
),
alertColour: MihColors.getRedColor(context),
alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
);
},
);
@@ -253,12 +255,12 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
editable: true,
fileNameController: fileNameController,
userSelectedfile: imageFile,
frameColor: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
backgroundColor: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
frameColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
backgroundColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
onChange: (selectedfile) {
setState(() {
imageFile = selectedfile;
@@ -269,12 +271,12 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
Visibility(
visible: false,
child: 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: fileNameController,
multiLineInput: false,
requiredText: true,
@@ -284,12 +286,12 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
),
const SizedBox(height: 20),
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: nameController,
multiLineInput: false,
requiredText: true,
@@ -300,12 +302,12 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
),
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: typeController,
multiLineInput: false,
requiredText: true,
@@ -316,12 +318,12 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
),
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: emailController,
multiLineInput: false,
requiredText: true,
@@ -360,21 +362,29 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
showDropDownButton: false,
pickerStyle: PickerStyle.bottomSheet,
dialogBackgroundColor:
MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
barrierColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
barrierColor: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
.theme
.mode ==
"Dark"),
),
Expanded(
child: 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: contactController,
numberMode: true,
multiLineInput: false,
@@ -391,12 +401,12 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
const SizedBox(height: 10),
MihTextFormField(
height: 250,
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: missionVisionController,
multiLineInput: true,
requiredText: true,
@@ -438,12 +448,12 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
),
const SizedBox(height: 10.0),
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: websiteController,
multiLineInput: false,
requiredText: false,
@@ -455,12 +465,12 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
),
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: regController,
multiLineInput: false,
requiredText: false,
@@ -472,12 +482,12 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
),
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: practiceNoController,
multiLineInput: false,
requiredText: false,
@@ -488,12 +498,12 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
),
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: vatNoController,
multiLineInput: false,
requiredText: false,
@@ -509,12 +519,16 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
children: [
Flexible(
child: 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: locationController,
multiLineInput: false,
requiredText: true,
@@ -546,16 +560,20 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
Navigator.of(context).pop();
});
},
buttonColor: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
buttonColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
width: 100,
child: Text(
"Set",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -574,16 +592,18 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
.formNotFilledCompletely(context);
}
},
buttonColor: MzansiInnovationHub.of(context)!
.theme
.successColor(),
buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 300,
child: Text(
"Update",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -602,9 +622,11 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
Color getMissionVisionLimitColor(int limit) {
if (_counter.value <= limit) {
return MzansiInnovationHub.of(context)!.theme.secondaryColor();
return MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} else {
return MihColors.getRedColor(context);
return MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
}
}
@@ -688,10 +710,10 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
editable: false,
fileNameController: fileNameController,
userSelectedfile: imageFile,
frameColor:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
backgroundColor:
MzansiInnovationHub.of(context)!.theme.primaryColor(),
frameColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
backgroundColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onChange: (selectedfile) {
setState(() {
imageFile = selectedfile;
@@ -705,9 +727,9 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
style: TextStyle(
fontSize: 35,
fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
),
@@ -717,9 +739,9 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
),
@@ -747,9 +769,9 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
),
@@ -779,14 +801,15 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
// Connect with the user
editBizProfileWindow(width);
},
buttonColor: MihColors.getGreenColor(context),
buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300,
child: Text(
"Edit Profile",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -806,17 +829,17 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
// SpeedDialChild(
// child: Icon(
// Icons.edit,
// color: MzansiInnovationHub.of(context)!.theme.primaryColor(),
// color: MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ),
// label: "Edit Profile",
// labelBackgroundColor:
// MihColors.getGreenColor(context),
// 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),
// MihColors.getGreenColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// onTap: () {
// editBizProfileWindow(width);
// },

View File

@@ -75,30 +75,30 @@ class _MihBusinessDetailsViewState extends State<MihBusinessDetailsView> {
editable: false,
fileNameController: TextEditingController(),
userSelectedfile: file,
frameColor: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
backgroundColor: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
frameColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
backgroundColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
onChange: () {},
);
} else {
return Icon(
MihIcons.iDontKnow,
size: profilePictureWidth,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
);
}
} else {
return Icon(
MihIcons.mihRing,
size: profilePictureWidth,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
);
}
}),
@@ -110,9 +110,9 @@ class _MihBusinessDetailsViewState extends State<MihBusinessDetailsView> {
// fileNameController: fileNameController,
// userSelectedfile: imageFile,
// frameColor:
// MzansiInnovationHub.of(context)!.theme.secondaryColor(),
// MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// backgroundColor:
// MzansiInnovationHub.of(context)!.theme.primaryColor(),
// MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// onChange: (selectedfile) {
// setState(() {
// imageFile = selectedfile;
@@ -126,9 +126,9 @@ class _MihBusinessDetailsViewState extends State<MihBusinessDetailsView> {
style: TextStyle(
fontSize: 35,
fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
),
@@ -138,9 +138,9 @@ class _MihBusinessDetailsViewState extends State<MihBusinessDetailsView> {
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
),
@@ -168,31 +168,34 @@ class _MihBusinessDetailsViewState extends State<MihBusinessDetailsView> {
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
),
),
const SizedBox(height: 10),
RatingBar.readOnly(
size: 50,
alignment: Alignment.center,
filledIcon: Icons.star,
emptyIcon: Icons.star_border,
halfFilledIcon: Icons.star_half,
filledColor: MihColors.getYellowColor(context),
// MzansiInnovationHub.of(context)!.theme.primaryColor(),
emptyColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
halfFilledColor: MihColors.getYellowColor(context),
// MzansiInnovationHub.of(context)!.theme.primaryColor(),
isHalfAllowed: true,
initialRating: widget.business.rating.isNotEmpty
? double.parse(widget.business.rating)
: 0,
maxRating: 5,
),
RatingBar.readOnly(
size: 50,
alignment: Alignment.center,
filledIcon: Icons.star,
emptyIcon: Icons.star_border,
halfFilledIcon: Icons.star_half,
filledColor: MihColors.getYellowColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
emptyColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
halfFilledColor: MihColors.getYellowColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
isHalfAllowed: true,
initialRating: widget.business.rating.isNotEmpty
? double.parse(widget.business.rating)
: 0,
maxRating: 5,
),
const SizedBox(height: 20),
SizedBox(
width: 700,

View File

@@ -76,17 +76,17 @@ class _MihBusinessReviewsState extends State<MihBusinessReviews> {
child: Icon(
MihIcons.mihRing,
size: 165,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
Icon(
Icons.star_rate_rounded,
size: 150,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
],
),
@@ -98,9 +98,9 @@ class _MihBusinessReviewsState extends State<MihBusinessReviews> {
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: 10),
@@ -142,7 +142,7 @@ class _MihBusinessReviewsState extends State<MihBusinessReviews> {
// Icons.star_rate_rounded,
// size: 150,
// color:
// MzansiInnovationHub.of(context)!.theme.secondaryColor(),
// MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ),
// Text(
// "No reviews yet, be the first the review\n${widget.business.Name}",
@@ -170,19 +170,23 @@ class _MihBusinessReviewsState extends State<MihBusinessReviews> {
filledIcon: Icons.star,
emptyIcon: Icons.star_border,
halfFilledIcon: Icons.star_half,
filledColor: MihColors.getYellowColor(context),
// MzansiInnovationHub.of(context)!.theme.primaryColor(),
emptyColor: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
halfFilledColor: MihColors.getYellowColor(context),
// MzansiInnovationHub.of(context)!.theme.primaryColor(),
filledColor: MihColors.getYellowColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
// MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
emptyColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
halfFilledColor: MihColors.getYellowColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
// MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// filledColor:
// MzansiInnovationHub.of(context)!.theme.secondaryColor(),
// MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// emptyColor:
// MzansiInnovationHub.of(context)!.theme.secondaryColor(),
// MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// halfFilledColor:
// MzansiInnovationHub.of(context)!.theme.secondaryColor(),
// MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
isHalfAllowed: true,
initialRating: double.parse(reviews[index].rating_score),
maxRating: 5,

View File

@@ -71,7 +71,8 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
Icon(
MihIcons.iDontKnow,
size: 165,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
const SizedBox(height: 10),
Text(
@@ -81,7 +82,8 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
),
],
@@ -97,7 +99,8 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
Icon(
MihIcons.personalProfile,
size: 165,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
const SizedBox(height: 10),
Text(
@@ -107,7 +110,8 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
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),
@@ -118,8 +122,8 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.normal,
color:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
children: [
TextSpan(
@@ -148,7 +152,7 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
// "Enter Username or Email to search",
// style: TextStyle(
// fontSize: 25,
// color: MzansiInnovationHub.of(context)!.theme.messageTextColor()),
// color: MihColors.getGreyColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark")),
// textAlign: TextAlign.center,
// ),
// );
@@ -187,8 +191,10 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
controller: searchController,
hintText: "Search Users",
prefixIcon: Icons.search,
fillColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
hintColor: MzansiInnovationHub.of(context)!.theme.primaryColor(),
fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
hintColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onPrefixIconTap: () {
submitUserForm();
},
@@ -224,7 +230,10 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
child: Text(
"$errorCode: Error pulling Patients Data\n/users/search/$userSearch\n$errorBody",
style: TextStyle(
fontSize: 25, color: MihColors.getRedColor(context)),
fontSize: 25,
color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark")),
textAlign: TextAlign.center,
),
);

View File

@@ -1,5 +1,4 @@
import 'dart:convert';
import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
@@ -61,7 +60,8 @@ class _MihMyBusinessTeamState extends State<MihMyBusinessTeam> {
"",
style: TextStyle(
fontSize: 25,
color: MzansiInnovationHub.of(context)!.theme.messageTextColor()),
color: MihColors.getGreyColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark")),
textAlign: TextAlign.center,
),
);
@@ -105,7 +105,10 @@ class _MihMyBusinessTeamState extends State<MihMyBusinessTeam> {
child: Text(
"$errorCode: Error pulling Patients Data\n${AppEnviroment.baseApiUrl}/business-user/users/${widget.arguments.businessUser!.business_id}\n$errorBody",
style: TextStyle(
fontSize: 25, color: MihColors.getRedColor(context)),
fontSize: 25,
color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark")),
textAlign: TextAlign.center,
),
);

View File

@@ -127,7 +127,8 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
return MihPackageAlert(
alertIcon: Icon(
Icons.warning_rounded,
color: MihColors.getRedColor(context),
color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
alertTitle: "Error Updating Business User Details",
alertBody: Column(
@@ -135,14 +136,15 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
Text(
"An error occurred while updating the business User details. Please check internet connection and try again.",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
],
),
alertColour: MihColors.getRedColor(context),
alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
);
},
);
@@ -226,20 +228,20 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
editable: false,
fileNameController: fileNameController,
userSelectedfile: userPicFile,
frameColor:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
backgroundColor:
MzansiInnovationHub.of(context)!.theme.primaryColor(),
frameColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
backgroundColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onChange: (_) {},
),
),
Visibility(
visible: false,
child: 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: fileNameController,
multiLineInput: false,
requiredText: true,
@@ -249,10 +251,10 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
),
const SizedBox(height: 20),
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: titleTextController,
multiLineInput: false,
requiredText: true,
@@ -264,10 +266,10 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
),
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: fnameController,
multiLineInput: false,
requiredText: true,
@@ -279,10 +281,10 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
),
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: lnameController,
multiLineInput: false,
requiredText: true,
@@ -294,10 +296,10 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
),
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: accessController,
multiLineInput: false,
requiredText: true,
@@ -338,10 +340,10 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
Visibility(
visible: false,
child: 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: fileNameController,
multiLineInput: false,
requiredText: true,
@@ -359,14 +361,15 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
MihAlertServices().formNotFilledCompletely(context);
}
},
buttonColor: MihColors.getGreenColor(context),
buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300,
child: Text(
"Update",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),

View File

@@ -258,9 +258,11 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
Color getMissionVisionLimitColor(int limit) {
if (_counter.value <= limit) {
return MzansiInnovationHub.of(context)!.theme.secondaryColor();
return MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} else {
return MihColors.getRedColor(context);
return MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
}
}
@@ -297,20 +299,20 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
),
),
Divider(
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor()),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark")),
const SizedBox(height: 10.0),
MihForm(
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: nameController,
multiLineInput: false,
requiredText: true,
@@ -321,12 +323,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
),
const SizedBox(height: 10.0),
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: typeController,
multiLineInput: false,
requiredText: true,
@@ -337,12 +339,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
),
const SizedBox(height: 10.0),
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: emailController,
multiLineInput: false,
requiredText: true,
@@ -379,22 +381,21 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
initialSelection: countryCodeController.text,
showDropDownButton: false,
pickerStyle: PickerStyle.bottomSheet,
dialogBackgroundColor:
MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
barrierColor: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
dialogBackgroundColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
barrierColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
Expanded(
child: 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: contactController,
numberMode: true,
multiLineInput: false,
@@ -410,12 +411,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
const SizedBox(height: 10.0),
MihTextFormField(
height: 250,
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: missionVisionController,
multiLineInput: true,
requiredText: true,
@@ -457,12 +458,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
),
const SizedBox(height: 10.0),
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: websiteController,
multiLineInput: false,
requiredText: false,
@@ -475,12 +476,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
const SizedBox(height: 10.0),
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: regController,
multiLineInput: false,
requiredText: false,
@@ -492,12 +493,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
),
const SizedBox(height: 10.0),
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: practiceNoController,
multiLineInput: false,
requiredText: false,
@@ -509,12 +510,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
const SizedBox(height: 10.0),
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: vatNoController,
multiLineInput: false,
requiredText: false,
@@ -530,12 +531,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
children: [
Flexible(
child: 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: locationController,
multiLineInput: false,
requiredText: true,
@@ -566,16 +567,18 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
Navigator.of(context).pop();
});
},
buttonColor: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
buttonColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 100,
child: Text(
"Set",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -595,17 +598,17 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
),
),
Divider(
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor()),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark")),
const SizedBox(height: 10.0),
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: titleController,
multiLineInput: false,
requiredText: true,
@@ -627,12 +630,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
// ),
const SizedBox(height: 10.0),
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: fnameController,
multiLineInput: false,
requiredText: true,
@@ -644,12 +647,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
),
const SizedBox(height: 10.0),
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: lnameController,
multiLineInput: false,
requiredText: true,
@@ -661,12 +664,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
),
const SizedBox(height: 15.0),
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: accessController,
multiLineInput: false,
requiredText: true,
@@ -698,16 +701,16 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
.formNotFilledCompletely(context);
}
},
buttonColor: MzansiInnovationHub.of(context)!
.theme
.successColor(),
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,
),

View File

@@ -4,6 +4,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_
import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MzansiProfileTile extends StatefulWidget {
final AppUser signedInUser;
@@ -38,12 +39,15 @@ class _MzansiProfileTileState extends State<MzansiProfileTile> {
appName: "Mzansi Profile",
appIcon: Icon(
MihIcons.mihLogo,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// size: widget.packageSize,
),
iconSize: widget.packageSize,
primaryColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
secondaryColor: MzansiInnovationHub.of(context)!.theme.primaryColor(),
primaryColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
secondaryColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
);
}
}

View File

@@ -4,6 +4,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_
import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MzansiSetupProfileTile extends StatefulWidget {
final AppUser signedInUser;
@@ -37,12 +38,15 @@ class _MzansiSetupProfileTileState extends State<MzansiSetupProfileTile> {
appName: "Set Up Profile",
appIcon: Icon(
MihIcons.profileSetup,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// size: widget.packageSize,
),
iconSize: widget.packageSize,
primaryColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
secondaryColor: MzansiInnovationHub.of(context)!.theme.primaryColor(),
primaryColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
secondaryColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
);
}
}

View File

@@ -54,7 +54,8 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
alertIcon: Icon(
Icons.warning_amber_rounded,
size: 100,
color: MihColors.getRedColor(context),
color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
alertTitle: "Too Slow, That Username is Taken",
alertBody: const Text(
@@ -63,7 +64,8 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
fontSize: 15,
),
),
alertColour: MihColors.getRedColor(context),
alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
);
},
);
@@ -194,9 +196,11 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
Color getPurposeLimitColor(int limit) {
if (_counter.value <= limit) {
return MzansiInnovationHub.of(context)!.theme.secondaryColor();
return MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} else {
return MihColors.getRedColor(context);
return MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
}
}
@@ -227,11 +231,12 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
editable: true,
fileNameController: proPicController,
userSelectedfile: proPic,
frameColor: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
backgroundColor:
MzansiInnovationHub.of(context)!.theme.primaryColor(),
frameColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
backgroundColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
onChange: (selectedImage) {
setState(() {
proPic = selectedImage;
@@ -243,11 +248,12 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
Visibility(
visible: false,
child: 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: proPicController,
multiLineInput: false,
requiredText: true,
@@ -257,10 +263,10 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
),
const SizedBox(height: 10.0),
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: usernameController,
multiLineInput: false,
requiredText: true,
@@ -271,10 +277,10 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
),
const SizedBox(height: 10.0),
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: fnameController,
multiLineInput: false,
requiredText: true,
@@ -285,10 +291,10 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
),
const SizedBox(height: 10.0),
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: lnameController,
multiLineInput: false,
requiredText: true,
@@ -300,10 +306,10 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
const SizedBox(height: 10.0),
MihTextFormField(
height: 250,
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: purposeController,
multiLineInput: true,
requiredText: true,
@@ -347,10 +353,10 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
MihToggle(
hintText: "Activate Business Account",
initialPostion: businessUser,
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(() {
businessUser = value;
@@ -368,14 +374,16 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
MihAlertServices().formNotFilledCompletely(context);
}
},
buttonColor: MihColors.getGreenColor(context),
buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 300,
child: Text(
"Update",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -464,10 +472,10 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
editable: false,
fileNameController: proPicController,
userSelectedfile: proPic,
frameColor:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
backgroundColor:
MzansiInnovationHub.of(context)!.theme.primaryColor(),
frameColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
backgroundColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onChange: (selectedImage) {
setState(() {
proPic = selectedImage;
@@ -483,9 +491,9 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
style: TextStyle(
fontSize: 35,
fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
),
@@ -497,9 +505,9 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
),
@@ -509,9 +517,9 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
),
@@ -527,9 +535,9 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
),
),
),
@@ -541,16 +549,17 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
// Connect with the user
editProfileWindow(width);
},
buttonColor: MihColors.getGreenColor(context),
buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300,
child: Text(
widget.arguments.signedInUser.username.isEmpty
? "Set Up Profile"
: "Edit Profile",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -570,17 +579,17 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
// SpeedDialChild(
// child: Icon(
// Icons.edit,
// color: MzansiInnovationHub.of(context)!.theme.primaryColor(),
// color: MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ),
// label: "Edit Profile",
// labelBackgroundColor:
// MihColors.getGreenColor(context),
// 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),
// MihColors.getGreenColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// onTap: () {
// editProfileWindow(width);
// },

View File

@@ -1,6 +1,7 @@
import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_file_services.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
@@ -67,30 +68,30 @@ class _MihPersonalProfileViewState extends State<MihPersonalProfileView> {
editable: false,
fileNameController: TextEditingController(),
userSelectedfile: file,
frameColor: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
backgroundColor: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
frameColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
backgroundColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
onChange: () {},
);
} else {
return Icon(
MihIcons.iDontKnow,
size: profilePictureWidth,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
);
}
} else {
return Icon(
MihIcons.mihRing,
size: profilePictureWidth,
color: MzansiInnovationHub.of(context)!
.theme
.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
);
}
// return Center(
@@ -104,7 +105,7 @@ class _MihPersonalProfileViewState extends State<MihPersonalProfileView> {
// .theme
// .secondaryColor(),
// backgroundColor:
// MzansiInnovationHub.of(context)!.theme.primaryColor(),
// MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// onChange: (selectedImage) {
// setState(() {
// proPic = selectedImage;
@@ -121,8 +122,8 @@ class _MihPersonalProfileViewState extends State<MihPersonalProfileView> {
style: TextStyle(
fontSize: 35,
fontWeight: FontWeight.bold,
color:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
),
),
@@ -134,8 +135,8 @@ class _MihPersonalProfileViewState extends State<MihPersonalProfileView> {
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
color:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
),
),
@@ -145,8 +146,8 @@ class _MihPersonalProfileViewState extends State<MihPersonalProfileView> {
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.bold,
color:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
),
),
@@ -162,8 +163,8 @@ class _MihPersonalProfileViewState extends State<MihPersonalProfileView> {
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.bold,
color:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
),
),
@@ -175,7 +176,7 @@ class _MihPersonalProfileViewState extends State<MihPersonalProfileView> {
// // Connect with the user
// },
// buttonColor:
// MihColors.getGreenColor(context),
// MihColors.getGreenColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// width: 300,
// child: Text(
// widget.user.username.isEmpty
@@ -183,7 +184,7 @@ class _MihPersonalProfileViewState extends State<MihPersonalProfileView> {
// : "Edit Profile",
// style: TextStyle(
// color:
// MzansiInnovationHub.of(context)!.theme.primaryColor(),
// MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// fontSize: 20,
// fontWeight: FontWeight.bold,
// ),

View File

@@ -39,7 +39,8 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
alertIcon: Icon(
Icons.warning_amber_rounded,
size: 100,
color: MihColors.getRedColor(context),
color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
alertTitle:
"Are you sure you want to permanently delete your MIH account?",
@@ -49,8 +50,8 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
Text(
"This action will remove all of your data, and it cannot be recovered. We understand this is a big decision, so please take a moment to double-check.\n\nIf you're certain, please confirm below. If you've changed your mind, you can simply close this window.",
style: TextStyle(
color:
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 15,
fontWeight: FontWeight.bold,
),
@@ -65,14 +66,15 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
MihUserServices.deleteAccount(
widget.signedInUser.app_id, context);
},
buttonColor: MihColors.getRedColor(context),
buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300,
child: Text(
"Delete",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -82,14 +84,15 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
onPressed: () {
Navigator.pop(context);
},
buttonColor: MihColors.getGreenColor(context),
buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300,
child: Text(
"Cancel",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -99,7 +102,8 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
)
],
),
alertColour: MihColors.getRedColor(context),
alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
);
},
);
@@ -112,7 +116,8 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
Center(
child: FaIcon(
FontAwesomeIcons.trashCan,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 150,
),
),
@@ -123,7 +128,8 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
),
const SizedBox(height: 10.0),
@@ -131,12 +137,14 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
onPressed: () {
deleteAccountPopUp(context);
},
buttonColor: MihColors.getRedColor(context),
buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300,
child: Text(
"Delete Account",
style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(),
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),