Merge pull request #248 from yaso-meth/NEW--MIH-Color-Alignment

NEW--MIH-Color-Alignment
This commit is contained in:
yaso-meth
2025-08-15 11:38:12 +02:00
committed by GitHub
124 changed files with 4057 additions and 3135 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -6,13 +6,13 @@ FROM debian:latest AS build-env
RUN apt-get update --fix-missing RUN apt-get update --fix-missing
RUN apt-get install -y curl git wget unzip libgconf-2-4 gdb libstdc++6 libglu1-mesa fonts-droid-fallback RUN apt-get install -y curl git wget unzip gdb libstdc++6 libglu1-mesa fonts-droid-fallback
# RUN apt-get install -y curl git wget unzip libgconf-2-4 gdb libstdc++6 libglu1-mesa fonts-droid-fallback
RUN apt-get install python3 -y RUN apt-get install python3 -y
# RUN apt-get update --fix-missing
# RUN apt-get install python3-Jinja2
# download Flutter SDK from Flutter Github repo # download Flutter SDK from Flutter Github repo
RUN git clone -b stable https://github.com/flutter/flutter.git /usr/local/flutter RUN git clone -b flutter-3.32-candidate.0 https://github.com/flutter/flutter.git /usr/local/flutter
#RUN git clone https://github.com/flutter/flutter.git /usr/local/flutter # RUN git clone -b stable https://github.com/flutter/flutter.git /usr/local/flutter
# Set flutter environment path # Set flutter environment path
ENV PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}" ENV PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}"
@@ -21,17 +21,13 @@ ENV PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PAT
RUN flutter doctor -v RUN flutter doctor -v
# Enable flutter web # Enable flutter web
RUN flutter channel stable RUN flutter channel flutter-3.32-candidate.0
# RUN flutter upgrade # RUN flutter channel stable
#RUN flutter pub add web:^0.5.0
RUN flutter config --enable-web RUN flutter config --enable-web
# Copy files to container and build # Copy files to container and build
RUN mkdir /app/ RUN mkdir /app/
COPY . /app/ COPY . /app/
# COPY ./server/MIH_web_server.py /app/build/web/
# VOLUME ["/app"]
WORKDIR /app WORKDIR /app
# RUN flutter upgrade # RUN flutter upgrade

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'mih_config/mih_env.dart'; import 'mih_config/mih_env.dart';
import 'mih_config/mih_routeGenerator.dart'; import 'mih_config/mih_routeGenerator.dart';
import 'mih_config/mih_theme.dart'; import 'mih_config/mih_theme.dart';
@@ -20,7 +21,7 @@ class _MzansiInnovationHubState extends State<MzansiInnovationHub> {
late MihTheme theme; late MihTheme theme;
Color getPrimany() { Color getPrimany() {
return theme.primaryColor(); return MihColors.getPrimaryColor(theme.mode == "Dark");
} }
String getTitle() { String getTitle() {
@@ -60,9 +61,9 @@ class _MzansiInnovationHubState extends State<MzansiInnovationHub> {
// } else { // } else {
// theme.mode = "Light"; // theme.mode = "Light";
// } // }
super.initState();
theme.mode = "Dark"; theme.mode = "Dark";
theme.platform = Theme.of(context).platform; theme.platform = Theme.of(context).platform;
super.initState();
//doInit(); //doInit();
} }

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import '../../main.dart'; import '../../main.dart';
class MIHBody extends StatefulWidget { class MIHBody extends StatefulWidget {
@@ -46,10 +47,12 @@ class _MIHBodyState extends State<MIHBody> {
Decoration? getBoader() { Decoration? getBoader() {
if (widget.borderOn) { if (widget.borderOn) {
return BoxDecoration( return BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 3.0), width: 3.0),
); );
} else { } else {

View File

@@ -1,10 +1,10 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
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_objects/app_user.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/notification.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/notification.dart';
import '../../main.dart'; import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:supertokens_flutter/http.dart' as http; import 'package:supertokens_flutter/http.dart' as http;
import '../../mih_config/mih_env.dart'; import '../../mih_config/mih_env.dart';
import '../mih_pop_up_messages/mih_error_message.dart'; import '../mih_pop_up_messages/mih_error_message.dart';
@@ -78,13 +78,15 @@ class _MIHNotificationDrawerState extends State<MIHNotificationDrawer> {
title: Text( title: Text(
title, title,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
subtitle: Text( subtitle: Text(
subtitle, subtitle,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
onTap: () {}, onTap: () {},
@@ -101,7 +103,8 @@ class _MIHNotificationDrawerState extends State<MIHNotificationDrawer> {
children: [ children: [
Icon( Icon(
Icons.circle_notifications, Icons.circle_notifications,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
const SizedBox( const SizedBox(
width: 5, width: 5,
@@ -110,7 +113,8 @@ class _MIHNotificationDrawerState extends State<MIHNotificationDrawer> {
child: Text( child: Text(
title, title,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
), ),
@@ -124,7 +128,8 @@ class _MIHNotificationDrawerState extends State<MIHNotificationDrawer> {
child: Text( child: Text(
title, title,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
), ),
@@ -136,7 +141,8 @@ class _MIHNotificationDrawerState extends State<MIHNotificationDrawer> {
subtitle: Text( subtitle: Text(
subtitle, subtitle,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
onTap: () { onTap: () {
@@ -159,7 +165,8 @@ class _MIHNotificationDrawerState extends State<MIHNotificationDrawer> {
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
separatorBuilder: (BuildContext context, index) { separatorBuilder: (BuildContext context, index) {
return Divider( return Divider(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}, },
itemCount: widget.notifications.length, itemCount: widget.notifications.length,
@@ -198,14 +205,15 @@ class _MIHNotificationDrawerState extends State<MIHNotificationDrawer> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SafeArea( return SafeArea(
child: Drawer( child: Drawer(
//backgroundColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), //backgroundColor: MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Container( Container(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@@ -215,9 +223,9 @@ class _MIHNotificationDrawerState extends State<MIHNotificationDrawer> {
child: Text( child: Text(
"Notifications", "Notifications",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 20, fontSize: 20,
), ),
@@ -232,7 +240,7 @@ class _MIHNotificationDrawerState extends State<MIHNotificationDrawer> {
// physics: const NeverScrollableScrollPhysics(), // physics: const NeverScrollableScrollPhysics(),
// separatorBuilder: (BuildContext context, index) { // separatorBuilder: (BuildContext context, index) {
// return Divider( // return Divider(
// color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), // color: MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ); // );
// }, // },
// itemCount: widget.notifications.length, // itemCount: widget.notifications.length,

View File

@@ -2,6 +2,7 @@ import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_yt_video_player.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_yt_video_player.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MIHTile extends StatefulWidget { class MIHTile extends StatefulWidget {
final String tileName; final String tileName;
@@ -83,7 +84,7 @@ class _MIHTileState extends State<MIHTile> {
child: Material( child: Material(
color: mainC, color: mainC,
// shadowColor: // shadowColor:
// MzansiInnovationHub.of(context)!.theme.secondaryColor(), // MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// elevation: 5, // elevation: 5,
borderRadius: BorderRadius.circular(80), borderRadius: BorderRadius.circular(80),
child: InkWell( child: InkWell(
@@ -94,10 +95,10 @@ class _MIHTileState extends State<MIHTile> {
displayHint(); displayHint();
}, },
// hoverDuration: , // hoverDuration: ,
splashColor: splashColor: MihColors.getHighlightColor(
MzansiInnovationHub.of(context)!.theme.highlightColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
highlightColor: highlightColor: MihColors.getHighlightColor(
MzansiInnovationHub.of(context)!.theme.highlightColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
child: widget.tileIcon, child: widget.tileIcon,
), ),
), ),
@@ -111,7 +112,8 @@ class _MIHTileState extends State<MIHTile> {
softWrap: true, softWrap: true,
overflow: TextOverflow.visible, overflow: TextOverflow.visible,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 40.0, fontSize: 40.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

View File

@@ -7,6 +7,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/Exam
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/Example/package_tools/package_tool_two.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/Example/package_tools/package_tool_two.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class PackageTest extends StatefulWidget { class PackageTest extends StatefulWidget {
// final AppUser user; // final AppUser user;
@@ -66,7 +67,8 @@ class _PackageTestState extends State<PackageTest> {
alertIcon: Icon( alertIcon: Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: 100, size: 100,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
alertTitle: "Oops! Looks like some fields are missing.", alertTitle: "Oops! Looks like some fields are missing.",
alertBody: Column( alertBody: Column(
@@ -74,8 +76,8 @@ class _PackageTestState extends State<PackageTest> {
Text( Text(
"We noticed that some required fields are still empty. To ensure your request is processed smoothly, please fill out all the highlighted fields before submitting the form again.", "We noticed that some required fields are still empty. To ensure your request is processed smoothly, please fill out all the highlighted fields before submitting the form again.",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -84,8 +86,8 @@ class _PackageTestState extends State<PackageTest> {
RichText( RichText(
text: TextSpan( text: TextSpan(
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -94,16 +96,16 @@ class _PackageTestState extends State<PackageTest> {
text: "Here's a quick tip: ", text: "Here's a quick tip: ",
style: TextStyle( style: TextStyle(
fontStyle: FontStyle.italic, fontStyle: FontStyle.italic,
color: MzansiInnovationHub.of(context)! color: MihColors.getRedColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.errorColor())), "Dark"))),
const TextSpan(text: "Look for fields with an asterisk ("), const TextSpan(text: "Look for fields with an asterisk ("),
TextSpan( TextSpan(
text: "*", text: "*",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getRedColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.errorColor())), "Dark"))),
const TextSpan( const TextSpan(
text: ") next to them, as these are mandatory."), text: ") next to them, as these are mandatory."),
], ],
@@ -111,7 +113,8 @@ class _PackageTestState extends State<PackageTest> {
), ),
], ],
), ),
alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}, },
); );

View File

@@ -101,17 +101,19 @@ class _PackageToolOneState extends State<PackageToolOne> {
SpeedDialChild( SpeedDialChild(
child: Icon( child: Icon(
Icons.add, Icons.add,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
label: "Show New Window", label: "Show New Window",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () { onTap: () {
// showTestWindow(); // showTestWindow();
}, },
@@ -180,9 +182,9 @@ class _PackageToolOneState extends State<PackageToolOne> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
], ],
@@ -193,15 +195,16 @@ class _PackageToolOneState extends State<PackageToolOne> {
onPressed: () { onPressed: () {
KenLogger.success("Successfully tested"); KenLogger.success("Successfully tested");
}, },
buttonColor: MihColors.getGreenColor(context), buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
elevation: 10, elevation: 10,
width: 300, width: 300,
child: Text( child: Text(
"Success Logger", "Success Logger",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -214,15 +217,16 @@ class _PackageToolOneState extends State<PackageToolOne> {
onPressed: () { onPressed: () {
KenLogger.error("Successfully tested"); KenLogger.error("Successfully tested");
}, },
buttonColor: MihColors.getRedColor(context), buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
elevation: 10, elevation: 10,
width: 300, width: 300,
child: Text( child: Text(
"Error Logger", "Error Logger",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -235,15 +239,16 @@ class _PackageToolOneState extends State<PackageToolOne> {
onPressed: () { onPressed: () {
KenLogger.warning("Successfully tested"); KenLogger.warning("Successfully tested");
}, },
buttonColor: MihColors.getOrangeColor(context), buttonColor: MihColors.getOrangeColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
elevation: 10, elevation: 10,
width: 300, width: 300,
child: Text( child: Text(
"Warning Logger", "Warning Logger",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -256,15 +261,16 @@ class _PackageToolOneState extends State<PackageToolOne> {
onPressed: () { onPressed: () {
KenLogger.info("Successfully tested"); KenLogger.info("Successfully tested");
}, },
buttonColor: MihColors.getBluishPurpleColor(context), buttonColor: MihColors.getBluishPurpleColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
elevation: 10, elevation: 10,
width: 300, width: 300,
child: Text( child: Text(
"Info Logger", "Info Logger",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -280,10 +286,10 @@ class _PackageToolOneState extends State<PackageToolOne> {
initialSelection: '+27', initialSelection: '+27',
showDropDownButton: false, showDropDownButton: false,
pickerStyle: PickerStyle.bottomSheet, pickerStyle: PickerStyle.bottomSheet,
dialogBackgroundColor: dialogBackgroundColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
barrierColor: barrierColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Center( Center(
@@ -298,16 +304,16 @@ class _PackageToolOneState extends State<PackageToolOne> {
}, },
); );
}, },
buttonColor: buttonColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
elevation: 10, elevation: 10,
width: 300, width: 300,
child: Text( child: Text(
"Show Loading", "Show Loading",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -324,9 +330,9 @@ class _PackageToolOneState extends State<PackageToolOne> {
style: TextStyle( style: TextStyle(
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
], ],
@@ -345,9 +351,9 @@ class _PackageToolOneState extends State<PackageToolOne> {
style: TextStyle( style: TextStyle(
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
], ],
@@ -424,8 +430,8 @@ class _PackageToolOneState extends State<PackageToolOne> {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Divider( Divider(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
thickness: 2, thickness: 2,
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
@@ -438,9 +444,9 @@ class _PackageToolOneState extends State<PackageToolOne> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
], ],
@@ -448,8 +454,8 @@ class _PackageToolOneState extends State<PackageToolOne> {
MihBannerAd(), MihBannerAd(),
const SizedBox(height: 10), const SizedBox(height: 10),
Divider( Divider(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
thickness: 2, thickness: 2,
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
@@ -458,11 +464,12 @@ class _PackageToolOneState extends State<PackageToolOne> {
formFields: [ formFields: [
MihTextFormField( MihTextFormField(
width: 200, width: 200,
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
controller: _textFieldZeroController, controller: _textFieldZeroController,
multiLineInput: false, multiLineInput: false,
requiredText: false, requiredText: false,
@@ -473,11 +480,12 @@ class _PackageToolOneState extends State<PackageToolOne> {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
controller: _textFieldOneController, controller: _textFieldOneController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -489,11 +497,12 @@ class _PackageToolOneState extends State<PackageToolOne> {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
controller: _textFieldTwoController, controller: _textFieldTwoController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -506,11 +515,12 @@ class _PackageToolOneState extends State<PackageToolOne> {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
controller: _textFieldThreeController, controller: _textFieldThreeController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -523,11 +533,12 @@ class _PackageToolOneState extends State<PackageToolOne> {
const SizedBox(height: 10), const SizedBox(height: 10),
MihNumericStepper( MihNumericStepper(
controller: _textFieldFiveController, controller: _textFieldFiveController,
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
hintText: "Number Stepper", hintText: "Number Stepper",
requiredText: true, requiredText: true,
minValue: 1, minValue: 1,
@@ -538,11 +549,12 @@ class _PackageToolOneState extends State<PackageToolOne> {
MihToggle( MihToggle(
hintText: "Toggle", hintText: "Toggle",
initialPostion: switchpositioin, initialPostion: switchpositioin,
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
secondaryFillColor: secondaryFillColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
readOnly: false, readOnly: false,
onChange: (value) { onChange: (value) {
setState(() { setState(() {
@@ -555,11 +567,12 @@ class _PackageToolOneState extends State<PackageToolOne> {
MihRadioOptions( MihRadioOptions(
controller: _textFieldSixController, controller: _textFieldSixController,
hintText: "Radio Options", hintText: "Radio Options",
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
secondaryFillColor: secondaryFillColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
requiredText: true, requiredText: true,
radioOptions: const ["Option 1", "Option 2"], radioOptions: const ["Option 1", "Option 2"],
), ),
@@ -600,11 +613,12 @@ class _PackageToolOneState extends State<PackageToolOne> {
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
height: 250, height: 250,
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
controller: _textFieldFourController, controller: _textFieldFourController,
multiLineInput: true, multiLineInput: true,
requiredText: false, requiredText: false,
@@ -628,17 +642,17 @@ class _PackageToolOneState extends State<PackageToolOne> {
MihAlertServices().formNotFilledCompletely(context); MihAlertServices().formNotFilledCompletely(context);
} }
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
elevation: 10, elevation: 10,
width: 300, width: 300,
child: Text( child: Text(
"Submit Form", "Submit Form",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -649,8 +663,8 @@ class _PackageToolOneState extends State<PackageToolOne> {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Divider( Divider(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
thickness: 2, thickness: 2,
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
@@ -661,10 +675,10 @@ class _PackageToolOneState extends State<PackageToolOne> {
prefixIcon: Icons.search, prefixIcon: Icons.search,
prefixAltIcon: MihIcons.mzansiAi, prefixAltIcon: MihIcons.mzansiAi,
width: 300, width: 300,
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
hintColor: hintColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onPrefixIconTap: () { onPrefixIconTap: () {
print("Search Icon Pressed: ${_searchController.text}"); print("Search Icon Pressed: ${_searchController.text}");
}, },
@@ -675,15 +689,16 @@ class _PackageToolOneState extends State<PackageToolOne> {
onPressed: () { onPressed: () {
print("Button Pressed"); print("Button Pressed");
}, },
buttonColor: buttonColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
elevation: 10, elevation: 10,
width: 300, width: 300,
child: Text( child: Text(
"Click Me", "Click Me",
style: TextStyle( style: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -694,24 +709,24 @@ class _PackageToolOneState extends State<PackageToolOne> {
onPressed: () { onPressed: () {
print("Button Pressed"); print("Button Pressed");
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Icon( Icon(
Icons.delete, Icons.delete,
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
), ),
Text( Text(
"Click Me", "Click Me",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -724,14 +739,15 @@ class _PackageToolOneState extends State<PackageToolOne> {
onPressed: () { onPressed: () {
print("Button Pressed"); print("Button Pressed");
}, },
buttonColor: buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Click Me", "Click Me",
style: TextStyle( style: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -748,8 +764,9 @@ class _PackageToolOneState extends State<PackageToolOne> {
onPressed: () {}, onPressed: () {},
icon: Icon( icon: Icon(
MihIcons.mihLogo, MihIcons.mihLogo,
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
), ),
), ),
), ),
@@ -760,10 +777,10 @@ class _PackageToolOneState extends State<PackageToolOne> {
editable: false, editable: false,
fileNameController: _fileNameController, fileNameController: _fileNameController,
userSelectedfile: file, userSelectedfile: file,
frameColor: frameColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
backgroundColor: backgroundColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onChange: (selectedImage) { onChange: (selectedImage) {
setState(() { setState(() {
file = selectedImage; file = selectedImage;
@@ -772,10 +789,10 @@ class _PackageToolOneState extends State<PackageToolOne> {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: _fileNameController, controller: _fileNameController,
hintText: "Selected Avatar File", hintText: "Selected Avatar File",
requiredText: false, requiredText: false,
@@ -797,10 +814,10 @@ class _PackageToolOneState extends State<PackageToolOne> {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: _imagefileController, controller: _imagefileController,
hintText: "Selected Image File", hintText: "Selected Image File",
requiredText: false, requiredText: false,
@@ -820,19 +837,19 @@ class _PackageToolOneState extends State<PackageToolOne> {
SpeedDialChild( SpeedDialChild(
child: Icon( child: Icon(
Icons.add, Icons.add,
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
label: "Show New Window", label: "Show New Window",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () { onTap: () {
showTestWindow(); showTestWindow();
}, },
@@ -840,19 +857,19 @@ class _PackageToolOneState extends State<PackageToolOne> {
SpeedDialChild( SpeedDialChild(
child: Icon( child: Icon(
Icons.add, Icons.add,
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
label: "Show New Full Window", label: "Show New Full Window",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () { onTap: () {
showTestFullWindow(); showTestFullWindow();
}, },

View File

@@ -4,6 +4,7 @@ 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_single_child_scroll.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class PackageToolTwo extends StatefulWidget { class PackageToolTwo extends StatefulWidget {
const PackageToolTwo({super.key}); const PackageToolTwo({super.key});
@@ -33,7 +34,8 @@ class _PackageToolTwoState extends State<PackageToolTwo> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
@@ -55,7 +57,8 @@ class _PackageToolTwoState extends State<PackageToolTwo> {
onPressed: () {}, onPressed: () {},
icon: Icon( icon: Icon(
MihIcons.mihLogo, MihIcons.mihLogo,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
) )

View File

@@ -4,6 +4,7 @@ import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_circle_avatar.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_circle_avatar.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.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_services/mih_file_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_location_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_location_services.dart';
@@ -61,26 +62,26 @@ class _MihBusinessProfilePreviewState extends State<MihBusinessProfilePreview> {
editable: false, editable: false,
fileNameController: TextEditingController(), fileNameController: TextEditingController(),
userSelectedfile: file, userSelectedfile: file,
frameColor: frameColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
backgroundColor: backgroundColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onChange: () {}, onChange: () {},
); );
} else { } else {
return Icon( return Icon(
MihIcons.iDontKnow, MihIcons.iDontKnow,
size: profilePictureWidth, size: profilePictureWidth,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
} }
} else { } else {
return Icon( return Icon(
MihIcons.mihRing, MihIcons.mihRing,
size: profilePictureWidth, size: profilePictureWidth,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
} }
}), }),

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../../main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:table_calendar/table_calendar.dart'; import 'package:table_calendar/table_calendar.dart';
class MIHCalendar extends StatefulWidget { class MIHCalendar extends StatefulWidget {
@@ -37,7 +38,8 @@ class _MIHCalendarState extends State<MIHCalendar> {
formatButtonDecoration: BoxDecoration( formatButtonDecoration: BoxDecoration(
border: Border.fromBorderSide( border: Border.fromBorderSide(
BorderSide( BorderSide(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
borderRadius: const BorderRadius.all( borderRadius: const BorderRadius.all(
@@ -61,29 +63,36 @@ class _MIHCalendarState extends State<MIHCalendar> {
calendarStyle: CalendarStyle( calendarStyle: CalendarStyle(
outsideDaysVisible: false, outsideDaysVisible: false,
todayTextStyle: TextStyle( todayTextStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
todayDecoration: BoxDecoration( todayDecoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.successColor(), color: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
shape: BoxShape.circle, shape: BoxShape.circle,
), ),
selectedTextStyle: TextStyle( selectedTextStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
selectedDecoration: BoxDecoration( selectedDecoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
shape: BoxShape.circle, shape: BoxShape.circle,
), ),
weekendTextStyle: TextStyle( weekendTextStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.messageTextColor(), color: MihColors.getGreyColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
daysOfWeekStyle: DaysOfWeekStyle( daysOfWeekStyle: DaysOfWeekStyle(
weekdayStyle: TextStyle( weekdayStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
weekendStyle: TextStyle( weekendStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.messageTextColor(), color: MihColors.getGreyColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
), ),

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MihDateField extends StatefulWidget { class MihDateField extends StatefulWidget {
final TextEditingController controller; final TextEditingController controller;
@@ -47,7 +48,6 @@ class _MihDateFieldState extends State<MihDateField> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final theme = MzansiInnovationHub.of(context)!.theme;
return Center( return Center(
child: SizedBox( child: SizedBox(
width: widget.width, width: widget.width,
@@ -61,7 +61,8 @@ class _MihDateFieldState extends State<MihDateField> {
Text( Text(
widget.labelText, widget.labelText,
style: TextStyle( style: TextStyle(
color: theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -70,7 +71,9 @@ class _MihDateFieldState extends State<MihDateField> {
Text( Text(
"(Optional)", "(Optional)",
style: TextStyle( style: TextStyle(
color: theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -96,25 +99,35 @@ class _MihDateFieldState extends State<MihDateField> {
readOnly: true, readOnly: true,
onTap: () => _selectDate(context), onTap: () => _selectDate(context),
style: TextStyle( style: TextStyle(
color: theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
), ),
decoration: InputDecoration( decoration: InputDecoration(
suffixIcon: Icon( suffixIcon: Icon(
Icons.calendar_today, Icons.calendar_today,
color: theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
), ),
errorStyle: const TextStyle(height: 0, fontSize: 0), errorStyle: const TextStyle(height: 0, fontSize: 0),
contentPadding: const EdgeInsets.symmetric( contentPadding: const EdgeInsets.symmetric(
horizontal: 10.0, vertical: 8.0), horizontal: 10.0, vertical: 8.0),
filled: true, filled: true,
fillColor: theme.secondaryColor(), fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
border: OutlineInputBorder( border: OutlineInputBorder(
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(
widget.borderRadius ?? 8.0), widget.borderRadius ?? 8.0),
borderSide: field.hasError borderSide: field.hasError
? BorderSide( ? BorderSide(
color: theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
width: 2.0, width: 2.0,
) )
: BorderSide.none, : BorderSide.none,
@@ -129,8 +142,16 @@ class _MihDateFieldState extends State<MihDateField> {
widget.borderRadius ?? 8.0), widget.borderRadius ?? 8.0),
borderSide: BorderSide( borderSide: BorderSide(
color: field.hasError color: field.hasError
? theme.errorColor() ? MihColors.getRedColor(
: theme.secondaryColor(), MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark")
: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
width: 3.0, width: 3.0,
), ),
), ),
@@ -138,7 +159,9 @@ class _MihDateFieldState extends State<MihDateField> {
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(
widget.borderRadius ?? 8.0), widget.borderRadius ?? 8.0),
borderSide: BorderSide( borderSide: BorderSide(
color: theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 3.0, width: 3.0,
), ),
), ),
@@ -146,7 +169,9 @@ class _MihDateFieldState extends State<MihDateField> {
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(
widget.borderRadius ?? 8.0), widget.borderRadius ?? 8.0),
borderSide: BorderSide( borderSide: BorderSide(
color: theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 3.0, width: 3.0,
), ),
), ),
@@ -163,7 +188,9 @@ class _MihDateFieldState extends State<MihDateField> {
field.errorText ?? '', field.errorText ?? '',
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
color: theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MihDropdownField extends StatefulWidget { class MihDropdownField extends StatefulWidget {
final TextEditingController controller; final TextEditingController controller;
@@ -30,13 +31,13 @@ class _MihDropdownFieldState extends State<MihDropdownField> {
List<DropdownMenuEntry<String>> buildMenuOptions(List<String> options) { List<DropdownMenuEntry<String>> buildMenuOptions(List<String> options) {
List<DropdownMenuEntry<String>> menuList = []; List<DropdownMenuEntry<String>> menuList = [];
final theme = MzansiInnovationHub.of(context)!.theme;
for (final i in options) { for (final i in options) {
menuList.add(DropdownMenuEntry( menuList.add(DropdownMenuEntry(
value: i, value: i,
label: i, label: i,
style: ButtonStyle( style: ButtonStyle(
foregroundColor: WidgetStatePropertyAll(theme.primaryColor()), foregroundColor: WidgetStatePropertyAll(MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark")),
), ),
)); ));
} }
@@ -59,8 +60,6 @@ class _MihDropdownFieldState extends State<MihDropdownField> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final theme = MzansiInnovationHub.of(context)!.theme;
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@@ -70,7 +69,8 @@ class _MihDropdownFieldState extends State<MihDropdownField> {
Text( Text(
widget.hintText, widget.hintText,
style: TextStyle( style: TextStyle(
color: theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -79,7 +79,8 @@ class _MihDropdownFieldState extends State<MihDropdownField> {
Text( Text(
"(Optional)", "(Optional)",
style: TextStyle( style: TextStyle(
color: theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -98,10 +99,16 @@ class _MihDropdownFieldState extends State<MihDropdownField> {
Theme( Theme(
data: Theme.of(context).copyWith( data: Theme.of(context).copyWith(
textSelectionTheme: TextSelectionThemeData( textSelectionTheme: TextSelectionThemeData(
cursorColor: theme.primaryColor(), cursorColor: MihColors.getPrimaryColor(
selectionColor: MzansiInnovationHub.of(context)!.theme.mode ==
theme.primaryColor().withValues(alpha: 0.3), "Dark"),
selectionHandleColor: theme.primaryColor(), selectionColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark")
.withValues(alpha: 0.3),
selectionHandleColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
), ),
), ),
child: DropdownMenu( child: DropdownMenu(
@@ -115,16 +122,22 @@ class _MihDropdownFieldState extends State<MihDropdownField> {
menuHeight: 400, menuHeight: 400,
expandedInsets: EdgeInsets.zero, expandedInsets: EdgeInsets.zero,
textStyle: TextStyle( textStyle: TextStyle(
color: theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
), ),
trailingIcon: Icon( trailingIcon: Icon(
Icons.arrow_drop_down, Icons.arrow_drop_down,
color: theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
), ),
selectedTrailingIcon: Icon( selectedTrailingIcon: Icon(
Icons.arrow_drop_up, Icons.arrow_drop_up,
color: theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
), ),
leadingIcon: IconButton( leadingIcon: IconButton(
onPressed: () { onPressed: () {
@@ -133,17 +146,25 @@ class _MihDropdownFieldState extends State<MihDropdownField> {
}, },
icon: Icon( icon: Icon(
Icons.delete_outline_rounded, Icons.delete_outline_rounded,
color: theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
), ),
), ),
onSelected: (String? selectedValue) { onSelected: (String? selectedValue) {
field.didChange(selectedValue); field.didChange(selectedValue);
}, },
menuStyle: MenuStyle( menuStyle: MenuStyle(
backgroundColor: backgroundColor: WidgetStatePropertyAll(
WidgetStatePropertyAll(theme.secondaryColor()), MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark")),
side: WidgetStatePropertyAll( side: WidgetStatePropertyAll(
BorderSide(color: theme.primaryColor(), width: 1.0), BorderSide(
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 1.0),
), ),
shape: WidgetStatePropertyAll( shape: WidgetStatePropertyAll(
RoundedRectangleBorder( RoundedRectangleBorder(
@@ -157,7 +178,9 @@ class _MihDropdownFieldState extends State<MihDropdownField> {
contentPadding: const EdgeInsets.symmetric( contentPadding: const EdgeInsets.symmetric(
horizontal: 10.0, vertical: 8.0), horizontal: 10.0, vertical: 8.0),
filled: true, filled: true,
fillColor: theme.secondaryColor(), fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8.0), borderRadius: BorderRadius.circular(8.0),
borderSide: BorderSide.none, borderSide: BorderSide.none,
@@ -166,22 +189,30 @@ class _MihDropdownFieldState extends State<MihDropdownField> {
borderRadius: BorderRadius.circular(8.0), borderRadius: BorderRadius.circular(8.0),
borderSide: BorderSide( borderSide: BorderSide(
color: field.hasError color: field.hasError
? theme.errorColor() ? MihColors.getRedColor(
: theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark")
: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 3.0, width: 3.0,
), ),
), ),
errorBorder: OutlineInputBorder( errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8.0), borderRadius: BorderRadius.circular(8.0),
borderSide: BorderSide( borderSide: BorderSide(
color: theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 3.0, width: 3.0,
), ),
), ),
focusedErrorBorder: OutlineInputBorder( focusedErrorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8.0), borderRadius: BorderRadius.circular(8.0),
borderSide: BorderSide( borderSide: BorderSide(
color: theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 3.0, width: 3.0,
), ),
), ),
@@ -195,7 +226,9 @@ class _MihDropdownFieldState extends State<MihDropdownField> {
field.errorText ?? '', field.errorText ?? '',
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
color: theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),

View File

@@ -1,6 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_speed_dial/flutter_speed_dial.dart'; import 'package:flutter_speed_dial/flutter_speed_dial.dart';
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MihFloatingMenu extends StatefulWidget { class MihFloatingMenu extends StatefulWidget {
final IconData? icon; final IconData? icon;
@@ -30,10 +31,12 @@ class _MihFloatingMenuState extends State<MihFloatingMenu> {
animatedIcon: widget.animatedIcon, animatedIcon: widget.animatedIcon,
direction: widget.direction ?? SpeedDialDirection.up, direction: widget.direction ?? SpeedDialDirection.up,
activeIcon: Icons.close, activeIcon: Icons.close,
backgroundColor: MzansiInnovationHub.of(context)!.theme.successColor(), backgroundColor: MihColors.getGreenColor(
activeBackgroundColor: MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
MzansiInnovationHub.of(context)!.theme.errorColor(), activeBackgroundColor: MihColors.getRedColor(
foregroundColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
foregroundColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
overlayColor: Colors.black, overlayColor: Colors.black,
overlayOpacity: 0.5, overlayOpacity: 0.5,
children: widget.children, children: widget.children,

View File

@@ -3,6 +3,7 @@ import 'dart:io';
import 'package:file_picker/file_picker.dart'; import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MihImageDisplay extends StatefulWidget { class MihImageDisplay extends StatefulWidget {
final ImageProvider<Object>? imageFile; final ImageProvider<Object>? imageFile;
@@ -33,7 +34,9 @@ class _MihImageDisplayState extends State<MihImageDisplay> {
ImageProvider<Object>? getImage() { ImageProvider<Object>? getImage() {
Color dark = const Color(0XFF3A4454); Color dark = const Color(0XFF3A4454);
if (widget.imageFile == null) { if (widget.imageFile == null) {
if (MzansiInnovationHub.of(context)!.theme.secondaryColor() == dark) { if (MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark") ==
dark) {
print("here in light icon"); print("here in light icon");
return const AssetImage( return const AssetImage(
'lib/mih_components/mih_package_components/assets/images/i-dont-know-dark.png'); 'lib/mih_components/mih_package_components/assets/images/i-dont-know-dark.png');
@@ -77,10 +80,11 @@ class _MihImageDisplayState extends State<MihImageDisplay> {
right: 0, right: 0,
child: IconButton.filled( child: IconButton.filled(
style: IconButton.styleFrom( style: IconButton.styleFrom(
backgroundColor: backgroundColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onPressed: () async { onPressed: () async {
try { try {
FilePickerResult? result = FilePickerResult? result =

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/main.dart'; 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_validation_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_text_form_field.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_text_form_field.dart';
@@ -109,9 +110,9 @@ class _MihNumericStepperState extends State<MihNumericStepper> {
child: IconButton.filled( child: IconButton.filled(
style: ButtonStyle( style: ButtonStyle(
backgroundColor: WidgetStateProperty.all<Color>( backgroundColor: WidgetStateProperty.all<Color>(
MzansiInnovationHub.of(context)! MihColors.getRedColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.errorColor()), "Dark")),
), ),
color: widget.inputColor, color: widget.inputColor,
iconSize: 20, iconSize: 20,
@@ -193,9 +194,9 @@ class _MihNumericStepperState extends State<MihNumericStepper> {
child: IconButton.filled( child: IconButton.filled(
style: ButtonStyle( style: ButtonStyle(
backgroundColor: WidgetStateProperty.all<Color>( backgroundColor: WidgetStateProperty.all<Color>(
MzansiInnovationHub.of(context)! MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.successColor()), "Dark")),
), ),
color: widget.inputColor, color: widget.inputColor,
iconSize: 20, iconSize: 20,

View File

@@ -1,5 +1,6 @@
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MihPackageAlert extends StatefulWidget { class MihPackageAlert extends StatefulWidget {
final Widget alertIcon; final Widget alertIcon;
@@ -64,7 +65,8 @@ class _MihPackageAlertState extends State<MihPackageAlert> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all(color: widget.alertColour, width: 5.0), border: Border.all(color: widget.alertColour, width: 5.0),
), ),
@@ -101,7 +103,8 @@ class _MihPackageAlertState extends State<MihPackageAlert> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),

View File

@@ -2,6 +2,7 @@ import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_yt_video_player.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_yt_video_player.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MihPackageTile extends StatefulWidget { class MihPackageTile extends StatefulWidget {
final String appName; final String appName;
@@ -84,8 +85,8 @@ class _MihPackageTileState extends State<MihPackageTile> {
// softWrap: true, // softWrap: true,
// overflow: TextOverflow.visible, // overflow: TextOverflow.visible,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20.0, fontSize: 20.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

View File

@@ -1,5 +1,6 @@
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MihPackageToolBody extends StatefulWidget { class MihPackageToolBody extends StatefulWidget {
final bool borderOn; final bool borderOn;
@@ -48,19 +49,23 @@ class _MihPackageToolBodyState extends State<MihPackageToolBody> {
if (widget.borderOn) { if (widget.borderOn) {
_innerBodyPadding = 10.0; _innerBodyPadding = 10.0;
return BoxDecoration( return BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 3.0), width: 3.0),
); );
} else { } else {
_innerBodyPadding = 0.0; _innerBodyPadding = 0.0;
return BoxDecoration( return BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 3.0), width: 3.0),
); );
} }

View File

@@ -3,6 +3,7 @@ import 'package:flutter_speed_dial/flutter_speed_dial.dart';
import 'package:mzansi_innovation_hub/main.dart'; 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_single_child_scroll.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_floating_menu.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_floating_menu.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MihPackageWindow extends StatefulWidget { class MihPackageWindow extends StatefulWidget {
final String windowTitle; final String windowTitle;
@@ -84,9 +85,12 @@ class _MihPackageWindowState extends State<MihPackageWindow> {
child: IconButton.filled( child: IconButton.filled(
style: ButtonStyle( style: ButtonStyle(
backgroundColor: WidgetStateProperty.all<Color>( backgroundColor: WidgetStateProperty.all<Color>(
MzansiInnovationHub.of(context)!.theme.errorColor()), MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark")),
), ),
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
iconSize: 20, iconSize: 20,
onPressed: () { onPressed: () {
widget.onWindowTapClose(); widget.onWindowTapClose();
@@ -108,7 +112,8 @@ class _MihPackageWindowState extends State<MihPackageWindow> {
style: TextStyle( style: TextStyle(
fontSize: windowTitleSize, fontSize: windowTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
), ),
@@ -165,10 +170,12 @@ class _MihPackageWindowState extends State<MihPackageWindow> {
insetAnimationDuration: Durations.short1, insetAnimationDuration: Durations.short1,
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: widget.fullscreen child: widget.fullscreen

View File

@@ -4,6 +4,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_objects/app_user.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_circle_avatar.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_circle_avatar.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.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_services/mih_file_services.dart';
class MihPersonalProfilePreview extends StatefulWidget { class MihPersonalProfilePreview extends StatefulWidget {
@@ -47,25 +48,26 @@ class _MihPersonalProfilePreviewState extends State<MihPersonalProfilePreview> {
editable: false, editable: false,
fileNameController: TextEditingController(), fileNameController: TextEditingController(),
userSelectedfile: file, userSelectedfile: file,
frameColor: frameColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
backgroundColor: backgroundColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onChange: () {}, onChange: () {},
); );
} else { } else {
return Icon( return Icon(
MihIcons.iDontKnow, MihIcons.iDontKnow,
size: profilePictureWidth, size: profilePictureWidth,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
} }
} else { } else {
return Icon( return Icon(
MihIcons.mihRing, MihIcons.mihRing,
size: profilePictureWidth, size: profilePictureWidth,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
} }
}, },

View File

@@ -2,6 +2,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MihTextFormField extends StatefulWidget { class MihTextFormField extends StatefulWidget {
final double? width; final double? width;
@@ -215,9 +216,11 @@ class _MihTextFormFieldState extends State<MihTextFormField> {
widget.borderRadius ?? 8.0), widget.borderRadius ?? 8.0),
borderSide: field.hasError borderSide: field.hasError
? BorderSide( ? BorderSide(
color: MzansiInnovationHub.of(context)! color: MihColors.getRedColor(
.theme MzansiInnovationHub.of(context)!
.errorColor(), .theme
.mode ==
"Dark"),
width: 2.0, width: 2.0,
) )
: BorderSide.none, : BorderSide.none,
@@ -232,9 +235,11 @@ class _MihTextFormFieldState extends State<MihTextFormField> {
widget.borderRadius ?? 8.0), widget.borderRadius ?? 8.0),
borderSide: BorderSide( borderSide: BorderSide(
color: field.hasError color: field.hasError
? MzansiInnovationHub.of(context)! ? MihColors.getRedColor(
.theme MzansiInnovationHub.of(context)!
.errorColor() .theme
.mode ==
"Dark")
: widget.inputColor, : widget.inputColor,
width: 3.0, width: 3.0,
), ),
@@ -243,9 +248,11 @@ class _MihTextFormFieldState extends State<MihTextFormField> {
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(
widget.borderRadius ?? 8.0), widget.borderRadius ?? 8.0),
borderSide: BorderSide( borderSide: BorderSide(
color: MzansiInnovationHub.of(context)! color: MihColors.getRedColor(
.theme MzansiInnovationHub.of(context)!
.errorColor(), .theme
.mode ==
"Dark"),
width: 3.0, width: 3.0,
), ),
), ),
@@ -253,9 +260,11 @@ class _MihTextFormFieldState extends State<MihTextFormField> {
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(
widget.borderRadius ?? 8.0), widget.borderRadius ?? 8.0),
borderSide: BorderSide( borderSide: BorderSide(
color: MzansiInnovationHub.of(context)! color: MihColors.getRedColor(
.theme MzansiInnovationHub.of(context)!
.errorColor(), .theme
.mode ==
"Dark"),
width: 3.0, width: 3.0,
), ),
), ),
@@ -276,9 +285,11 @@ class _MihTextFormFieldState extends State<MihTextFormField> {
field.errorText ?? '', field.errorText ?? '',
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
color: MzansiInnovationHub.of(context)! color: MihColors.getRedColor(
.theme MzansiInnovationHub.of(context)!
.errorColor(), .theme
.mode ==
"Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MihTimeField extends StatefulWidget { class MihTimeField extends StatefulWidget {
final TextEditingController controller; final TextEditingController controller;
@@ -57,7 +58,6 @@ class _MihTimeFieldState extends State<MihTimeField> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final theme = MzansiInnovationHub.of(context)!.theme;
return Center( return Center(
child: SizedBox( child: SizedBox(
width: widget.width, width: widget.width,
@@ -71,7 +71,8 @@ class _MihTimeFieldState extends State<MihTimeField> {
Text( Text(
widget.labelText, widget.labelText,
style: TextStyle( style: TextStyle(
color: theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -80,7 +81,9 @@ class _MihTimeFieldState extends State<MihTimeField> {
Text( Text(
"(Optional)", "(Optional)",
style: TextStyle( style: TextStyle(
color: theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -106,25 +109,35 @@ class _MihTimeFieldState extends State<MihTimeField> {
readOnly: true, readOnly: true,
onTap: () => _selectTime(context), onTap: () => _selectTime(context),
style: TextStyle( style: TextStyle(
color: theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
), ),
decoration: InputDecoration( decoration: InputDecoration(
suffixIcon: Icon( suffixIcon: Icon(
Icons.access_time, Icons.access_time,
color: theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
), ),
errorStyle: const TextStyle(height: 0, fontSize: 0), errorStyle: const TextStyle(height: 0, fontSize: 0),
contentPadding: const EdgeInsets.symmetric( contentPadding: const EdgeInsets.symmetric(
horizontal: 10.0, vertical: 8.0), horizontal: 10.0, vertical: 8.0),
filled: true, filled: true,
fillColor: theme.secondaryColor(), fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
border: OutlineInputBorder( border: OutlineInputBorder(
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(
widget.borderRadius ?? 8.0), widget.borderRadius ?? 8.0),
borderSide: field.hasError borderSide: field.hasError
? BorderSide( ? BorderSide(
color: theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
width: 2.0, width: 2.0,
) )
: BorderSide.none, : BorderSide.none,
@@ -139,8 +152,16 @@ class _MihTimeFieldState extends State<MihTimeField> {
widget.borderRadius ?? 8.0), widget.borderRadius ?? 8.0),
borderSide: BorderSide( borderSide: BorderSide(
color: field.hasError color: field.hasError
? theme.errorColor() ? MihColors.getRedColor(
: theme.secondaryColor(), MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark")
: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
width: 3.0, width: 3.0,
), ),
), ),
@@ -148,7 +169,9 @@ class _MihTimeFieldState extends State<MihTimeField> {
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(
widget.borderRadius ?? 8.0), widget.borderRadius ?? 8.0),
borderSide: BorderSide( borderSide: BorderSide(
color: theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 3.0, width: 3.0,
), ),
), ),
@@ -156,7 +179,9 @@ class _MihTimeFieldState extends State<MihTimeField> {
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(
widget.borderRadius ?? 8.0), widget.borderRadius ?? 8.0),
borderSide: BorderSide( borderSide: BorderSide(
color: theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 3.0, width: 3.0,
), ),
), ),
@@ -173,7 +198,9 @@ class _MihTimeFieldState extends State<MihTimeField> {
field.errorText ?? '', field.errorText ?? '',
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
color: theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MihToggle extends StatefulWidget { class MihToggle extends StatefulWidget {
final String hintText; final String hintText;
@@ -66,25 +67,27 @@ class _MihToggleState extends State<MihToggle> {
return Colors.grey; return Colors.grey;
} }
if (states.contains(WidgetState.selected)) { if (states.contains(WidgetState.selected)) {
return MzansiInnovationHub.of(context)! return MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.successColor(); // Outline color when active "Dark"); // Outline color when active
} }
return MzansiInnovationHub.of(context)! return MihColors.getRedColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.errorColor(); // Outline color when active "Dark"); // Outline color when active
}, },
), ),
activeColor: activeColor:
widget.readOnly == true ? Colors.grey : widget.secondaryFillColor, widget.readOnly == true ? Colors.grey : widget.secondaryFillColor,
activeTrackColor: widget.readOnly == true activeTrackColor: widget.readOnly == true
? Colors.grey.shade400 ? Colors.grey.shade400
: MzansiInnovationHub.of(context)!.theme.successColor(), : MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inactiveThumbColor: inactiveThumbColor:
widget.readOnly == true ? Colors.grey : widget.secondaryFillColor, widget.readOnly == true ? Colors.grey : widget.secondaryFillColor,
inactiveTrackColor: widget.readOnly == true inactiveTrackColor: widget.readOnly == true
? Colors.grey.shade400 ? Colors.grey.shade400
: MzansiInnovationHub.of(context)!.theme.errorColor(), : MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// activeColor: widget.secondaryFillColor, // activeColor: widget.secondaryFillColor,
// activeTrackColor: widget.fillColor, // activeTrackColor: widget.fillColor,
// inactiveThumbColor: widget.fillColor, // inactiveThumbColor: widget.fillColor,

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import '../../main.dart'; import '../../main.dart';
class MIHDeleteMessage extends StatefulWidget { class MIHDeleteMessage extends StatefulWidget {
@@ -59,10 +60,12 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
@@ -72,16 +75,16 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
Icon( Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: popUpIconSize, size: popUpIconSize,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//const SizedBox(height: 15), //const SizedBox(height: 15),
Text( Text(
"Are you sure you want to delete this?", "Are you sure you want to delete this?",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -90,8 +93,8 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
Text( Text(
"This note will be deleted permanently. Are you certain you want to delete it?", "This note will be deleted permanently. Are you certain you want to delete it?",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -99,14 +102,15 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
const SizedBox(height: 15), const SizedBox(height: 15),
MihButton( MihButton(
onPressed: widget.onTap, onPressed: widget.onTap,
buttonColor: buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Delete", "Delete",
style: TextStyle( style: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -127,7 +131,8 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),
@@ -144,10 +149,12 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
@@ -157,16 +164,16 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
Icon( Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: popUpIconSize, size: popUpIconSize,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//const SizedBox(height: 15), //const SizedBox(height: 15),
Text( Text(
"Are you sure you want to delete this?", "Are you sure you want to delete this?",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -175,8 +182,8 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
Text( Text(
"This file will be deleted permanently. Are you certain you want to delete it?", "This file will be deleted permanently. Are you certain you want to delete it?",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -184,14 +191,15 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
const SizedBox(height: 15), const SizedBox(height: 15),
MihButton( MihButton(
onPressed: widget.onTap, onPressed: widget.onTap,
buttonColor: buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Delete", "Delete",
style: TextStyle( style: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -212,7 +220,8 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),
@@ -229,10 +238,12 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
@@ -242,16 +253,16 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
Icon( Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: popUpIconSize, size: popUpIconSize,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//const SizedBox(height: 15), //const SizedBox(height: 15),
Text( Text(
"Are you sure you want to delete this?", "Are you sure you want to delete this?",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -260,8 +271,8 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
Text( Text(
"This team member will be deleted permanently from the business profile. Are you certain you want to delete it?", "This team member will be deleted permanently from the business profile. Are you certain you want to delete it?",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -270,14 +281,15 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
MihButton( MihButton(
onPressed: widget.onTap, onPressed: widget.onTap,
buttonColor: buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Delete", "Delete",
style: TextStyle( style: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -298,7 +310,8 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),
@@ -315,10 +328,12 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
@@ -328,16 +343,16 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
Icon( Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: popUpIconSize, size: popUpIconSize,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//const SizedBox(height: 15), //const SizedBox(height: 15),
Text( Text(
"Are you sure you want to delete this?", "Are you sure you want to delete this?",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -346,8 +361,8 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
Text( Text(
"This appointment will be deleted permanently from your calendar. Are you certain you want to delete it?", "This appointment will be deleted permanently from your calendar. Are you certain you want to delete it?",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -355,14 +370,15 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
const SizedBox(height: 15), const SizedBox(height: 15),
MihButton( MihButton(
onPressed: widget.onTap, onPressed: widget.onTap,
buttonColor: buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Delete", "Delete",
style: TextStyle( style: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -383,7 +399,8 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),
@@ -400,10 +417,12 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
@@ -413,16 +432,16 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
Icon( Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: popUpIconSize, size: popUpIconSize,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//const SizedBox(height: 15), //const SizedBox(height: 15),
Text( Text(
"Are you sure you want to delete this?", "Are you sure you want to delete this?",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -431,8 +450,8 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
Text( Text(
"This Card will be deleted permanently from your Mzansi Wallet. Are you certain you want to delete it?", "This Card will be deleted permanently from your Mzansi Wallet. Are you certain you want to delete it?",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -440,14 +459,15 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
const SizedBox(height: 15), const SizedBox(height: 15),
MihButton( MihButton(
onPressed: widget.onTap, onPressed: widget.onTap,
buttonColor: buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Delete", "Delete",
style: TextStyle( style: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -468,7 +488,8 @@ class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import '../../main.dart'; import '../../main.dart';
class MIHErrorMessage extends StatefulWidget { class MIHErrorMessage extends StatefulWidget {
@@ -55,10 +56,12 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
@@ -68,14 +71,16 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Icon( Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: popUpIconSize, size: popUpIconSize,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//const SizedBox(height: 5), //const SizedBox(height: 5),
Text( Text(
"Oops! Looks like some fields are missing.", "Oops! Looks like some fields are missing.",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -84,8 +89,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Text( Text(
"We noticed that some required fields are still empty. To ensure your request is processed smoothly, please fill out all the highlighted fields before submitting the form again.", "We noticed that some required fields are still empty. To ensure your request is processed smoothly, please fill out all the highlighted fields before submitting the form again.",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -94,9 +99,9 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
RichText( RichText(
text: TextSpan( text: TextSpan(
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -105,17 +110,17 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
text: "Here's a quick tip: ", text: "Here's a quick tip: ",
style: TextStyle( style: TextStyle(
fontStyle: FontStyle.italic, fontStyle: FontStyle.italic,
color: MzansiInnovationHub.of(context)! color: MihColors.getRedColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.errorColor())), "Dark"))),
const TextSpan( const TextSpan(
text: "Look for fields with an asterisk ("), text: "Look for fields with an asterisk ("),
TextSpan( TextSpan(
text: "*", text: "*",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getRedColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.errorColor())), "Dark"))),
const TextSpan( const TextSpan(
text: ") next to them, as these are mandatory."), text: ") next to them, as these are mandatory."),
], ],
@@ -137,7 +142,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),
@@ -154,10 +160,12 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
@@ -167,14 +175,16 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Icon( Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: popUpIconSize, size: popUpIconSize,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//const SizedBox(height: 15), //const SizedBox(height: 15),
Text( Text(
"Password Doesn't Meet Requirements", "Password Doesn't Meet Requirements",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -183,8 +193,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Text( Text(
"Oops! Your password doesn't quite meet our standards. To keep your account secure, please make sure your password meets the following requirements", "Oops! Your password doesn't quite meet our standards. To keep your account secure, please make sure your password meets the following requirements",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -193,9 +203,9 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
RichText( RichText(
text: TextSpan( text: TextSpan(
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
fontSize: 15.0, fontSize: 15.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -205,9 +215,9 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
style: TextStyle( style: TextStyle(
fontStyle: FontStyle.italic, fontStyle: FontStyle.italic,
fontSize: popUpBodySize, fontSize: popUpBodySize,
color: MzansiInnovationHub.of(context)! color: MihColors.getRedColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.errorColor())), "Dark"))),
const TextSpan( const TextSpan(
text: "1) Contailes at least 8 characters\n", text: "1) Contailes at least 8 characters\n",
), ),
@@ -243,7 +253,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),
@@ -260,10 +271,12 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
@@ -273,14 +286,16 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Icon( Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: popUpIconSize, size: popUpIconSize,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//const SizedBox(height: 15), //const SizedBox(height: 15),
Text( Text(
"Let's Fix That Username", "Let's Fix That Username",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -289,8 +304,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Text( Text(
"Let's create a great username for you! Just a few quick tips:\n• Your username should start with a letter.\n• You can use letters, numbers, and/ or underscores.\n• Keep it between 6 and 20 characters.\n• Avoid special characters like @, #, or \$.\"", "Let's create a great username for you! Just a few quick tips:\n• Your username should start with a letter.\n• You can use letters, numbers, and/ or underscores.\n• Keep it between 6 and 20 characters.\n• Avoid special characters like @, #, or \$.\"",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -311,7 +326,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),
@@ -328,10 +344,12 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
@@ -341,14 +359,16 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Icon( Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: popUpIconSize, size: popUpIconSize,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//const SizedBox(height: 15), //const SizedBox(height: 15),
Text( Text(
"Oops! Invalid Email", "Oops! Invalid Email",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -357,8 +377,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Text( Text(
"Looks like there's a little hiccup with that email address. Please double-check that you've entered it correctly, including the \"@\" symbol and a domain (like example@email.com).", "Looks like there's a little hiccup with that email address. Please double-check that you've entered it correctly, including the \"@\" symbol and a domain (like example@email.com).",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -379,7 +399,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),
@@ -396,10 +417,12 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
@@ -409,14 +432,16 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Icon( Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: popUpIconSize, size: popUpIconSize,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//SizedBox(height: 15), //SizedBox(height: 15),
Text( Text(
"Email Already Exists", "Email Already Exists",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -425,8 +450,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Text( Text(
"An account is already registered with this email address. Please try logging in or use a different email.", "An account is already registered with this email address. Please try logging in or use a different email.",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -435,7 +460,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Text( Text(
"Here are some things to keep in mind:", "Here are some things to keep in mind:",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpSubtitleSize, fontSize: popUpSubtitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -445,8 +471,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
"1) Are you sure you're using the correct email address associated with your account?\n2) Is your caps lock key on? Passwords are case-sensitive.\n3) If you've forgotten your password, no worries! Click on \"Forgot Password?\" to reset it.", "1) Are you sure you're using the correct email address associated with your account?\n2) Is your caps lock key on? Passwords are case-sensitive.\n3) If you've forgotten your password, no worries! Click on \"Forgot Password?\" to reset it.",
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 15.0, fontSize: 15.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -466,7 +492,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),
@@ -483,10 +510,12 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
@@ -496,14 +525,16 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Icon( Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: popUpIconSize, size: popUpIconSize,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//SizedBox(height: 15), //SizedBox(height: 15),
Text( Text(
"Passwords Don't Match", "Passwords Don't Match",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -512,8 +543,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Text( Text(
"The password and confirm password fields do not match. Please make sure they are identical.", "The password and confirm password fields do not match. Please make sure they are identical.",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -522,7 +553,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Text( Text(
"Here are some things to keep in mind:", "Here are some things to keep in mind:",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpSubtitleSize, fontSize: popUpSubtitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -532,8 +564,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
"1) Are you sure you're using the correct email address associated with your account?\n2) Is your caps lock key on? Passwords are case-sensitive.\n3) If you've forgotten your password, no worries! Click on \"Forgot Password?\" to reset it.", "1) Are you sure you're using the correct email address associated with your account?\n2) Is your caps lock key on? Passwords are case-sensitive.\n3) If you've forgotten your password, no worries! Click on \"Forgot Password?\" to reset it.",
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -554,7 +586,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),
@@ -571,10 +604,12 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
@@ -584,14 +619,16 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Icon( Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: popUpIconSize, size: popUpIconSize,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//SizedBox(height: 15), //SizedBox(height: 15),
Text( Text(
"Uh oh! Login attempt unsuccessful.", "Uh oh! Login attempt unsuccessful.",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -600,8 +637,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Text( Text(
"The email address or password you entered doesn't seem to match our records. Please double-check your information and try again.", "The email address or password you entered doesn't seem to match our records. Please double-check your information and try again.",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -610,7 +647,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Text( Text(
"Here are some things to keep in mind:", "Here are some things to keep in mind:",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpSubtitleSize, fontSize: popUpSubtitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -620,8 +658,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
"1) Are you sure you're using the correct email address associated with your account?\n2) Is your caps lock key on? Passwords are case-sensitive.\n3) If you've forgotten your password, no worries! Click on \"Forgot Password?\" to reset it.", "1) Are you sure you're using the correct email address associated with your account?\n2) Is your caps lock key on? Passwords are case-sensitive.\n3) If you've forgotten your password, no worries! Click on \"Forgot Password?\" to reset it.",
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -642,7 +680,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),
@@ -659,10 +698,12 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
@@ -672,14 +713,16 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Icon( Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: popUpIconSize, size: popUpIconSize,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//const SizedBox(height: 15), //const SizedBox(height: 15),
Text( Text(
"Internet Connection Lost!", "Internet Connection Lost!",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -688,8 +731,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Text( Text(
"We seem to be having some trouble connecting you to the internet. This could be due to a temporary outage or an issue with your device's connection.", "We seem to be having some trouble connecting you to the internet. This could be due to a temporary outage or an issue with your device's connection.",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -698,7 +741,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Text( Text(
"Here are a few things you can try:", "Here are a few things you can try:",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpSubtitleSize, fontSize: popUpSubtitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -708,8 +752,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
"1) Check your Wi-Fi signal strength or try connecting to a different network.\n2) Restart your device (computer, phone, etc.) and your router/modem.\n3) If you're using cellular data, ensure you have a strong signal and haven't reached your data limit.", "1) Check your Wi-Fi signal strength or try connecting to a different network.\n2) Restart your device (computer, phone, etc.) and your router/modem.\n3) If you're using cellular data, ensure you have a strong signal and haven't reached your data limit.",
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -730,7 +774,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),
@@ -747,10 +792,12 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
@@ -760,14 +807,16 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Icon( Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: popUpIconSize, size: popUpIconSize,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//const SizedBox(height: 15), //const SizedBox(height: 15),
Text( Text(
"Location Services Not Enabled", "Location Services Not Enabled",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -776,8 +825,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
Text( Text(
"To get the most out of MIH, we need your location. Please go to the site settings of the app and enable location services. Once you do that, we can start showing you relevant information based on your location.", "To get the most out of MIH, we need your location. Please go to the site settings of the app and enable location services. Once you do that, we can start showing you relevant information based on your location.",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -786,7 +835,7 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
// Text( // Text(
// "Here are a few things you can try:", // "Here are a few things you can try:",
// style: TextStyle( // style: TextStyle(
// color: MzansiInnovationHub.of(context)!.theme.errorColor(), // color: MihColors.getRedColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// fontSize: popUpSubtitleSize, // fontSize: popUpSubtitleSize,
// fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
// ), // ),
@@ -797,7 +846,7 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
// textAlign: TextAlign.left, // textAlign: TextAlign.left,
// style: TextStyle( // style: TextStyle(
// color: // color:
// MzansiInnovationHub.of(context)!.theme.secondaryColor(), // MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// fontSize: popUpBodySize, // fontSize: popUpBodySize,
// fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
// ), // ),
@@ -818,7 +867,8 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import '../../main.dart'; import '../../main.dart';
import 'package:gif_view/gif_view.dart'; import 'package:gif_view/gif_view.dart';
@@ -58,11 +59,12 @@ class _MihloadingcircleState extends State<Mihloadingcircle> {
// width: 250, // width: 250,
// height: 275, // height: 275,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: Column( child: Column(

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import '../../main.dart'; import '../../main.dart';
import '../../mih_components/mih_objects/arguments.dart'; import '../../mih_components/mih_objects/arguments.dart';
@@ -131,8 +132,10 @@ class _MIHNotificationMessageState extends State<MIHNotificationMessage>
void initState() { void initState() {
super.initState(); super.initState();
setState(() { setState(() {
primary = MzansiInnovationHub.of(context)!.theme.primaryColor(); primary = MihColors.getPrimaryColor(
secondary = MzansiInnovationHub.of(context)!.theme.errorColor(); MzansiInnovationHub.of(context)!.theme.mode == "Dark");
secondary = MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
}); });
_animationController = AnimationController( _animationController = AnimationController(
vsync: this, vsync: this,

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import '../../main.dart'; import '../../main.dart';
class MIHSuccessMessage extends StatefulWidget { class MIHSuccessMessage extends StatefulWidget {
@@ -59,10 +60,12 @@ class _MIHSuccessMessageState extends State<MIHSuccessMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.successColor(), color: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: Column( child: Column(
@@ -71,14 +74,16 @@ class _MIHSuccessMessageState extends State<MIHSuccessMessage> {
Icon( Icon(
Icons.check_circle_outline_rounded, Icons.check_circle_outline_rounded,
size: popUpIconSize, size: popUpIconSize,
color: MzansiInnovationHub.of(context)!.theme.successColor(), color: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//const SizedBox(height: 15), //const SizedBox(height: 15),
Text( Text(
"Success!", "Success!",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.successColor(), color: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -88,8 +93,8 @@ class _MIHSuccessMessageState extends State<MIHSuccessMessage> {
child: Text( child: Text(
message, message,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -100,14 +105,14 @@ class _MIHSuccessMessageState extends State<MIHSuccessMessage> {
onPressed: () { onPressed: () {
Navigator.pop(context); Navigator.pop(context);
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Dismiss", "Dismiss",
style: TextStyle( style: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import '../../main.dart'; import '../../main.dart';
class MIHWarningMessage extends StatefulWidget { class MIHWarningMessage extends StatefulWidget {
@@ -56,10 +57,12 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
@@ -69,16 +72,16 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
Icon( Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: popUpIconSize, size: popUpIconSize,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//const SizedBox(height: 15), //const SizedBox(height: 15),
Text( Text(
"Access Pending", "Access Pending",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -87,8 +90,8 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
Text( Text(
"Your access request is currently being reviewed.\nOnce approved, you'll be able to view patient data.\nPlease follow up with the patient to approve your access request.", "Your access request is currently being reviewed.\nOnce approved, you'll be able to view patient data.\nPlease follow up with the patient to approve your access request.",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -109,7 +112,8 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),
@@ -126,10 +130,12 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
@@ -139,16 +145,16 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
Icon( Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: popUpIconSize, size: popUpIconSize,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//const SizedBox(height: 15), //const SizedBox(height: 15),
Text( Text(
"Patient Profile Access Needed", "Patient Profile Access Needed",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -157,8 +163,8 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
Text( Text(
"To proceed with booking an appointment, you must have access to the patient's profile. This will allow you to view their medical history and other relevant information. Please contact the appropriate administrator to request access.", "To proceed with booking an appointment, you must have access to the patient's profile. This will allow you to view their medical history and other relevant information. Please contact the appropriate administrator to request access.",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -179,7 +185,8 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),
@@ -196,10 +203,12 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
@@ -209,16 +218,16 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
Icon( Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: popUpIconSize, size: popUpIconSize,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//const SizedBox(height: 15), //const SizedBox(height: 15),
Text( Text(
"Appointment Cancelled", "Appointment Cancelled",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -227,8 +236,8 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
Text( Text(
"This appointment has been canceled. As a result, you no longer have access to the patient's profile. If you would like to view the patient's profile again, please book a new appointment.", "This appointment has been canceled. As a result, you no longer have access to the patient's profile. If you would like to view the patient's profile again, please book a new appointment.",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -249,7 +258,8 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),
@@ -266,10 +276,12 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
@@ -279,16 +291,16 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
Icon( Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: popUpIconSize, size: popUpIconSize,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//const SizedBox(height: 15), //const SizedBox(height: 15),
Text( Text(
"Access Cancelled", "Access Cancelled",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -297,8 +309,8 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
Text( Text(
"This appointment has been canceled. As a result, access has been cancelled and the doctor no longer have access to the patient's profile. If you would like them to view the patient's profile again, please book a new appointment through them.", "This appointment has been canceled. As a result, access has been cancelled and the doctor no longer have access to the patient's profile. If you would like them to view the patient's profile again, please book a new appointment through them.",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -319,7 +331,8 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),
@@ -336,10 +349,12 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
@@ -349,16 +364,16 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
Icon( Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: popUpIconSize, size: popUpIconSize,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//const SizedBox(height: 15), //const SizedBox(height: 15),
Text( Text(
"Access Declined", "Access Declined",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -367,8 +382,8 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
Text( Text(
"Your request to access the patient's profile has been denied. Please contact the patient directly to inquire about the reason for this restriction.", "Your request to access the patient's profile has been denied. Please contact the patient directly to inquire about the reason for this restriction.",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -389,7 +404,8 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),
@@ -406,10 +422,12 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
width: popUpWidth, width: popUpWidth,
height: popUpheight, height: popUpheight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 5.0), width: 5.0),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
@@ -419,16 +437,16 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
Icon( Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: popUpIconSize, size: popUpIconSize,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//const SizedBox(height: 15), //const SizedBox(height: 15),
Text( Text(
"Access Expired", "Access Expired",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpTitleSize, fontSize: popUpTitleSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -437,8 +455,8 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
Text( Text(
"You no longer have access to this patient profile. The authorized access period has ended. Access to a patients profile is limited to 7 days from appointment date.", "You no longer have access to this patient profile. The authorized access period has ended. Access to a patients profile is limited to 7 days from appointment date.",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -459,7 +477,8 @@ class _MIHDeleteMessageState extends State<MIHWarningMessage> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),

View File

@@ -1,74 +1,96 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/main.dart';
class MihColors { class MihColors {
static Color getPrimaryColor(bool darkMode) {
static Color getPrimaryColor(BuildContext context) { if (darkMode == true) {
if(MzansiInnovationHub.of(context)!.theme.mode == "Dark"){
return const Color(0XFF3A4454); return const Color(0XFF3A4454);
}else{ } else {
return const Color(0XFFbedcfe); return const Color(0XFFbedcfe);
} }
} }
static Color getSecondaryColor(BuildContext context) { static Color getSecondaryColor(bool darkMode) {
if(MzansiInnovationHub.of(context)!.theme.mode == "Dark"){ if (darkMode == true) {
return const Color(0XFFbedcfe); return const Color(0XFFbedcfe);
}else{ } else {
return const Color(0XFF3A4454); return const Color(0XFF3A4454);
} }
} }
static Color getGreenColor(BuildContext context) { static Color getHighlightColor(bool darkMode) {
if(MzansiInnovationHub.of(context)!.theme.mode == "Dark"){ if (darkMode == true) {
return const Color(0XFF9bc7fa);
} else {
return const Color(0XFF354866);
}
}
static Color getGreyColor(bool darkMode) {
if (darkMode == true) {
return const Color(0XFFc8c8c8);
} else {
return const Color(0XFF747474);
}
}
static Color getGreenColor(bool darkMode) {
if (darkMode == true) {
return const Color(0xff8ae290); return const Color(0xff8ae290);
}else{ } else {
return const Color(0xffB0F2B4); return const Color(0xffB0F2B4);
} }
} }
static Color getRedColor(BuildContext context) { static Color getRedColor(bool darkMode) {
if(MzansiInnovationHub.of(context)!.theme.mode == "Dark"){ if (darkMode == true) {
return const Color(0xffD87E8B); return const Color(0xffD87E8B);
}else{ } else {
return const Color(0xffbb3d4f); return const Color(0xffbb3d4f);
} }
} }
static Color getPinkColor(BuildContext context) { static Color getPinkColor(bool darkMode) {
if(MzansiInnovationHub.of(context)!.theme.mode == "Dark"){ if (darkMode == true) {
return const Color(0xffdaa2e9); return const Color(0xffdaa2e9);
}else{ } else {
// Add a different shade of pink for light mode // Add a different shade of pink for light mode
return const Color(0xffdaa2e9); return const Color(0xffdaa2e9);
} }
} }
static Color getOrangeColor(BuildContext context) { static Color getOrangeColor(bool darkMode) {
if(MzansiInnovationHub.of(context)!.theme.mode == "Dark"){ if (darkMode == true) {
return const Color(0xffd69d7d); return const Color(0xffd69d7d);
}else{ } else {
// Add a different shade of pink for light mode // Add a different shade of pink for light mode
return const Color(0xffd69d7d); return const Color(0xffd69d7d);
} }
} }
static Color getYellowColor(BuildContext context) { static Color getYellowColor(bool darkMode) {
if(MzansiInnovationHub.of(context)!.theme.mode == "Dark"){ if (darkMode == true) {
return const Color(0xfff4e467); return const Color(0xfff4e467);
}else{ } else {
// Add a different shade of pink for light mode // Add a different shade of pink for light mode
return const Color(0xffd4af37); return const Color(0xffd4af37);
} }
} }
static Color getBluishPurpleColor(BuildContext context) { static Color getBluishPurpleColor(bool darkMode) {
if(MzansiInnovationHub.of(context)!.theme.mode == "Dark"){ if (darkMode == true) {
return const Color(0xff6e7dcc); return const Color(0xff6e7dcc);
}else{ } else {
// Add a different shade of pink for light mode // Add a different shade of pink for light mode
return const Color(0xff6e7dcc); return const Color(0xff6e7dcc);
} }
} }
} static Color getPurpleColor(bool darkMode) {
if (darkMode == true) {
return const Color(0xffb682e7);
} else {
// Add a different shade of pink for light mode
return const Color(0xffb682e7);
}
}
}

View File

@@ -1,12 +1,13 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import "package:universal_html/html.dart" as html; import "package:universal_html/html.dart" as html;
class MihTheme { class MihTheme {
late int _mainColor; // late int _mainColor;
late int _secondColor; // late int _secondColor;
//late int _errColor; //late int _errColor;
//late int _succColor; //late int _succColor;
late int _mesColor; // late int _mesColor;
late String mode; late String mode;
late String screenType; late String screenType;
late AssetImage loading; late AssetImage loading;
@@ -32,10 +33,10 @@ class MihTheme {
//_mesColor = 0xffc8c8c8d9; //_mesColor = 0xffc8c8c8d9;
} }
ThemeData getData() { ThemeData getData(bool bool) {
return ThemeData( return ThemeData(
fontFamily: 'Segoe UI', fontFamily: 'Segoe UI',
scaffoldBackgroundColor: primaryColor(), scaffoldBackgroundColor: MihColors.getPrimaryColor(mode == "Dark"),
// pageTransitionsTheme: PageTransitionsTheme( // pageTransitionsTheme: PageTransitionsTheme(
// builders: Map<TargetPlatform, PageTransitionsBuilder>.fromIterable( // builders: Map<TargetPlatform, PageTransitionsBuilder>.fromIterable(
// TargetPlatform.values, // TargetPlatform.values,
@@ -44,36 +45,37 @@ class MihTheme {
// ), // ),
colorScheme: ColorScheme( colorScheme: ColorScheme(
brightness: getBritness(), brightness: getBritness(),
primary: secondaryColor(), primary: MihColors.getSecondaryColor(mode == "Dark"),
onPrimary: primaryColor(), onPrimary: MihColors.getPrimaryColor(mode == "Dark"),
secondary: primaryColor(), secondary: MihColors.getPrimaryColor(mode == "Dark"),
onSecondary: secondaryColor(), onSecondary: MihColors.getSecondaryColor(mode == "Dark"),
error: errorColor(), error: MihColors.getRedColor(mode == "Dark"),
onError: primaryColor(), onError: MihColors.getPrimaryColor(mode == "Dark"),
surface: primaryColor(), surface: MihColors.getPrimaryColor(mode == "Dark"),
onSurface: secondaryColor(), onSurface: MihColors.getSecondaryColor(mode == "Dark"),
), ),
datePickerTheme: DatePickerThemeData( datePickerTheme: DatePickerThemeData(
backgroundColor: primaryColor(), backgroundColor: MihColors.getPrimaryColor(mode == "Dark"),
headerBackgroundColor: secondaryColor(), headerBackgroundColor: MihColors.getSecondaryColor(mode == "Dark"),
headerForegroundColor: primaryColor(), headerForegroundColor: MihColors.getPrimaryColor(mode == "Dark"),
), ),
appBarTheme: AppBarTheme( appBarTheme: AppBarTheme(
color: secondaryColor(), color: MihColors.getSecondaryColor(mode == "Dark"),
foregroundColor: primaryColor(), foregroundColor: MihColors.getPrimaryColor(mode == "Dark"),
titleTextStyle: TextStyle( titleTextStyle: TextStyle(
color: primaryColor(), color: MihColors.getPrimaryColor(mode == "Dark"),
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
floatingActionButtonTheme: FloatingActionButtonThemeData( floatingActionButtonTheme: FloatingActionButtonThemeData(
backgroundColor: secondaryColor(), backgroundColor: MihColors.getSecondaryColor(mode == "Dark"),
foregroundColor: primaryColor(), foregroundColor: MihColors.getPrimaryColor(mode == "Dark"),
extendedTextStyle: TextStyle(color: primaryColor()), extendedTextStyle:
TextStyle(color: MihColors.getPrimaryColor(mode == "Dark")),
), ),
drawerTheme: DrawerThemeData( drawerTheme: DrawerThemeData(
backgroundColor: primaryColor(), backgroundColor: MihColors.getPrimaryColor(mode == "Dark"),
)); ));
} }
@@ -110,15 +112,15 @@ class MihTheme {
} }
ThemeData getThemeData() { ThemeData getThemeData() {
return getData(); return getData(mode == "Dark");
} }
ThemeData darkMode() { ThemeData darkMode() {
return getData(); return getData(mode == "Dark");
} }
ThemeData lightMode() { ThemeData lightMode() {
return getData(); return getData(mode == "Dark");
} }
Brightness getBritness() { Brightness getBritness() {
@@ -129,39 +131,39 @@ class MihTheme {
} }
} }
Color messageTextColor() { // Color messageTextColor() {
if (mode == "Dark") { // if (mode == "Dark") {
_mesColor = 0XFFc8c8c8; // _mesColor = 0XFFc8c8c8;
} else { // } else {
_mesColor = 0XFF747474; // _mesColor = 0XFF747474;
} // }
return Color(_mesColor); // return Color(_mesColor);
} // }
Color errorColor() { // Color errorColor() {
if (mode == "Dark") { // if (mode == "Dark") {
return const Color(0xffD87E8B); // return const Color(0xffD87E8B);
} else { // } else {
return const Color(0xffbb3d4f); // return const Color(0xffbb3d4f);
} // }
//return Color(_errColor); // //return Color(_errColor);
} // }
Color highlightColor() { // Color highlightColor() {
if (mode == "Dark") { // if (mode == "Dark") {
return const Color(0XFF9bc7fa); // return const Color(0XFF9bc7fa);
} else { // } else {
return const Color(0XFF354866); // return const Color(0XFF354866);
} // }
} // }
Color successColor() { // Color successColor() {
if (mode == "Dark") { // if (mode == "Dark") {
return const Color(0xffB0F2B4); // return const Color(0xffB0F2B4);
} else { // } else {
return const Color(0xff56a95b); // return const Color(0xff56a95b);
} // }
} // }
AssetImage loadingImage() { AssetImage loadingImage() {
if (mode == "Dark") { if (mode == "Dark") {
@@ -231,21 +233,21 @@ class MihTheme {
} }
} }
Color primaryColor() { // Color MihColors.getPrimaryColor(mode == "Dark") {
if (mode == "Dark") { // if (mode == "Dark") {
_mainColor = 0XFF3A4454; // _mainColor = 0XFF3A4454;
} else { // } else {
_mainColor = 0XFFbedcfe; // _mainColor = 0XFFbedcfe;
} // }
return Color(_mainColor); // return Color(_mainColor);
} // }
Color secondaryColor() { // Color MihColors.getSecondaryColor(mode == "Dark") {
if (mode == "Dark") { // if (mode == "Dark") {
_secondColor = 0XFFbedcfe; // _secondColor = 0XFFbedcfe;
} else { // } else {
_secondColor = 0XFF3A4454; // _secondColor = 0XFF3A4454;
} // }
return Color(_secondColor); // return Color(_secondColor);
} // }
} }

View File

@@ -1,6 +1,7 @@
import 'package:mzansi_innovation_hub/main.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class PolicyAndTermsText { class PolicyAndTermsText {
List<Widget> getPrivacyPolicyText(BuildContext context) { List<Widget> getPrivacyPolicyText(BuildContext context) {
@@ -30,7 +31,8 @@ class PolicyAndTermsText {
child: FittedBox( child: FittedBox(
child: Icon( child: Icon(
MihIcons.mihLogo, MihIcons.mihLogo,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
), ),
@@ -427,7 +429,8 @@ class PolicyAndTermsText {
child: FittedBox( child: FittedBox(
child: Icon( child: Icon(
MihIcons.mihLogo, MihIcons.mihLogo,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
), ),

View File

@@ -2,6 +2,7 @@ import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tile.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tile.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class AboutMihTile extends StatefulWidget { class AboutMihTile extends StatefulWidget {
final double packageSize; final double packageSize;
@@ -27,12 +28,15 @@ class _AboutMihTileState extends State<AboutMihTile> {
appName: "About MIH", appName: "About MIH",
appIcon: Icon( appIcon: Icon(
MihIcons.aboutMih, MihIcons.aboutMih,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// size: widget.packageSize, // size: widget.packageSize,
), ),
iconSize: widget.packageSize, iconSize: widget.packageSize,
primaryColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(), primaryColor: MihColors.getSecondaryColor(
secondaryColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), 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_package_components/mih_button.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.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:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class MihAttributes extends StatefulWidget { class MihAttributes extends StatefulWidget {
@@ -34,8 +35,8 @@ class _MihAttributesState extends State<MihAttributes> {
child: Icon( child: Icon(
icon, icon,
// size: 125, // size: 125,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
), ),
@@ -70,13 +71,14 @@ class _MihAttributesState extends State<MihAttributes> {
), ),
); );
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 100, width: 100,
child: Text( child: Text(
"Visit", "Visit",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -110,7 +112,8 @@ class _MihAttributesState extends State<MihAttributes> {
children: [ children: [
Icon( Icon(
MihIcons.mihLogo, MihIcons.mihLogo,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 165, size: 165,
), ),
const SizedBox( const SizedBox(

View File

@@ -1,5 +1,6 @@
import 'package:flutter_speed_dial/flutter_speed_dial.dart'; import 'package:flutter_speed_dial/flutter_speed_dial.dart';
import 'package:mzansi_innovation_hub/main.dart'; 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_install_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_install_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_single_child_scroll.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_tile.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_tile.dart';
@@ -62,8 +63,8 @@ class _MihInfoState extends State<MihInfo> {
Padding( Padding(
padding: const EdgeInsets.only(left: 4.0), padding: const EdgeInsets.only(left: 4.0),
child: CircleAvatar( child: CircleAvatar(
backgroundColor: backgroundColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
backgroundImage: const AssetImage( backgroundImage: const AssetImage(
"lib/mih_components/mih_package_components/assets/images/founder.jpg"), "lib/mih_components/mih_package_components/assets/images/founder.jpg"),
//'https://media.licdn.com/dms/image/D4D03AQGd1-QhjtWWpA/profile-displayphoto-shrink_400_400/0/1671698053061?e=2147483647&v=beta&t=a3dJI5yxs5-KeXjj10LcNCFuC9IOfa8nNn3k_Qyr0CA'), //'https://media.licdn.com/dms/image/D4D03AQGd1-QhjtWWpA/profile-displayphoto-shrink_400_400/0/1671698053061?e=2147483647&v=beta&t=a3dJI5yxs5-KeXjj10LcNCFuC9IOfa8nNn3k_Qyr0CA'),
@@ -73,7 +74,8 @@ class _MihInfoState extends State<MihInfo> {
Icon( Icon(
MihIcons.mihRing, MihIcons.mihRing,
size: 165, size: 165,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
], ],
), ),
@@ -233,12 +235,15 @@ class _MihInfoState extends State<MihInfo> {
tileIcon: Center( tileIcon: Center(
child: FaIcon( child: FaIcon(
FontAwesomeIcons.youtube, FontAwesomeIcons.youtube,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 175, size: 175,
), ),
), ),
p: MzansiInnovationHub.of(context)!.theme.secondaryColor(), p: MihColors.getSecondaryColor(
s: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
s: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
)); ));
//================================================================== //==================================================================
socials.add(MIHTile( socials.add(MIHTile(
@@ -249,12 +254,15 @@ class _MihInfoState extends State<MihInfo> {
tileIcon: Center( tileIcon: Center(
child: FaIcon( child: FaIcon(
FontAwesomeIcons.tiktok, FontAwesomeIcons.tiktok,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 200, size: 200,
), ),
), ),
p: MzansiInnovationHub.of(context)!.theme.secondaryColor(), p: MihColors.getSecondaryColor(
s: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
s: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
)); ));
//================================================================== //==================================================================
socials.add(MIHTile( socials.add(MIHTile(
@@ -265,12 +273,15 @@ class _MihInfoState extends State<MihInfo> {
tileIcon: Center( tileIcon: Center(
child: FaIcon( child: FaIcon(
FontAwesomeIcons.twitch, FontAwesomeIcons.twitch,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 200, size: 200,
), ),
), ),
p: MzansiInnovationHub.of(context)!.theme.secondaryColor(), p: MihColors.getSecondaryColor(
s: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
s: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
)); ));
//================================================================== //==================================================================
socials.add(MIHTile( socials.add(MIHTile(
@@ -281,12 +292,15 @@ class _MihInfoState extends State<MihInfo> {
tileIcon: Center( tileIcon: Center(
child: FaIcon( child: FaIcon(
FontAwesomeIcons.threads, FontAwesomeIcons.threads,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 200, size: 200,
), ),
), ),
p: MzansiInnovationHub.of(context)!.theme.secondaryColor(), p: MihColors.getSecondaryColor(
s: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
s: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
)); ));
//================================================================== //==================================================================
socials.add(MIHTile( socials.add(MIHTile(
@@ -297,12 +311,15 @@ class _MihInfoState extends State<MihInfo> {
tileIcon: Center( tileIcon: Center(
child: FaIcon( child: FaIcon(
FontAwesomeIcons.whatsapp, FontAwesomeIcons.whatsapp,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 200, size: 200,
), ),
), ),
p: MzansiInnovationHub.of(context)!.theme.secondaryColor(), p: MihColors.getSecondaryColor(
s: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
s: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
)); ));
//================================================================== //==================================================================
socials.add(MIHTile( socials.add(MIHTile(
@@ -313,12 +330,15 @@ class _MihInfoState extends State<MihInfo> {
tileIcon: Center( tileIcon: Center(
child: FaIcon( child: FaIcon(
FontAwesomeIcons.instagram, FontAwesomeIcons.instagram,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 200, size: 200,
), ),
), ),
p: MzansiInnovationHub.of(context)!.theme.secondaryColor(), p: MihColors.getSecondaryColor(
s: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
s: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
)); ));
//================================================================== //==================================================================
@@ -330,12 +350,15 @@ class _MihInfoState extends State<MihInfo> {
tileIcon: Center( tileIcon: Center(
child: FaIcon( child: FaIcon(
FontAwesomeIcons.xTwitter, FontAwesomeIcons.xTwitter,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 200, size: 200,
), ),
), ),
p: MzansiInnovationHub.of(context)!.theme.secondaryColor(), p: MihColors.getSecondaryColor(
s: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
s: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
)); ));
//================================================================== //==================================================================
socials.add(MIHTile( socials.add(MIHTile(
@@ -346,12 +369,15 @@ class _MihInfoState extends State<MihInfo> {
tileIcon: Center( tileIcon: Center(
child: FaIcon( child: FaIcon(
FontAwesomeIcons.linkedin, FontAwesomeIcons.linkedin,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 200, size: 200,
), ),
), ),
p: MzansiInnovationHub.of(context)!.theme.secondaryColor(), p: MihColors.getSecondaryColor(
s: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
s: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
)); ));
//================================================================== //==================================================================
socials.add(MIHTile( socials.add(MIHTile(
@@ -362,12 +388,15 @@ class _MihInfoState extends State<MihInfo> {
tileIcon: Center( tileIcon: Center(
child: FaIcon( child: FaIcon(
FontAwesomeIcons.facebook, FontAwesomeIcons.facebook,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 200, size: 200,
), ),
), ),
p: MzansiInnovationHub.of(context)!.theme.secondaryColor(), p: MihColors.getSecondaryColor(
s: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
s: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
)); ));
//================================================================== //==================================================================
socials.add(MIHTile( socials.add(MIHTile(
@@ -378,12 +407,15 @@ class _MihInfoState extends State<MihInfo> {
tileIcon: Center( tileIcon: Center(
child: FaIcon( child: FaIcon(
FontAwesomeIcons.reddit, FontAwesomeIcons.reddit,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 200, size: 200,
), ),
), ),
p: MzansiInnovationHub.of(context)!.theme.secondaryColor(), p: MihColors.getSecondaryColor(
s: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
s: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
)); ));
//================================================================== //==================================================================
socials.add(MIHTile( socials.add(MIHTile(
@@ -395,19 +427,22 @@ class _MihInfoState extends State<MihInfo> {
child: Text( child: Text(
"KICK", "KICK",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 100, fontSize: 100,
), ),
), ),
// FaIcon( // FaIcon(
// FontAwesomeIcons.tv, // FontAwesomeIcons.tv,
// color: MzansiInnovationHub.of(context)!.theme.primaryColor(), // color: MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// size: 200, // size: 200,
// ), // ),
), ),
p: MzansiInnovationHub.of(context)!.theme.secondaryColor(), p: MihColors.getSecondaryColor(
s: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
s: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
)); ));
//================================================================== //==================================================================
return socials; return socials;
@@ -447,13 +482,15 @@ class _MihInfoState extends State<MihInfo> {
children: [ children: [
FaIcon( FaIcon(
platformIcon, platformIcon,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
const SizedBox(width: 10), const SizedBox(width: 10),
Text( Text(
btnText, btnText,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -489,8 +526,8 @@ class _MihInfoState extends State<MihInfo> {
child: FittedBox( child: FittedBox(
child: Icon( child: Icon(
MihIcons.mihLogo, MihIcons.mihLogo,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
), ),
@@ -541,8 +578,9 @@ class _MihInfoState extends State<MihInfo> {
onPressed: () { onPressed: () {
MihInstallServices().installMihTrigger(context); MihInstallServices().installMihTrigger(context);
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 300, width: 300,
child: getInstallButtonText(), child: getInstallButtonText(),
), ),
@@ -554,25 +592,26 @@ class _MihInfoState extends State<MihInfo> {
), ),
); );
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 300, width: 300,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
FaIcon( FaIcon(
FontAwesomeIcons.youtube, FontAwesomeIcons.youtube,
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
), ),
const SizedBox(width: 10), const SizedBox(width: 10),
Text( Text(
"MIH Beginners Guide", "MIH Beginners Guide",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -588,25 +627,26 @@ class _MihInfoState extends State<MihInfo> {
), ),
); );
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 300, width: 300,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
FaIcon( FaIcon(
FontAwesomeIcons.patreon, FontAwesomeIcons.patreon,
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
), ),
const SizedBox(width: 10), const SizedBox(width: 10),
Text( Text(
"Support Our Journey", "Support Our Journey",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -650,17 +690,19 @@ class _MihInfoState extends State<MihInfo> {
SpeedDialChild( SpeedDialChild(
child: Icon( child: Icon(
Icons.vpn_lock, Icons.vpn_lock,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
label: "MIH - Web", label: "MIH - Web",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () { onTap: () {
shareMIHLink( shareMIHLink(
context, context,
@@ -672,17 +714,19 @@ class _MihInfoState extends State<MihInfo> {
SpeedDialChild( SpeedDialChild(
child: Icon( child: Icon(
Icons.apple, Icons.apple,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
label: "MIH - iOS", label: "MIH - iOS",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () { onTap: () {
shareMIHLink( shareMIHLink(
context, context,
@@ -694,17 +738,19 @@ class _MihInfoState extends State<MihInfo> {
SpeedDialChild( SpeedDialChild(
child: Icon( child: Icon(
Icons.android, Icons.android,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
label: "MIH - Android", label: "MIH - Android",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () { onTap: () {
shareMIHLink( shareMIHLink(
context, context,

View File

@@ -7,6 +7,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_success_message.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_success_message.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_warning_message.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_warning_message.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_env.dart'; import 'package:mzansi_innovation_hub/mih_config/mih_env.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/access_request.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/access_request.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart';
@@ -132,25 +133,28 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
accessWithColour = TextSpan( accessWithColour = TextSpan(
text: "$access\n", text: "$access\n",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.successColor())); color: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark")));
} else if (access == "PENDING") { } else if (access == "PENDING") {
accessWithColour = TextSpan( accessWithColour = TextSpan(
text: "$access\n", text: "$access\n",
style: TextStyle( style: TextStyle(
color: color: MihColors.getGreyColor(
MzansiInnovationHub.of(context)!.theme.messageTextColor())); MzansiInnovationHub.of(context)!.theme.mode == "Dark")));
} else { } else {
accessWithColour = TextSpan( accessWithColour = TextSpan(
text: "$access\n", text: "$access\n",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.errorColor())); color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark")));
} }
return ListTile( return ListTile(
title: Text( title: Text(
line1, line1,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
subtitle: RichText( subtitle: RichText(
@@ -166,7 +170,7 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
// Text( // Text(
// subtitle, // subtitle,
// style: TextStyle( // style: TextStyle(
// color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), // color: MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ), // ),
// ), // ),
onTap: () { onTap: () {
@@ -178,7 +182,7 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
}, },
// trailing: Icon( // trailing: Icon(
// Icons.arrow_forward, // Icons.arrow_forward,
// color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), // color: MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ), // ),
); );
} }
@@ -233,8 +237,8 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
subtitle, subtitle,
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
//fontWeight: FontWeight.bold, //fontWeight: FontWeight.bold,
), ),
@@ -248,15 +252,15 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
onPressed: () { onPressed: () {
updateAccessAPICall(index, "declined"); updateAccessAPICall(index, "declined");
}, },
buttonColor: buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Decline", "Decline",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -266,15 +270,15 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
onPressed: () { onPressed: () {
updateAccessAPICall(index, "approved"); updateAccessAPICall(index, "approved");
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Approve", "Approve",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -311,7 +315,8 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
separatorBuilder: (BuildContext context, index) { separatorBuilder: (BuildContext context, index) {
return Divider( return Divider(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}, },
itemCount: widget.accessRequests.length, itemCount: widget.accessRequests.length,

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/main.dart'; 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_service_calls.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_service_calls.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart';
@@ -85,25 +86,28 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
accessWithColour = TextSpan( accessWithColour = TextSpan(
text: "$access\n", text: "$access\n",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.successColor())); color: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark")));
} else if (access == "PENDING") { } else if (access == "PENDING") {
accessWithColour = TextSpan( accessWithColour = TextSpan(
text: "$access\n", text: "$access\n",
style: TextStyle( style: TextStyle(
color: color: MihColors.getGreyColor(
MzansiInnovationHub.of(context)!.theme.messageTextColor())); MzansiInnovationHub.of(context)!.theme.mode == "Dark")));
} else { } else {
accessWithColour = TextSpan( accessWithColour = TextSpan(
text: "$access\n", text: "$access\n",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.errorColor())); color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark")));
} }
return ListTile( return ListTile(
title: Text( title: Text(
line1, line1,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
subtitle: RichText( subtitle: RichText(
@@ -118,7 +122,7 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
// Text( // Text(
// subtitle, // subtitle,
// style: TextStyle( // style: TextStyle(
// color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), // color: MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ), // ),
// ), // ),
onTap: () { onTap: () {
@@ -126,7 +130,7 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
}, },
// trailing: Icon( // trailing: Icon(
// Icons.arrow_forward, // Icons.arrow_forward,
// color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), // color: MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ), // ),
); );
} }
@@ -194,8 +198,8 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
subtitle, subtitle,
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
//fontWeight: FontWeight.bold, //fontWeight: FontWeight.bold,
), ),
@@ -212,16 +216,18 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
"Important Notice: Approving Profile Access", "Important Notice: Approving Profile Access",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
), ),
), ),
Text( Text(
"You are about to accept access to your patient's profile. Please be aware of the following important points:", "You are about to accept access to your patient's profile. Please be aware of the following important points:",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
), ),
), ),
SizedBox( SizedBox(
@@ -230,9 +236,9 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
"1. Permanent Access: Once you accepts this access request, it will become permanent.", "1. Permanent Access: Once you accepts this access request, it will become permanent.",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: MzansiInnovationHub.of(context)! color: MihColors.getRedColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.errorColor(), "Dark"),
), ),
), ),
), ),
@@ -242,9 +248,9 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
"2. Shared Information: Any updates make to youe patient profile will be visible to all who have access to the profile.", "2. Shared Information: Any updates make to youe patient profile will be visible to all who have access to the profile.",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: MzansiInnovationHub.of(context)! color: MihColors.getRedColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.errorColor(), "Dark"),
), ),
), ),
), ),
@@ -254,9 +260,9 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
"3. Irreversible Access: Once granted, you cannot revoke access to your patient's profile.", "3. Irreversible Access: Once granted, you cannot revoke access to your patient's profile.",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: MzansiInnovationHub.of(context)! color: MihColors.getRedColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.errorColor(), "Dark"),
), ),
), ),
), ),
@@ -264,8 +270,9 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
"By pressing the \"Approve\" button you accept the above terms.", "By pressing the \"Approve\" button you accept the above terms.",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
), ),
), ),
], ],
@@ -281,16 +288,18 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
"Important Notice: Approved Profile Access", "Important Notice: Approved Profile Access",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
), ),
), ),
Text( Text(
"You have accepted access to your patient's profile. Please be aware of the following important points:", "You have accepted access to your patient's profile. Please be aware of the following important points:",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
), ),
), ),
SizedBox( SizedBox(
@@ -299,9 +308,9 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
"1. Permanent Access: This access is permanent.", "1. Permanent Access: This access is permanent.",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: MzansiInnovationHub.of(context)! color: MihColors.getRedColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.errorColor(), "Dark"),
), ),
), ),
), ),
@@ -311,9 +320,9 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
"2. Shared Information: Any updates make to youe patient profile will be visible to all who have access to the profile.", "2. Shared Information: Any updates make to youe patient profile will be visible to all who have access to the profile.",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: MzansiInnovationHub.of(context)! color: MihColors.getRedColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.errorColor(), "Dark"),
), ),
), ),
), ),
@@ -323,9 +332,9 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
"3. Irreversible Access: You cannot revoke this access to your patient's profile.", "3. Irreversible Access: You cannot revoke this access to your patient's profile.",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: MzansiInnovationHub.of(context)! color: MihColors.getRedColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.errorColor(), "Dark"),
), ),
), ),
), ),
@@ -355,15 +364,16 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
context, context,
); );
}, },
buttonColor: buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Decline", "Decline",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -382,15 +392,16 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
context, context,
); );
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Approve", "Approve",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -428,7 +439,8 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
separatorBuilder: (BuildContext context, index) { separatorBuilder: (BuildContext context, index) {
return Divider( return Divider(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}, },
itemCount: widget.patientAccessList.length, itemCount: widget.patientAccessList.length,

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_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MihAccessTile extends StatefulWidget { class MihAccessTile extends StatefulWidget {
final AppUser signedInUser; final AppUser signedInUser;
@@ -31,12 +32,15 @@ class _MihAccessTileState extends State<MihAccessTile> {
appName: "Access Controls", appName: "Access Controls",
appIcon: Icon( appIcon: Icon(
MihIcons.accessControl, MihIcons.accessControl,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// size: widget.packageSize, // size: widget.packageSize,
), ),
iconSize: widget.packageSize, iconSize: widget.packageSize,
primaryColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(), primaryColor: MihColors.getSecondaryColor(
secondaryColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
secondaryColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
} }
} }

View File

@@ -1,11 +1,12 @@
import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.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_validation_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_validation_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_single_child_scroll.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_dropdwn_field.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_dropdwn_field.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../../main.dart';
import '../../../mih_services/mih_service_calls.dart'; import '../../../mih_services/mih_service_calls.dart';
import '../../../mih_components/mih_layout/mih_action.dart'; import '../../../mih_components/mih_layout/mih_action.dart';
import '../../../mih_components/mih_layout/mih_header.dart'; import '../../../mih_components/mih_layout/mih_header.dart';
@@ -197,9 +198,9 @@ class _MihAccessRequestState extends State<MihAccessRequest> {
Icon( Icon(
MihIcons.accessControl, MihIcons.accessControl,
size: 165, size: 165,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Text( Text(
@@ -209,9 +210,9 @@ class _MihAccessRequestState extends State<MihAccessRequest> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
// const SizedBox(height: 10), // const SizedBox(height: 10),
@@ -269,9 +270,9 @@ class _MihAccessRequestState extends State<MihAccessRequest> {
"$errorCode: Error pulling Patients Data\n$baseUrl/queue/patients/\n$errorBody", "$errorCode: Error pulling Patients Data\n$baseUrl/queue/patients/\n$errorBody",
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
color: MzansiInnovationHub.of(context)! color: MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.errorColor()), "Dark")),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
); );

View File

@@ -6,6 +6,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_layout_build
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_alert.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_alert.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.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_packages/mih_home/mih_profile_getter.dart'; import 'package:mzansi_innovation_hub/mih_packages/mih_home/mih_profile_getter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:local_auth/local_auth.dart'; import 'package:local_auth/local_auth.dart';
@@ -38,7 +39,8 @@ class _BiometricCheckState extends State<BiometricCheck> {
child: FittedBox( child: FittedBox(
child: Icon( child: Icon(
MihIcons.mihLogo, MihIcons.mihLogo,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
), ),
@@ -109,7 +111,8 @@ class _BiometricCheckState extends State<BiometricCheck> {
Widget alertpopUp = MihPackageAlert( Widget alertpopUp = MihPackageAlert(
alertIcon: Icon( alertIcon: Icon(
Icons.fingerprint, Icons.fingerprint,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 100, size: 100,
), ),
alertTitle: "Biometric Authentication Error", alertTitle: "Biometric Authentication Error",
@@ -120,7 +123,8 @@ class _BiometricCheckState extends State<BiometricCheck> {
"Hi there! To jump into the MIH Home Package, you'll need to authenticate yourself with your phones biometrics, please set up biometric authentication (like fingerprint, face ID, pattern or pin) on your device first.\n\nIf you have already set up biometric authentication, press \"Authenticate now\" to try again or press \"Set Up Authentication\" to go to your device settings.", "Hi there! To jump into the MIH Home Package, you'll need to authenticate yourself with your phones biometrics, please set up biometric authentication (like fingerprint, face ID, pattern or pin) on your device first.\n\nIf you have already set up biometric authentication, press \"Authenticate now\" to try again or press \"Set Up Authentication\" to go to your device settings.",
style: TextStyle( style: TextStyle(
fontSize: 15, fontSize: 15,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
const SizedBox(height: 20), const SizedBox(height: 20),
@@ -137,14 +141,14 @@ class _BiometricCheckState extends State<BiometricCheck> {
); );
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
buttonColor: buttonColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Set Up Authentication", "Set Up Authentication",
style: TextStyle( style: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -155,14 +159,14 @@ class _BiometricCheckState extends State<BiometricCheck> {
Navigator.of(context).pop(); Navigator.of(context).pop();
authenticateUser(); authenticateUser();
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Authenticate Now", "Authenticate Now",
style: TextStyle( style: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -172,7 +176,8 @@ class _BiometricCheckState extends State<BiometricCheck> {
), ),
], ],
), ),
alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
showDialog( showDialog(
context: context, context: context,
@@ -197,8 +202,8 @@ class _BiometricCheckState extends State<BiometricCheck> {
Icon( Icon(
Icons.fingerprint, Icons.fingerprint,
size: 100, size: 100,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//spacer //spacer
const SizedBox(height: 10), const SizedBox(height: 10),
@@ -209,9 +214,9 @@ class _BiometricCheckState extends State<BiometricCheck> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
//spacer //spacer
@@ -220,23 +225,23 @@ class _BiometricCheckState extends State<BiometricCheck> {
Icon( Icon(
Icons.lock, Icons.lock,
size: 200, size: 200,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
const SizedBox(height: 30), const SizedBox(height: 30),
MihButton( MihButton(
onPressed: () { onPressed: () {
authenticateUser(); authenticateUser();
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Authenticate Now", "Authenticate Now",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

View File

@@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.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_alert_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_validation_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'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
@@ -79,11 +80,13 @@ class _ForgotPasswordState extends State<ForgotPassword> {
} }
Color getPrim() { Color getPrim() {
return MzansiInnovationHub.of(context)!.theme.secondaryColor(); return MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} }
Color getSec() { Color getSec() {
return MzansiInnovationHub.of(context)!.theme.primaryColor(); return MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} }
void prePassResteWarning() { void prePassResteWarning() {
@@ -94,7 +97,8 @@ class _ForgotPasswordState extends State<ForgotPassword> {
alertIcon: Icon( alertIcon: Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: 100, size: 100,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
alertTitle: "Password Reset Confirmation", alertTitle: "Password Reset Confirmation",
alertBody: Column( alertBody: Column(
@@ -105,8 +109,8 @@ class _ForgotPasswordState extends State<ForgotPassword> {
child: Text( child: Text(
"Before you reset your password, please be aware that you'll receive an email with a link to confirm your identity and set a new password. Make sure to check your inbox, including spam or junk folders. If you don't receive the email within a few minutes, please try resending the reset request.", "Before you reset your password, please be aware that you'll receive an email with a link to confirm your identity and set a new password. Make sure to check your inbox, including spam or junk folders. If you don't receive the email within a few minutes, please try resending the reset request.",
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 15.0, fontSize: 15.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -121,14 +125,14 @@ class _ForgotPasswordState extends State<ForgotPassword> {
Navigator.of(context).pop(); Navigator.of(context).pop();
validateInput(); validateInput();
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Continue", "Continue",
style: TextStyle( style: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -136,7 +140,8 @@ class _ForgotPasswordState extends State<ForgotPassword> {
), ),
], ],
), ),
alertColour: MzansiInnovationHub.of(context)!.theme.secondaryColor(), alertColour: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}, },
); );
@@ -236,9 +241,9 @@ class _ForgotPasswordState extends State<ForgotPassword> {
Icon( Icon(
Icons.lock, Icons.lock,
size: 100, size: 100,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
//spacer //spacer
const SizedBox(height: 10), const SizedBox(height: 10),
@@ -248,9 +253,9 @@ class _ForgotPasswordState extends State<ForgotPassword> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
const SizedBox(height: 25), const SizedBox(height: 25),
@@ -258,12 +263,12 @@ class _ForgotPasswordState extends State<ForgotPassword> {
formKey: _formKey, formKey: _formKey,
formFields: [ formFields: [
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: emailController, controller: emailController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -286,16 +291,18 @@ class _ForgotPasswordState extends State<ForgotPassword> {
.formNotFilledCompletely(context); .formNotFilledCompletely(context);
} }
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.successColor(), "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Reset Password", "Reset Password",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!
.primaryColor(), .theme
.mode ==
"Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

View File

@@ -1,5 +1,6 @@
import 'dart:convert'; import 'dart:convert';
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_alert_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_install_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_install_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
@@ -239,12 +240,14 @@ class _RegisterState extends State<Register> {
onPressed: () { onPressed: () {
MihInstallServices().installMihTrigger(context); MihInstallServices().installMihTrigger(context);
}, },
buttonColor: MzansiInnovationHub.of(context)!.theme.successColor(), buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 150, width: 150,
child: Text( child: Text(
"Install MIH", "Install MIH",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -268,7 +271,8 @@ class _RegisterState extends State<Register> {
child: FittedBox( child: FittedBox(
child: Icon( child: Icon(
MihIcons.mihLogo, MihIcons.mihLogo,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
), ),
@@ -331,9 +335,9 @@ class _RegisterState extends State<Register> {
Icon( Icon(
Icons.lock, Icons.lock,
size: 100, size: 100,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
//spacer //spacer
const SizedBox(height: 10), const SizedBox(height: 10),
@@ -343,9 +347,9 @@ class _RegisterState extends State<Register> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
//spacer //spacer
@@ -355,12 +359,12 @@ class _RegisterState extends State<Register> {
formFields: [ formFields: [
//email input //email input
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: emailController, controller: emailController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -374,12 +378,12 @@ class _RegisterState extends State<Register> {
const SizedBox(height: 10), const SizedBox(height: 10),
//password input //password input
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: passwordController, controller: passwordController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -394,12 +398,12 @@ class _RegisterState extends State<Register> {
//spacer //spacer
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: confirmPasswordController, controller: confirmPasswordController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -430,16 +434,20 @@ class _RegisterState extends State<Register> {
.formNotFilledCompletely(context); .formNotFilledCompletely(context);
} }
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!
.successColor(), .theme
.mode ==
"Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Create New Account", "Create New Account",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!
.primaryColor(), .theme
.mode ==
"Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -447,16 +455,20 @@ class _RegisterState extends State<Register> {
), ),
MihButton( MihButton(
onPressed: widget.onTap, onPressed: widget.onTap,
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!
.secondaryColor(), .theme
.mode ==
"Dark"),
width: 300, width: 300,
child: Text( child: Text(
"I have an account", "I have an account",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!
.primaryColor(), .theme
.mode ==
"Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

View File

@@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.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_alert_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_validation_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'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
@@ -98,11 +99,13 @@ class _ResetPasswordState extends State<ResetPassword> {
} }
Color getPrim() { Color getPrim() {
return MzansiInnovationHub.of(context)!.theme.secondaryColor(); return MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} }
Color getSec() { Color getSec() {
return MzansiInnovationHub.of(context)!.theme.primaryColor(); return MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} }
void loginError() { void loginError() {
@@ -214,9 +217,9 @@ class _ResetPasswordState extends State<ResetPassword> {
Icon( Icon(
Icons.lock, Icons.lock,
size: 100, size: 100,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
//spacer //spacer
const SizedBox(height: 10), const SizedBox(height: 10),
@@ -226,9 +229,9 @@ class _ResetPasswordState extends State<ResetPassword> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
//spacer //spacer
@@ -237,12 +240,12 @@ class _ResetPasswordState extends State<ResetPassword> {
formKey: _formKey, formKey: _formKey,
formFields: [ formFields: [
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: passwordController, controller: passwordController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -257,12 +260,12 @@ class _ResetPasswordState extends State<ResetPassword> {
//spacer //spacer
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: confirmPasswordController, controller: confirmPasswordController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -288,16 +291,18 @@ class _ResetPasswordState extends State<ResetPassword> {
.formNotFilledCompletely(context); .formNotFilledCompletely(context);
} }
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.successColor(), "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Reset Password", "Reset Password",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!
.primaryColor(), .theme
.mode ==
"Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

View File

@@ -1,4 +1,5 @@
import 'dart:convert'; import 'dart:convert';
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_alert_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_install_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_install_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
@@ -87,11 +88,13 @@ class _SignInState extends State<SignIn> {
} }
Color getPrim() { Color getPrim() {
return MzansiInnovationHub.of(context)!.theme.secondaryColor(); return MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} }
Color getSec() { Color getSec() {
return MzansiInnovationHub.of(context)!.theme.primaryColor(); return MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} }
void setSandboxProfiles(List<MIHTile> tileList) { void setSandboxProfiles(List<MIHTile> tileList) {
@@ -211,7 +214,7 @@ class _SignInState extends State<SignIn> {
context: context, context: context,
builder: (context) { builder: (context) {
return Dialog( return Dialog(
//backgroundColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), //backgroundColor: MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
child: Stack( child: Stack(
children: [ children: [
Container( Container(
@@ -219,12 +222,13 @@ class _SignInState extends State<SignIn> {
width: 500.0, width: 500.0,
height: 500, height: 500,
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
width: 5.0), width: 5.0),
), ),
child: Column( child: Column(
@@ -234,9 +238,9 @@ class _SignInState extends State<SignIn> {
"Sandbox Profiles", "Sandbox Profiles",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
fontSize: 25.0, fontSize: 25.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -246,9 +250,9 @@ class _SignInState extends State<SignIn> {
"NB: These accounts are used for test purposes. Please do not store personal information on these profiles.", "NB: These accounts are used for test purposes. Please do not store personal information on these profiles.",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
fontSize: 15.0, fontSize: 15.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -281,7 +285,8 @@ class _SignInState extends State<SignIn> {
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
), ),
@@ -303,12 +308,14 @@ class _SignInState extends State<SignIn> {
onPressed: () { onPressed: () {
MihInstallServices().installMihTrigger(context); MihInstallServices().installMihTrigger(context);
}, },
buttonColor: MzansiInnovationHub.of(context)!.theme.successColor(), buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 150, width: 150,
child: Text( child: Text(
"Install MIH", "Install MIH",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -335,7 +342,8 @@ class _SignInState extends State<SignIn> {
child: FittedBox( child: FittedBox(
child: Icon( child: Icon(
MihIcons.mihLogo, MihIcons.mihLogo,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
), ),
@@ -399,9 +407,9 @@ class _SignInState extends State<SignIn> {
Icon( Icon(
Icons.lock, Icons.lock,
size: 100, size: 100,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
//spacer //spacer
const SizedBox(height: 10), const SizedBox(height: 10),
@@ -411,9 +419,9 @@ class _SignInState extends State<SignIn> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
//spacer //spacer
@@ -422,12 +430,12 @@ class _SignInState extends State<SignIn> {
formKey: _formKey, formKey: _formKey,
formFields: [ formFields: [
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: emailController, controller: emailController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -442,12 +450,12 @@ class _SignInState extends State<SignIn> {
const SizedBox(height: 10), const SizedBox(height: 10),
//password input //password input
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: passwordController, controller: passwordController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -476,9 +484,11 @@ class _SignInState extends State<SignIn> {
'Forgot Password?', 'Forgot Password?',
style: TextStyle( style: TextStyle(
fontSize: 15, fontSize: 15,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!
.secondaryColor(), .theme
.mode ==
"Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
@@ -506,17 +516,20 @@ class _SignInState extends State<SignIn> {
.formNotFilledCompletely(context); .formNotFilledCompletely(context);
} }
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)! MzansiInnovationHub.of(context)!
.theme .theme
.successColor(), .mode ==
"Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Sign In", "Sign In",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!
.primaryColor(), .theme
.mode ==
"Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -524,17 +537,20 @@ class _SignInState extends State<SignIn> {
), ),
MihButton( MihButton(
onPressed: widget.onTap, onPressed: widget.onTap,
buttonColor: buttonColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)! MzansiInnovationHub.of(context)!
.theme .theme
.secondaryColor(), .mode ==
"Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Create New Account", "Create New Account",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!
.primaryColor(), .theme
.mode ==
"Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -569,10 +585,13 @@ class _SignInState extends State<SignIn> {
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 15, fontSize: 15,
color: MzansiInnovationHub.of( color:
context)! MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(
.secondaryColor()), context)!
.theme
.mode ==
"Dark")),
), ),
onTap: () { onTap: () {
setState(() { setState(() {
@@ -619,10 +638,11 @@ class _SignInState extends State<SignIn> {
"NB: These accounts are used for test purposes. Please do not store personal information on these profiles.", "NB: These accounts are used for test purposes. Please do not store personal information on these profiles.",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)! MzansiInnovationHub.of(context)!
.theme .theme
.secondaryColor(), .mode ==
"Dark"),
fontSize: 15.0, fontSize: 15.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

View File

@@ -2,6 +2,7 @@ import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tile.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tile.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MihCalculatorTile extends StatefulWidget { class MihCalculatorTile extends StatefulWidget {
final bool personalSelected; final bool personalSelected;
@@ -30,12 +31,15 @@ class _MihCalculatorTileState extends State<MihCalculatorTile> {
appName: "Calculator", appName: "Calculator",
appIcon: Icon( appIcon: Icon(
MihIcons.calculator, MihIcons.calculator,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// size: widget.packageSize, // size: widget.packageSize,
), ),
iconSize: widget.packageSize, iconSize: widget.packageSize,
primaryColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(), primaryColor: MihColors.getSecondaryColor(
secondaryColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
secondaryColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
} }
} }

View File

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

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_package_components/mih_package_tool_body.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:math_expressions/math_expressions.dart'; import 'package:math_expressions/math_expressions.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class SimpleCalc extends StatefulWidget { class SimpleCalc extends StatefulWidget {
const SimpleCalc({super.key}); const SimpleCalc({super.key});
@@ -107,8 +108,8 @@ class _SimpleCalcState extends State<SimpleCalc> {
userInput, userInput,
style: TextStyle( style: TextStyle(
fontSize: 40, fontSize: 40,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
), ),
@@ -122,8 +123,8 @@ class _SimpleCalcState extends State<SimpleCalc> {
answer, answer,
style: TextStyle( style: TextStyle(
fontSize: 30, fontSize: 30,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
), ),
@@ -158,16 +159,18 @@ class _SimpleCalcState extends State<SimpleCalc> {
answer = '0'; answer = '0';
}); });
}, },
buttonColor: const Color.fromRGBO(214, 171, 255, 1), buttonColor: MihColors.getPurpleColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 50, width: 50,
height: 50, height: 50,
borderRadius: 5, borderRadius: 5,
child: Text( child: Text(
buttons[index], buttons[index],
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -186,18 +189,18 @@ class _SimpleCalcState extends State<SimpleCalc> {
userInput += buttons[index]; userInput += buttons[index];
}); });
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getGreyColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.messageTextColor(), "Dark"),
width: 50, width: 50,
height: 50, height: 50,
borderRadius: 5, borderRadius: 5,
child: Text( child: Text(
buttons[index], buttons[index],
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -215,18 +218,18 @@ class _SimpleCalcState extends State<SimpleCalc> {
userInput += buttons[index]; userInput += buttons[index];
}); });
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getGreyColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.messageTextColor(), "Dark"),
width: 50, width: 50,
height: 50, height: 50,
borderRadius: 5, borderRadius: 5,
child: Text( child: Text(
buttons[index], buttons[index],
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -255,18 +258,18 @@ class _SimpleCalcState extends State<SimpleCalc> {
}); });
} }
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getGreyColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.messageTextColor(), "Dark"),
width: 50, width: 50,
height: 50, height: 50,
borderRadius: 5, borderRadius: 5,
child: Text( child: Text(
buttons[index], buttons[index],
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -295,16 +298,17 @@ class _SimpleCalcState extends State<SimpleCalc> {
equalPressed(); equalPressed();
}); });
}, },
buttonColor: buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 50, width: 50,
height: 50, height: 50,
borderRadius: 5, borderRadius: 5,
child: Icon( child: Icon(
Icons.backspace, Icons.backspace,
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
), ),
), ),
); );
@@ -320,18 +324,18 @@ class _SimpleCalcState extends State<SimpleCalc> {
userInput = answer; userInput = answer;
}); });
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.successColor(), "Dark"),
width: 50, width: 50,
height: 50, height: 50,
borderRadius: 5, borderRadius: 5,
child: Text( child: Text(
buttons[index], buttons[index],
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -350,18 +354,18 @@ class _SimpleCalcState extends State<SimpleCalc> {
equalPressed(); equalPressed();
}); });
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
width: 50, width: 50,
height: 50, height: 50,
borderRadius: 5, borderRadius: 5,
child: Text( child: Text(
buttons[index], buttons[index],
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

View File

@@ -1,5 +1,6 @@
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_banner_ad.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_banner_ad.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_alert_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_validation_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_single_child_scroll.dart';
@@ -110,8 +111,8 @@ class _TipCalcState extends State<TipCalc> {
children: [ children: [
FaIcon( FaIcon(
FontAwesomeIcons.coins, FontAwesomeIcons.coins,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
const SizedBox(width: 15), const SizedBox(width: 15),
@@ -121,8 +122,8 @@ class _TipCalcState extends State<TipCalc> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
], ],
@@ -133,7 +134,8 @@ class _TipCalcState extends State<TipCalc> {
style: TextStyle( style: TextStyle(
fontSize: 30, fontSize: 30,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
const Divider(), const Divider(),
@@ -143,8 +145,8 @@ class _TipCalcState extends State<TipCalc> {
children: [ children: [
FaIcon( FaIcon(
FontAwesomeIcons.moneyBills, FontAwesomeIcons.moneyBills,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
const SizedBox(width: 15), const SizedBox(width: 15),
@@ -154,8 +156,8 @@ class _TipCalcState extends State<TipCalc> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
], ],
@@ -166,7 +168,8 @@ class _TipCalcState extends State<TipCalc> {
style: TextStyle( style: TextStyle(
fontSize: 30, fontSize: 30,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
Text( Text(
@@ -175,7 +178,8 @@ class _TipCalcState extends State<TipCalc> {
style: TextStyle( style: TextStyle(
fontSize: 30, fontSize: 30,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
if (splitBillController.text == "Yes") const Divider(), if (splitBillController.text == "Yes") const Divider(),
@@ -186,8 +190,8 @@ class _TipCalcState extends State<TipCalc> {
children: [ children: [
FaIcon( FaIcon(
FontAwesomeIcons.peopleGroup, FontAwesomeIcons.peopleGroup,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 35, size: 35,
), ),
const SizedBox(width: 15), const SizedBox(width: 15),
@@ -197,9 +201,9 @@ class _TipCalcState extends State<TipCalc> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
], ],
@@ -211,8 +215,8 @@ class _TipCalcState extends State<TipCalc> {
style: TextStyle( style: TextStyle(
fontSize: 30, fontSize: 30,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
if (splitBillController.text == "Yes") if (splitBillController.text == "Yes")
@@ -222,8 +226,8 @@ class _TipCalcState extends State<TipCalc> {
style: TextStyle( style: TextStyle(
fontSize: 30, fontSize: 30,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
SizedBox(height: 10), SizedBox(height: 10),
@@ -267,10 +271,10 @@ class _TipCalcState extends State<TipCalc> {
formKey: _formKey, formKey: _formKey,
formFields: [ formFields: [
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: billAmountController, controller: billAmountController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -282,10 +286,10 @@ class _TipCalcState extends State<TipCalc> {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: tipPercentageController, controller: tipPercentageController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -299,10 +303,10 @@ class _TipCalcState extends State<TipCalc> {
MihToggle( MihToggle(
hintText: "Split Bill", hintText: "Split Bill",
initialPostion: splitPosition, initialPostion: splitPosition,
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
secondaryFillColor: secondaryFillColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onChange: (value) { onChange: (value) {
setState(() { setState(() {
splitBillController.text = value ? "Yes" : "No"; splitBillController.text = value ? "Yes" : "No";
@@ -339,12 +343,12 @@ class _TipCalcState extends State<TipCalc> {
children: [ children: [
MihNumericStepper( MihNumericStepper(
controller: noPeopleController, controller: noPeopleController,
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
hintText: "No. People", hintText: "No. People",
requiredText: temp == "Yes", requiredText: temp == "Yes",
minValue: 2, minValue: 2,
@@ -392,16 +396,16 @@ class _TipCalcState extends State<TipCalc> {
MihAlertServices().formNotFilledCompletely(context); MihAlertServices().formNotFilledCompletely(context);
} }
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.successColor(), "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Calculate", "Calculate",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -411,15 +415,16 @@ class _TipCalcState extends State<TipCalc> {
onPressed: () { onPressed: () {
clearInput(); clearInput();
}, },
buttonColor: buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Clear", "Clear",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

View File

@@ -5,6 +5,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_objects/access_request.
import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:supertokens_flutter/http.dart' as http; import 'package:supertokens_flutter/http.dart' as http;
@@ -134,25 +135,28 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
accessWithColour = TextSpan( accessWithColour = TextSpan(
text: "$access\n", text: "$access\n",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.successColor())); color: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark")));
} else if (access == "PENDING") { } else if (access == "PENDING") {
accessWithColour = TextSpan( accessWithColour = TextSpan(
text: "$access\n", text: "$access\n",
style: TextStyle( style: TextStyle(
color: color: MihColors.getGreyColor(
MzansiInnovationHub.of(context)!.theme.messageTextColor())); MzansiInnovationHub.of(context)!.theme.mode == "Dark")));
} else { } else {
accessWithColour = TextSpan( accessWithColour = TextSpan(
text: "$access\n", text: "$access\n",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.errorColor())); color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark")));
} }
return ListTile( return ListTile(
title: Text( title: Text(
line1, line1,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
subtitle: RichText( subtitle: RichText(
@@ -168,7 +172,7 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
// Text( // Text(
// subtitle, // subtitle,
// style: TextStyle( // style: TextStyle(
// color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), // color: MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ), // ),
// ), // ),
onTap: () { onTap: () {
@@ -180,7 +184,7 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
}, },
// trailing: Icon( // trailing: Icon(
// Icons.arrow_forward, // Icons.arrow_forward,
// color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), // color: MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ), // ),
); );
} }
@@ -235,8 +239,8 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
subtitle, subtitle,
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: popUpBodySize, fontSize: popUpBodySize,
//fontWeight: FontWeight.bold, //fontWeight: FontWeight.bold,
), ),
@@ -250,15 +254,15 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
onPressed: () { onPressed: () {
updateAccessAPICall(index, "declined"); updateAccessAPICall(index, "declined");
}, },
buttonColor: buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Decline", "Decline",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -268,15 +272,15 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
onPressed: () { onPressed: () {
updateAccessAPICall(index, "approved"); updateAccessAPICall(index, "approved");
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Approve", "Approve",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -313,7 +317,8 @@ class _BuildPatientsListState extends State<BuildAccessRequestList> {
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
separatorBuilder: (BuildContext context, index) { separatorBuilder: (BuildContext context, index) {
return Divider( return Divider(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}, },
itemCount: widget.accessRequests.length, itemCount: widget.accessRequests.length,

View File

@@ -1,5 +1,6 @@
import 'package:flutter_speed_dial/flutter_speed_dial.dart'; import 'package:flutter_speed_dial/flutter_speed_dial.dart';
import 'package:mzansi_innovation_hub/main.dart'; 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_alert_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_calendar_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_calendar_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
@@ -88,19 +89,19 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
// print("Date: $date"); // print("Date: $date");
// print("Appointment Date: $appointDate"); // print("Appointment Date: $appointDate");
// print("Appointment Hour: $appointHour"); // print("Appointment Hour: $appointHour");
Color appointmentColor = Color appointmentColor = MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(); MzansiInnovationHub.of(context)!.theme.mode == "Dark");
if (date == appointDate) { if (date == appointDate) {
if (appointHour < hourNow) { if (appointHour < hourNow) {
appointmentColor = appointmentColor = MihColors.getGreyColor(
MzansiInnovationHub.of(context)!.theme.messageTextColor(); MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} else if (appointHour == hourNow) { } else if (appointHour == hourNow) {
appointmentColor = appointmentColor = MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(); MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} }
} else if (DateTime.parse(appointDate).isBefore(DateTime.parse(date))) { } else if (DateTime.parse(appointDate).isBefore(DateTime.parse(date))) {
appointmentColor = appointmentColor = MihColors.getGreyColor(
MzansiInnovationHub.of(context)!.theme.messageTextColor(); MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} }
return Container( return Container(
@@ -158,17 +159,19 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
SpeedDialChild( SpeedDialChild(
child: Icon( child: Icon(
Icons.edit, Icons.edit,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
label: "Edit Appointment", label: "Edit Appointment",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () { onTap: () {
appointmentUpdateWindow(index, bodyWidth); appointmentUpdateWindow(index, bodyWidth);
}, },
@@ -176,17 +179,19 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
SpeedDialChild( SpeedDialChild(
child: Icon( child: Icon(
Icons.delete, Icons.delete,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
label: "Delete Appointment", label: "Delete Appointment",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () { onTap: () {
deleteAppointmentConfirmationWindow(index); deleteAppointmentConfirmationWindow(index);
}, },
@@ -208,10 +213,10 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
children: [ children: [
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: widget.titleController, controller: widget.titleController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -220,10 +225,10 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: widget.dateController, controller: widget.dateController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -232,10 +237,10 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: widget.timeController, controller: widget.timeController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -244,10 +249,10 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: widget.descriptionIDController, controller: widget.descriptionIDController,
multiLineInput: true, multiLineInput: true,
height: 250, height: 250,
@@ -276,17 +281,19 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
SpeedDialChild( SpeedDialChild(
child: Icon( child: Icon(
Icons.edit, Icons.edit,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
label: "Edit Appointment", label: "Edit Appointment",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () { onTap: () {
appointmentUpdateWindow(index, bodyWidth); appointmentUpdateWindow(index, bodyWidth);
}, },
@@ -294,17 +301,19 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
SpeedDialChild( SpeedDialChild(
child: Icon( child: Icon(
Icons.delete, Icons.delete,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
label: "Delete Appointment", label: "Delete Appointment",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () { onTap: () {
deleteAppointmentConfirmationWindow(index); deleteAppointmentConfirmationWindow(index);
}, },
@@ -326,10 +335,10 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
children: [ children: [
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: widget.titleController, controller: widget.titleController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -338,10 +347,10 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: widget.dateController, controller: widget.dateController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -350,10 +359,10 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: widget.timeController, controller: widget.timeController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -362,10 +371,10 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: widget.descriptionIDController, controller: widget.descriptionIDController,
multiLineInput: true, multiLineInput: true,
height: 250, height: 250,
@@ -425,11 +434,12 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
formKey: _formKey, formKey: _formKey,
formFields: [ formFields: [
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
controller: widget.titleController, controller: widget.titleController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -458,11 +468,12 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
controller: widget.descriptionIDController, controller: widget.descriptionIDController,
multiLineInput: true, multiLineInput: true,
height: 250, height: 250,
@@ -488,16 +499,18 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
.formNotFilledCompletely(context); .formNotFilledCompletely(context);
} }
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.successColor(), "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Update", "Update",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!
.primaryColor(), .theme
.mode ==
"Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

View File

@@ -1,10 +1,10 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
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_objects/app_user.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/patient_queue.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/patient_queue.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_warning_message.dart';
import '../../../main.dart'; import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import '../../../mih_components/mih_pop_up_messages/mih_warning_message.dart'; import 'package:mzansi_innovation_hub/mih_config/mih_env.dart';
import '../../../mih_config/mih_env.dart';
class BuildQueueList extends StatefulWidget { class BuildQueueList extends StatefulWidget {
final List<PatientQueue> patientQueue; final List<PatientQueue> patientQueue;
@@ -44,7 +44,8 @@ class _BuildQueueListState extends State<BuildQueueList> {
title: Text( title: Text(
title, title,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
subtitle: RichText( subtitle: RichText(
@@ -121,7 +122,8 @@ class _BuildQueueListState extends State<BuildQueueList> {
shrinkWrap: true, shrinkWrap: true,
separatorBuilder: (BuildContext context, index) { separatorBuilder: (BuildContext context, index) {
return Divider( return Divider(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}, },
itemCount: widget.patientQueue.length, itemCount: widget.patientQueue.length,

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_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MzansiCalendarTile extends StatefulWidget { class MzansiCalendarTile extends StatefulWidget {
final CalendarArguments arguments; final CalendarArguments arguments;
@@ -31,12 +32,15 @@ class _MzansiCalendarTileState extends State<MzansiCalendarTile> {
appName: "Calendar", appName: "Calendar",
appIcon: Icon( appIcon: Icon(
MihIcons.calendar, MihIcons.calendar,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// size: widget.packageSize, // size: widget.packageSize,
), ),
iconSize: widget.packageSize, iconSize: widget.packageSize,
primaryColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(), primaryColor: MihColors.getSecondaryColor(
secondaryColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
secondaryColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
} }
} }

View File

@@ -1,5 +1,6 @@
import 'package:flutter_speed_dial/flutter_speed_dial.dart'; import 'package:flutter_speed_dial/flutter_speed_dial.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.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_alert_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_calendar_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_calendar_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
@@ -93,7 +94,8 @@ class _PatientAccessRequestState extends State<Appointments> {
Icon( Icon(
MihIcons.calendar, MihIcons.calendar,
size: 165, size: 165,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Text( Text(
@@ -103,7 +105,8 @@ class _PatientAccessRequestState extends State<Appointments> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
const SizedBox(height: 25), const SizedBox(height: 25),
@@ -114,8 +117,8 @@ class _PatientAccessRequestState extends State<Appointments> {
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
children: [ children: [
TextSpan(text: "Press "), TextSpan(text: "Press "),
@@ -124,9 +127,9 @@ class _PatientAccessRequestState extends State<Appointments> {
child: Icon( child: Icon(
Icons.menu, Icons.menu,
size: 20, size: 20,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
TextSpan( TextSpan(
@@ -149,7 +152,7 @@ class _PatientAccessRequestState extends State<Appointments> {
// "No Appointments for $selectedDay", // "No Appointments for $selectedDay",
// style: TextStyle( // style: TextStyle(
// fontSize: 25, // fontSize: 25,
// color: MzansiInnovationHub.of(context)!.theme.messageTextColor(), // color: MihColors.getGreyColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ), // ),
// textAlign: TextAlign.center, // textAlign: TextAlign.center,
// softWrap: true, // softWrap: true,
@@ -185,11 +188,12 @@ class _PatientAccessRequestState extends State<Appointments> {
formKey: _formKey, formKey: _formKey,
formFields: [ formFields: [
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
controller: _appointmentTitleController, controller: _appointmentTitleController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -218,11 +222,12 @@ class _PatientAccessRequestState extends State<Appointments> {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
controller: _appointmentDescriptionIDController, controller: _appointmentDescriptionIDController,
multiLineInput: true, multiLineInput: true,
height: 250, height: 250,
@@ -242,16 +247,16 @@ class _PatientAccessRequestState extends State<Appointments> {
MihAlertServices().formNotFilledCompletely(context); MihAlertServices().formNotFilledCompletely(context);
} }
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.successColor(), "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Add", "Add",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -355,7 +360,7 @@ class _PatientAccessRequestState extends State<Appointments> {
}); });
}), }),
// Divider( // Divider(
// color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), // color: MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ), // ),
Row( Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
@@ -377,9 +382,11 @@ class _PatientAccessRequestState extends State<Appointments> {
"Error pulling appointments", "Error pulling appointments",
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
color: MzansiInnovationHub.of(context)! color: MihColors.getRedColor(
.theme MzansiInnovationHub.of(context)!
.errorColor()), .theme
.mode ==
"Dark")),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
); );
@@ -400,17 +407,19 @@ class _PatientAccessRequestState extends State<Appointments> {
SpeedDialChild( SpeedDialChild(
child: Icon( child: Icon(
Icons.add, Icons.add,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
label: "Add Appointment", label: "Add Appointment",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () { onTap: () {
addAppointmentWindow(width); addAppointmentWindow(width);
}, },

View File

@@ -11,6 +11,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_text_form_field.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_text_form_field.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_env.dart'; import 'package:mzansi_innovation_hub/mih_config/mih_env.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_user_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_user_services.dart';
@@ -159,18 +160,21 @@ class _MihRegisterState extends State<MihRegister> {
return MihPackageAlert( return MihPackageAlert(
alertIcon: Icon( alertIcon: Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 100, size: 100,
), ),
alertTitle: "Error While Signing Up", alertTitle: "Error While Signing Up",
alertBody: Text( alertBody: Text(
"An error occurred while signing up. Please try again later.", "An error occurred while signing up. Please try again later.",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 18, fontSize: 18,
), ),
), ),
alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}, },
); );
@@ -257,7 +261,8 @@ class _MihRegisterState extends State<MihRegister> {
Icon( Icon(
Icons.lock, Icons.lock,
size: 100, size: 100,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//spacer //spacer
const SizedBox(height: 10), const SizedBox(height: 10),
@@ -267,8 +272,8 @@ class _MihRegisterState extends State<MihRegister> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
//spacer //spacer
@@ -278,10 +283,10 @@ class _MihRegisterState extends State<MihRegister> {
formFields: [ formFields: [
//email input //email input
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: emailController, controller: emailController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -295,10 +300,10 @@ class _MihRegisterState extends State<MihRegister> {
const SizedBox(height: 10), const SizedBox(height: 10),
//password input //password input
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: passwordController, controller: passwordController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -312,10 +317,10 @@ class _MihRegisterState extends State<MihRegister> {
//spacer //spacer
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: confirmPasswordController, controller: confirmPasswordController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -345,16 +350,16 @@ class _MihRegisterState extends State<MihRegister> {
.formNotFilledCompletely(context); .formNotFilledCompletely(context);
} }
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.successColor(), "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Create New Account", "Create New Account",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -362,16 +367,16 @@ class _MihRegisterState extends State<MihRegister> {
), ),
MihButton( MihButton(
onPressed: widget.onExistingUserButtonTap, onPressed: widget.onExistingUserButtonTap,
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"I have an account", "I have an account",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

View File

@@ -9,6 +9,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_
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_single_child_scroll.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_text_form_field.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_text_form_field.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_env.dart'; import 'package:mzansi_innovation_hub/mih_config/mih_env.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_authentication_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_authentication_services.dart';
@@ -159,11 +160,13 @@ class _MihSignInState extends State<MihSignIn> {
} }
Color getPrim() { Color getPrim() {
return MzansiInnovationHub.of(context)!.theme.secondaryColor(); return MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} }
Color getSec() { Color getSec() {
return MzansiInnovationHub.of(context)!.theme.primaryColor(); return MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} }
void loginError() { void loginError() {
@@ -232,16 +235,16 @@ class _MihSignInState extends State<MihSignIn> {
onPressed: () { onPressed: () {
MihInstallServices().installMihTrigger(context); MihInstallServices().installMihTrigger(context);
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.successColor(), "Dark"),
width: 150, width: 150,
child: Text( child: Text(
"Install MIH", "Install MIH",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -255,8 +258,8 @@ class _MihSignInState extends State<MihSignIn> {
Icon( Icon(
Icons.lock, Icons.lock,
size: 100, size: 100,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
//spacer //spacer
const SizedBox(height: 10), const SizedBox(height: 10),
@@ -266,8 +269,8 @@ class _MihSignInState extends State<MihSignIn> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
//spacer //spacer
@@ -276,11 +279,12 @@ class _MihSignInState extends State<MihSignIn> {
formKey: _formKey, formKey: _formKey,
formFields: [ formFields: [
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
controller: emailController, controller: emailController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -294,11 +298,12 @@ class _MihSignInState extends State<MihSignIn> {
const SizedBox(height: 10), const SizedBox(height: 10),
//password input //password input
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
controller: passwordController, controller: passwordController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -327,9 +332,11 @@ class _MihSignInState extends State<MihSignIn> {
'Forgot Password?', 'Forgot Password?',
style: TextStyle( style: TextStyle(
fontSize: 15, fontSize: 15,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!
.secondaryColor(), .theme
.mode ==
"Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
@@ -357,16 +364,18 @@ class _MihSignInState extends State<MihSignIn> {
.formNotFilledCompletely(context); .formNotFilledCompletely(context);
} }
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.successColor(), "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Sign In", "Sign In",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!
.primaryColor(), .theme
.mode ==
"Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -374,16 +383,18 @@ class _MihSignInState extends State<MihSignIn> {
), ),
MihButton( MihButton(
onPressed: widget.onNewUserButtonTap, onPressed: widget.onNewUserButtonTap,
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Create New Account", "Create New Account",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!
.primaryColor(), .theme
.mode ==
"Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -420,9 +431,11 @@ class _MihSignInState extends State<MihSignIn> {
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 15, fontSize: 15,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!
.secondaryColor()), .theme
.mode ==
"Dark")),
), ),
onTap: () { onTap: () {
setState(() { setState(() {
@@ -469,9 +482,11 @@ class _MihSignInState extends State<MihSignIn> {
"NB: These accounts are used for test purposes. Please do not store personal information on these profiles.", "NB: These accounts are used for test purposes. Please do not store personal information on these profiles.",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getRedColor(
.theme MzansiInnovationHub.of(context)!
.errorColor(), .theme
.mode ==
"Dark"),
fontSize: 15.0, fontSize: 15.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

View File

@@ -3,6 +3,7 @@ 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:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_circle_avatar.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_circle_avatar.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.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 '../../../main.dart'; import '../../../main.dart';
import 'package:supertokens_flutter/supertokens.dart'; import 'package:supertokens_flutter/supertokens.dart';
@@ -57,9 +58,10 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
fileNameController: proPicController, fileNameController: proPicController,
onChange: (_) {}, onChange: (_) {},
userSelectedfile: null, userSelectedfile: null,
frameColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), frameColor: MihColors.getPrimaryColor(
backgroundColor: MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
MzansiInnovationHub.of(context)!.theme.secondaryColor(), backgroundColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
); );
} }
@@ -84,7 +86,7 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
// MzansiInnovationHub.of(context)!.theme.logoImage().image, context); // MzansiInnovationHub.of(context)!.theme.logoImage().image, context);
return SafeArea( return SafeArea(
child: Drawer( child: Drawer(
//backgroundColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), //backgroundColor: MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
child: LayoutBuilder( child: LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) { builder: (BuildContext context, BoxConstraints constraints) {
return Stack( return Stack(
@@ -97,9 +99,9 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
children: [ children: [
DrawerHeader( DrawerHeader(
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
child: SizedBox( child: SizedBox(
height: 400, height: 400,
@@ -113,9 +115,11 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
"${widget.signedInUser.fname} ${widget.signedInUser.lname}", "${widget.signedInUser.fname} ${widget.signedInUser.lname}",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!
.primaryColor(), .theme
.mode ==
"Dark"),
), ),
), ),
Text( Text(
@@ -123,9 +127,11 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!
.primaryColor(), .theme
.mode ==
"Dark"),
), ),
), ),
Text( Text(
@@ -133,9 +139,11 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
style: TextStyle( style: TextStyle(
fontSize: 10, fontSize: 10,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!
.primaryColor(), .theme
.mode ==
"Dark"),
), ),
), ),
], ],
@@ -149,7 +157,7 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
// Icon( // Icon(
// Icons.home_outlined, // Icons.home_outlined,
// color: // color:
// MzansiInnovationHub.of(context)!.theme.secondaryColor(), // MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ), // ),
// const SizedBox(width: 25.0), // const SizedBox(width: 25.0),
// Text( // Text(
@@ -179,18 +187,22 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
children: [ children: [
Icon( Icon(
Icons.policy, Icons.policy,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!
.secondaryColor(), .theme
.mode ==
"Dark"),
), ),
const SizedBox(width: 25.0), const SizedBox(width: 25.0),
Text( Text(
"Privacy Policy", "Privacy Policy",
style: TextStyle( style: TextStyle(
//fontWeight: FontWeight.bold, //fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!
.secondaryColor(), .theme
.mode ==
"Dark"),
), ),
), ),
], ],
@@ -208,18 +220,22 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
children: [ children: [
Icon( Icon(
Icons.design_services_rounded, Icons.design_services_rounded,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!
.secondaryColor(), .theme
.mode ==
"Dark"),
), ),
const SizedBox(width: 25.0), const SizedBox(width: 25.0),
Text( Text(
"Terms of Service", "Terms of Service",
style: TextStyle( style: TextStyle(
//fontWeight: FontWeight.bold, //fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!
.secondaryColor(), .theme
.mode ==
"Dark"),
), ),
), ),
], ],
@@ -237,18 +253,22 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
children: [ children: [
Icon( Icon(
Icons.logout, Icons.logout,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!
.secondaryColor(), .theme
.mode ==
"Dark"),
), ),
const SizedBox(width: 25.0), const SizedBox(width: 25.0),
Text( Text(
"Sign Out", "Sign Out",
style: TextStyle( style: TextStyle(
//fontWeight: FontWeight.bold, //fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!
.secondaryColor(), .theme
.mode ==
"Dark"),
), ),
), ),
], ],
@@ -303,8 +323,9 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
}, },
child: Icon( child: Icon(
MihIcons.mihLogo, MihIcons.mihLogo,
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
), ),
), ),
// IconButton( // IconButton(
@@ -324,7 +345,7 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
// }, // },
// icon: Icon( // icon: Icon(
// Icons.light_mode, // Icons.light_mode,
// color: MzansiInnovationHub.of(context)!.theme.primaryColor(), // color: MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// size: 35, // size: 35,
// ), // ),
// ), // ),

View File

@@ -8,6 +8,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business_user.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/business_user.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/notification.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/notification.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/patients.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/patients.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_packages/mih_home/components/mih_app_drawer.dart'; import 'package:mzansi_innovation_hub/mih_packages/mih_home/components/mih_app_drawer.dart';
import 'package:mzansi_innovation_hub/mih_packages/mih_home/package_tools/mih_business_home.dart'; import 'package:mzansi_innovation_hub/mih_packages/mih_home/package_tools/mih_business_home.dart';
import 'package:mzansi_innovation_hub/mih_packages/mih_home/package_tools/mih_personal_home.dart'; import 'package:mzansi_innovation_hub/mih_packages/mih_home/package_tools/mih_personal_home.dart';
@@ -117,9 +118,10 @@ class _MihHomeState extends State<MihHome> {
fileNameController: proPicController, fileNameController: proPicController,
userSelectedfile: null, userSelectedfile: null,
// frameColor: frameColor, // frameColor: frameColor,
frameColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(), frameColor: MihColors.getSecondaryColor(
backgroundColor: MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
MzansiInnovationHub.of(context)!.theme.primaryColor(), backgroundColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onChange: (_) {}, onChange: (_) {},
), ),
// MIHProfilePicture( // MIHProfilePicture(
@@ -130,7 +132,7 @@ class _MihHomeState extends State<MihHome> {
// radius: 21, // radius: 21,
// drawerMode: false, // drawerMode: false,
// editable: false, // editable: false,
// frameColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(), // frameColor: MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// onChange: (newProPic) {}, // onChange: (newProPic) {},
// ), // ),
), ),

View File

@@ -15,6 +15,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_objects/patients.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import '../../main.dart'; import '../../main.dart';
import 'package:supertokens_flutter/http.dart' as http; import 'package:supertokens_flutter/http.dart' as http;
import "package:universal_html/html.dart" as html; import "package:universal_html/html.dart" as html;
@@ -862,19 +863,21 @@ class _MIHHomeLegacyState extends State<MIHHomeLegacy> {
SpeedDialChild( SpeedDialChild(
child: Icon( child: Icon(
Icons.delete, Icons.delete,
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
), ),
label: "Delete File", label: "Delete File",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () {}, onTap: () {},
), ),
], ],
@@ -951,11 +954,13 @@ class _MIHHomeLegacyState extends State<MIHHomeLegacy> {
} }
Color getPrim() { Color getPrim() {
return MzansiInnovationHub.of(context)!.theme.secondaryColor(); return MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} }
Color getSec() { Color getSec() {
return MzansiInnovationHub.of(context)!.theme.primaryColor(); return MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} }
bool isBusinessUser(AppUser signedInUser) { bool isBusinessUser(AppUser signedInUser) {
@@ -992,7 +997,7 @@ class _MIHHomeLegacyState extends State<MIHHomeLegacy> {
// radius: 21, // radius: 21,
// drawerMode: false, // drawerMode: false,
// editable: false, // editable: false,
// frameColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(), // frameColor: MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// onChange: (newProPic) {}, // onChange: (newProPic) {},
// ), // ),
), ),
@@ -1022,7 +1027,8 @@ class _MIHHomeLegacyState extends State<MIHHomeLegacy> {
child: Icon( child: Icon(
Icons.circle, Icons.circle,
size: 10, size: 10,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
) )
], ],
@@ -1089,10 +1095,10 @@ class _MIHHomeLegacyState extends State<MIHHomeLegacy> {
hintText: "Ask Mzansi", hintText: "Ask Mzansi",
prefixIcon: Icons.search, prefixIcon: Icons.search,
prefixAltIcon: MihIcons.mzansiAi, prefixAltIcon: MihIcons.mzansiAi,
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
hintColor: hintColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onPrefixIconTap: () { onPrefixIconTap: () {
print("Search Text: ${searchController.text}"); print("Search Text: ${searchController.text}");
setState(() { setState(() {
@@ -1167,11 +1173,11 @@ class _MIHHomeLegacyState extends State<MIHHomeLegacy> {
child: Placeholder(), child: Placeholder(),
// GNav( // GNav(
// //hoverColor: Colors.lightBlueAccent, // //hoverColor: Colors.lightBlueAccent,
// color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), // color: MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// iconSize: 35.0, // iconSize: 35.0,
// activeColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), // activeColor: MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// tabBackgroundColor: // tabBackgroundColor:
// MzansiInnovationHub.of(context)!.theme.secondaryColor(), // MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// //gap: 20, // //gap: 20,
// //padding: EdgeInsets.all(15), // //padding: EdgeInsets.all(15),
// tabs: [ // tabs: [

View File

@@ -7,6 +7,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_action.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_action.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tools.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tools.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_packages/mih_home/mih_home.dart'; import 'package:mzansi_innovation_hub/mih_packages/mih_home/mih_home.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@@ -92,7 +93,8 @@ class _MIHProfileGetterState extends State<MIHProfileGetter> {
"Connection Error", "Connection Error",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 35, fontSize: 35,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -100,7 +102,8 @@ class _MIHProfileGetterState extends State<MIHProfileGetter> {
Icon( Icon(
Icons.power_off_outlined, Icons.power_off_outlined,
size: 150, size: 150,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
SizedBox( SizedBox(
width: 500, width: 500,
@@ -108,8 +111,8 @@ class _MIHProfileGetterState extends State<MIHProfileGetter> {
"Looks like we ran into an issue getting your data.\nPlease check you internet connection and try again.", "Looks like we ran into an issue getting your data.\nPlease check you internet connection and try again.",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -120,13 +123,14 @@ class _MIHProfileGetterState extends State<MIHProfileGetter> {
onPressed: () { onPressed: () {
Navigator.of(context).popAndPushNamed("/"); Navigator.of(context).popAndPushNamed("/");
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Refresh", "Refresh",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -142,8 +146,9 @@ class _MIHProfileGetterState extends State<MIHProfileGetter> {
"Error: $error", "Error: $error",
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: TextStyle( style: TextStyle(
color: color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

View File

@@ -7,6 +7,7 @@ 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:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business_user.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/business_user.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_packages/about_mih/package_tile/about_mih_tile.dart'; import 'package:mzansi_innovation_hub/mih_packages/about_mih/package_tile/about_mih_tile.dart';
import 'package:mzansi_innovation_hub/mih_packages/calculator/package_tiles/mih_calculator_tile.dart'; import 'package:mzansi_innovation_hub/mih_packages/calculator/package_tiles/mih_calculator_tile.dart';
import 'package:mzansi_innovation_hub/mih_packages/calendar/package_tiles/mzansi_calendar_tile.dart'; import 'package:mzansi_innovation_hub/mih_packages/calendar/package_tiles/mzansi_calendar_tile.dart';
@@ -215,7 +216,7 @@ class _MihBusinessHomeState extends State<MihBusinessHome>
// Icon( // Icon(
// MihIcons.mihLogo, // MihIcons.mihLogo,
// size: width / 2, // size: width / 2,
// color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), // color: MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ), // ),
// const SizedBox(height: 10), // const SizedBox(height: 10),
// Text( // Text(
@@ -225,7 +226,7 @@ class _MihBusinessHomeState extends State<MihBusinessHome>
// style: TextStyle( // style: TextStyle(
// fontSize: 30, // fontSize: 30,
// fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
// color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), // color: MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ), // ),
// ), // ),
// const SizedBox(height: 20), // const SizedBox(height: 20),
@@ -238,10 +239,10 @@ class _MihBusinessHomeState extends State<MihBusinessHome>
hintText: "Ask Mzansi", hintText: "Ask Mzansi",
prefixIcon: Icons.search, prefixIcon: Icons.search,
prefixAltIcon: MihIcons.mzansiAi, prefixAltIcon: MihIcons.mzansiAi,
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
hintColor: hintColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onPrefixIconTap: () { onPrefixIconTap: () {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
'/mzansi-ai', '/mzansi-ai',
@@ -292,9 +293,9 @@ class _MihBusinessHomeState extends State<MihBusinessHome>
Icon( Icon(
MihIcons.mzansiAi, MihIcons.mzansiAi,
size: 165, size: 165,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Text( Text(
@@ -304,9 +305,9 @@ class _MihBusinessHomeState extends State<MihBusinessHome>
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
], ],

View File

@@ -8,6 +8,7 @@ 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:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business_user.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/business_user.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_packages/about_mih/package_tile/about_mih_tile.dart'; import 'package:mzansi_innovation_hub/mih_packages/about_mih/package_tile/about_mih_tile.dart';
import 'package:mzansi_innovation_hub/mih_packages/access_review/package_tile/mih_access_tile.dart'; import 'package:mzansi_innovation_hub/mih_packages/access_review/package_tile/mih_access_tile.dart';
import 'package:mzansi_innovation_hub/mih_packages/calculator/package_tiles/mih_calculator_tile.dart'; import 'package:mzansi_innovation_hub/mih_packages/calculator/package_tiles/mih_calculator_tile.dart';
@@ -171,11 +172,14 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
appName: "Test", appName: "Test",
appIcon: Icon( appIcon: Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
iconSize: packageSize, iconSize: packageSize,
primaryColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(), primaryColor: MihColors.getSecondaryColor(
secondaryColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
secondaryColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
) )
}); });
} }
@@ -267,7 +271,7 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
// Icon( // Icon(
// MihIcons.mihLogo, // MihIcons.mihLogo,
// size: 200, // size: 200,
// color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), // color: MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ), // ),
// const SizedBox(height: 10), // const SizedBox(height: 10),
// Text( // Text(
@@ -277,7 +281,7 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
// style: TextStyle( // style: TextStyle(
// fontSize: 30, // fontSize: 30,
// fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
// color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), // color: MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ), // ),
// ), // ),
// const SizedBox(height: 20), // const SizedBox(height: 20),
@@ -290,10 +294,10 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
hintText: "Ask Mzansi", hintText: "Ask Mzansi",
prefixIcon: Icons.search, prefixIcon: Icons.search,
prefixAltIcon: MihIcons.mzansiAi, prefixAltIcon: MihIcons.mzansiAi,
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
hintColor: hintColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onPrefixIconTap: () { onPrefixIconTap: () {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
'/mzansi-ai', '/mzansi-ai',
@@ -345,9 +349,9 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
Icon( Icon(
MihIcons.mzansiAi, MihIcons.mzansiAi,
size: 165, size: 165,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Text( Text(
@@ -357,9 +361,9 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "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/app_user.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MzansiAiTile extends StatefulWidget { class MzansiAiTile extends StatefulWidget {
final AppUser signedInUser; final AppUser signedInUser;
@@ -35,12 +36,15 @@ class _MzansiAiTileState extends State<MzansiAiTile> {
appName: "Mzansi AI", appName: "Mzansi AI",
appIcon: Icon( appIcon: Icon(
MihIcons.mzansiAi, MihIcons.mzansiAi,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// size: widget.packageSize, // size: widget.packageSize,
), ),
iconSize: widget.packageSize, iconSize: widget.packageSize,
primaryColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(), primaryColor: MihColors.getSecondaryColor(
secondaryColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
secondaryColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
} }
} }

View File

@@ -3,6 +3,7 @@ import 'dart:convert';
import 'package:flutter_speed_dial/flutter_speed_dial.dart'; import 'package:flutter_speed_dial/flutter_speed_dial.dart';
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.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_validation_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_dropdwn_field.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_dropdwn_field.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_numeric_stepper.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_numeric_stepper.dart';
@@ -188,21 +189,23 @@ class _AiChatState extends State<AiChat> {
SpeedDialChild( SpeedDialChild(
child: Icon( child: Icon(
Icons.volume_up, Icons.volume_up,
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
), ),
label: "Read Aloud", label: "Read Aloud",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
onTap: () { onTap: () {
_speakText(snapshot.requireData); _speakText(snapshot.requireData);
}, },
@@ -223,9 +226,9 @@ class _AiChatState extends State<AiChat> {
snapshot.requireData, snapshot.requireData,
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
fontSize: _chatFrontSize, fontSize: _chatFrontSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -306,29 +309,37 @@ class _AiChatState extends State<AiChat> {
ChatTheme getChatTheme() { ChatTheme getChatTheme() {
return DarkChatTheme( return DarkChatTheme(
backgroundColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), backgroundColor: MihColors.getPrimaryColor(
inputBackgroundColor: MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
MzansiInnovationHub.of(context)!.theme.secondaryColor(), inputBackgroundColor: MihColors.getSecondaryColor(
inputTextColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputTextCursorColor: inputTextColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
primaryColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(), inputTextCursorColor: MihColors.getPrimaryColor(
secondaryColor: MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
errorColor: MzansiInnovationHub.of(context)!.theme.errorColor(), primaryColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
secondaryColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
errorColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
sentMessageBodyTextStyle: TextStyle( sentMessageBodyTextStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: _chatFrontSize, fontSize: _chatFrontSize,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
fontFamily: 'Segoe UI', fontFamily: 'Segoe UI',
), ),
receivedMessageBodyTextStyle: TextStyle( receivedMessageBodyTextStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: _chatFrontSize, fontSize: _chatFrontSize,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
fontFamily: 'Segoe UI', fontFamily: 'Segoe UI',
), ),
emptyChatPlaceholderTextStyle: TextStyle( emptyChatPlaceholderTextStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.messageTextColor(), color: MihColors.getGreyColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: _chatFrontSize, fontSize: _chatFrontSize,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
fontFamily: 'Segoe UI', fontFamily: 'Segoe UI',
@@ -350,13 +361,13 @@ class _AiChatState extends State<AiChat> {
child: Container( child: Container(
padding: const EdgeInsets.all(10.0), padding: const EdgeInsets.all(10.0),
decoration: BoxDecoration( decoration: BoxDecoration(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(25.0), borderRadius: BorderRadius.circular(25.0),
border: Border.all( border: Border.all(
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
width: 3.0), width: 3.0),
), ),
child: Column( child: Column(
@@ -371,9 +382,9 @@ class _AiChatState extends State<AiChat> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
], ],
@@ -386,13 +397,12 @@ class _AiChatState extends State<AiChat> {
child: MihRadioOptions( child: MihRadioOptions(
controller: _modelController, controller: _modelController,
hintText: "AI Model", hintText: "AI Model",
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
secondaryFillColor: secondaryFillColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)! MzansiInnovationHub.of(context)!.theme.mode ==
.theme "Dark"),
.primaryColor(),
requiredText: true, requiredText: true,
radioOptions: [getModel()], radioOptions: [getModel()],
), ),
@@ -446,13 +456,17 @@ class _AiChatState extends State<AiChat> {
style: ButtonStyle( style: ButtonStyle(
backgroundColor: backgroundColor:
WidgetStateProperty.all<Color>( WidgetStateProperty.all<Color>(
MzansiInnovationHub.of(context)! MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!
.successColor()), .theme
.mode ==
"Dark")),
), ),
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!
.primaryColor(), .theme
.mode ==
"Dark"),
iconSize: 25, iconSize: 25,
onPressed: () { onPressed: () {
print("Start TTS now"); print("Start TTS now");
@@ -475,12 +489,12 @@ class _AiChatState extends State<AiChat> {
width: 300, width: 300,
child: MihNumericStepper( child: MihNumericStepper(
controller: _fontSizeController, controller: _fontSizeController,
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
hintText: "Font Size", hintText: "Font Size",
requiredText: true, requiredText: true,
minValue: 1, minValue: 1,
@@ -698,10 +712,12 @@ class _AiChatState extends State<AiChat> {
child: IconButton.filled( child: IconButton.filled(
style: ButtonStyle( style: ButtonStyle(
backgroundColor: WidgetStateProperty.all<Color>( backgroundColor: WidgetStateProperty.all<Color>(
MzansiInnovationHub.of(context)!.theme.errorColor()), MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark")),
), ),
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
iconSize: 20, iconSize: 20,
onPressed: () { onPressed: () {
if (_showModelOptions.value == true) { if (_showModelOptions.value == true) {
@@ -749,17 +765,19 @@ class _AiChatState extends State<AiChat> {
SpeedDialChild( SpeedDialChild(
child: Icon( child: Icon(
Icons.refresh, Icons.refresh,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
label: "New Chat", label: "New Chat",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () { onTap: () {
_resetChat(); _resetChat();
}, },
@@ -767,17 +785,19 @@ class _AiChatState extends State<AiChat> {
SpeedDialChild( SpeedDialChild(
child: Icon( child: Icon(
Icons.settings, Icons.settings,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
label: "Settings", label: "Settings",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () { onTap: () {
if (_showModelOptions.value == true) { if (_showModelOptions.value == true) {
setState(() { setState(() {
@@ -808,7 +828,8 @@ class _AiChatState extends State<AiChat> {
Icon( Icon(
MihIcons.mzansiAi, MihIcons.mzansiAi,
size: 165, size: 165,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Text( Text(
@@ -818,7 +839,8 @@ class _AiChatState extends State<AiChat> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
const SizedBox(height: 25), const SizedBox(height: 25),
@@ -829,8 +851,8 @@ class _AiChatState extends State<AiChat> {
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
children: [ children: [
TextSpan( TextSpan(

View File

@@ -3,6 +3,7 @@ import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_business_profile_preview.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_business_profile_preview.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class BuildBusinessSearchResultsList extends StatefulWidget { class BuildBusinessSearchResultsList extends StatefulWidget {
final List<Business> businessList; final List<Business> businessList;
@@ -30,12 +31,14 @@ class _BuildBusinessSearchResultsListState
itemCount: widget.businessList.length, itemCount: widget.businessList.length,
separatorBuilder: (BuildContext context, index) { separatorBuilder: (BuildContext context, index) {
return Divider( return Divider(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}, },
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Material( return Material(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
@@ -46,9 +49,8 @@ class _BuildBusinessSearchResultsListState
), ),
); );
}, },
splashColor: MzansiInnovationHub.of(context)! splashColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode == "Dark")
.secondaryColor()
.withOpacity(0.2), .withOpacity(0.2),
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
child: Padding( child: Padding(

View File

@@ -3,6 +3,7 @@ import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_business_profile_preview.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_business_profile_preview.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class BuildFavouriteBusinessesList extends StatefulWidget { class BuildFavouriteBusinessesList extends StatefulWidget {
final List<Business?> favouriteBusinesses; final List<Business?> favouriteBusinesses;
@@ -39,7 +40,8 @@ class _BuildFavouriteBusinessesListState
} }
return Material( return Material(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
@@ -50,9 +52,8 @@ class _BuildFavouriteBusinessesListState
), ),
); );
}, },
splashColor: MzansiInnovationHub.of(context)! splashColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode == "Dark")
.secondaryColor()
.withOpacity(0.2), .withOpacity(0.2),
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
child: Padding( child: Padding(

View File

@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/main.dart'; 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_objects/app_user.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_personal_profile_preview.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_personal_profile_preview.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class BuildUserSearchResultsList extends StatefulWidget { class BuildUserSearchResultsList extends StatefulWidget {
final List<AppUser> userList; final List<AppUser> userList;
@@ -25,12 +26,14 @@ class _BuildUserSearchResultsListState
itemCount: widget.userList.length, itemCount: widget.userList.length,
separatorBuilder: (BuildContext context, index) { separatorBuilder: (BuildContext context, index) {
return Divider( return Divider(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}, },
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Material( return Material(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
@@ -38,9 +41,8 @@ class _BuildUserSearchResultsListState
arguments: widget.userList[index], arguments: widget.userList[index],
); );
}, },
splashColor: MzansiInnovationHub.of(context)! splashColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode == "Dark")
.secondaryColor()
.withOpacity(0.2), .withOpacity(0.2),
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
child: Padding( child: Padding(

View File

@@ -3,6 +3,7 @@ import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tile.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tile.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MzansiDirectoryTile extends StatefulWidget { class MzansiDirectoryTile extends StatefulWidget {
final double packageSize; final double packageSize;
@@ -31,12 +32,15 @@ class _MzansiDirectoryTileState extends State<MzansiDirectoryTile> {
appName: "Mzansi Directory", appName: "Mzansi Directory",
appIcon: Icon( appIcon: Icon(
MihIcons.mzansiDirectory, MihIcons.mzansiDirectory,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// size: widget.packageSize, // size: widget.packageSize,
), ),
iconSize: widget.packageSize, iconSize: widget.packageSize,
primaryColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(), primaryColor: MihColors.getSecondaryColor(
secondaryColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), 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/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_search_bar.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_search_bar.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_single_child_scroll.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MihContacts extends StatefulWidget { class MihContacts extends StatefulWidget {
const MihContacts({super.key}); const MihContacts({super.key});
@@ -35,9 +36,10 @@ class _MihContactsState extends State<MihContacts> {
controller: contactSearchController, controller: contactSearchController,
hintText: "Search Contacts", hintText: "Search Contacts",
prefixIcon: Icons.search, prefixIcon: Icons.search,
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
hintColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), hintColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onPrefixIconTap: () {}, onPrefixIconTap: () {},
searchFocusNode: searchFocusNode, searchFocusNode: searchFocusNode,
), ),

View File

@@ -1,5 +1,4 @@
import 'dart:async'; import 'dart:async';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/bookmarked_business.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/bookmarked_business.dart';
@@ -9,6 +8,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_search_bar.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_search_bar.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_single_child_scroll.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_packages/mzansi_directory/builders/build_favourite_businesses_list.dart'; import 'package:mzansi_innovation_hub/mih_packages/mzansi_directory/builders/build_favourite_businesses_list.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_business_details_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_business_details_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_directory_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_directory_services.dart';
@@ -114,9 +114,10 @@ class _MihFavouriteBusinessesState extends State<MihFavouriteBusinesses> {
controller: businessSearchController, controller: businessSearchController,
hintText: "Search Businesses", hintText: "Search Businesses",
prefixIcon: Icons.search, prefixIcon: Icons.search,
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
hintColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), hintColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onPrefixIconTap: () {}, onPrefixIconTap: () {},
searchFocusNode: searchFocusNode, searchFocusNode: searchFocusNode,
), ),
@@ -146,9 +147,11 @@ class _MihFavouriteBusinessesState extends State<MihFavouriteBusinesses> {
Icon( Icon(
MihIcons.iDontKnow, MihIcons.iDontKnow,
size: 165, size: 165,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!
.secondaryColor(), .theme
.mode ==
"Dark"),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Text( Text(
@@ -158,9 +161,11 @@ class _MihFavouriteBusinessesState extends State<MihFavouriteBusinesses> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!
.secondaryColor(), .theme
.mode ==
"Dark"),
), ),
), ),
], ],
@@ -186,9 +191,9 @@ class _MihFavouriteBusinessesState extends State<MihFavouriteBusinesses> {
Icon( Icon(
MihIcons.businessProfile, MihIcons.businessProfile,
size: 165, size: 165,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Text( Text(
@@ -198,9 +203,9 @@ class _MihFavouriteBusinessesState extends State<MihFavouriteBusinesses> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
const SizedBox(height: 25), const SizedBox(height: 25),
@@ -211,9 +216,11 @@ class _MihFavouriteBusinessesState extends State<MihFavouriteBusinesses> {
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!
.secondaryColor(), .theme
.mode ==
"Dark"),
), ),
children: [ children: [
TextSpan(text: "Use the mzansi search"), TextSpan(text: "Use the mzansi search"),

View File

@@ -9,6 +9,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_search_bar.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_search_bar.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_single_child_scroll.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_packages/mzansi_directory/builders/build_business_search_resultsList.dart'; import 'package:mzansi_innovation_hub/mih_packages/mzansi_directory/builders/build_business_search_resultsList.dart';
import 'package:mzansi_innovation_hub/mih_packages/mzansi_directory/builders/build_user_search_results_list.dart'; import 'package:mzansi_innovation_hub/mih_packages/mzansi_directory/builders/build_user_search_results_list.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart';
@@ -144,16 +145,16 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
icon: Icon( icon: Icon(
Icons.swap_horiz_rounded, Icons.swap_horiz_rounded,
size: 35, size: 35,
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
), ),
), ),
], ],
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
hintColor: hintColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onPrefixIconTap: () { onPrefixIconTap: () {
searchPressed(); searchPressed();
}, },
@@ -183,9 +184,9 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
? Icons.filter_list_rounded ? Icons.filter_list_rounded
: Icons.filter_list_off_rounded, : Icons.filter_list_off_rounded,
size: 35, size: 35,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
), ),
@@ -231,16 +232,16 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
); );
} }
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.successColor(), "Dark"),
elevation: 10, elevation: 10,
child: Text( child: Text(
"Search", "Search",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -292,8 +293,8 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
Icon( Icon(
MihIcons.personalProfile, MihIcons.personalProfile,
size: 165, size: 165,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Text( Text(
@@ -303,9 +304,9 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
const SizedBox(height: 25), const SizedBox(height: 25),
@@ -316,9 +317,9 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
children: [ children: [
TextSpan(text: "Press "), TextSpan(text: "Press "),
@@ -327,9 +328,9 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
child: Icon( child: Icon(
Icons.swap_horiz_rounded, Icons.swap_horiz_rounded,
size: 20, size: 20,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
TextSpan(text: " to search for businesses of Mzansi"), TextSpan(text: " to search for businesses of Mzansi"),
@@ -349,7 +350,7 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
// MihIcons.personalProfile, // MihIcons.personalProfile,
// size: 165, // size: 165,
// color: // color:
// MzansiInnovationHub.of(context)!.theme.secondaryColor(), // MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ), // ),
// const SizedBox(height: 10), // const SizedBox(height: 10),
// Text( // Text(
@@ -360,7 +361,7 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
// fontSize: 25, // fontSize: 25,
// fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
// color: // color:
// MzansiInnovationHub.of(context)!.theme.secondaryColor(), // MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ), // ),
// ), // ),
// ], // ],
@@ -375,8 +376,8 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
Icon( Icon(
MihIcons.iDontKnow, MihIcons.iDontKnow,
size: 165, size: 165,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Text( Text(
@@ -386,8 +387,8 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
], ],
@@ -398,7 +399,8 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
"Error pulling Patients Data\n/users/search/${mzansiSearchController.text}", "Error pulling Patients Data\n/users/search/${mzansiSearchController.text}",
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
color: MzansiInnovationHub.of(context)!.theme.errorColor()), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark")),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
); );
@@ -440,8 +442,8 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
Icon( Icon(
MihIcons.iDontKnow, MihIcons.iDontKnow,
size: 165, size: 165,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
const SizedBox(height: 25), const SizedBox(height: 25),
Text( Text(
@@ -451,8 +453,8 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
], ],
@@ -468,8 +470,8 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
Icon( Icon(
MihIcons.businessProfile, MihIcons.businessProfile,
size: 165, size: 165,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Text( Text(
@@ -479,9 +481,9 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
const SizedBox(height: 25), const SizedBox(height: 25),
@@ -492,9 +494,9 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
children: [ children: [
TextSpan(text: "Press "), TextSpan(text: "Press "),
@@ -503,9 +505,9 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
child: Icon( child: Icon(
Icons.swap_horiz_rounded, Icons.swap_horiz_rounded,
size: 20, size: 20,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
TextSpan(text: " to search for people of Mzansi"), TextSpan(text: " to search for people of Mzansi"),
@@ -521,9 +523,9 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
children: [ children: [
TextSpan(text: "Press "), TextSpan(text: "Press "),
@@ -532,9 +534,9 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
child: Icon( child: Icon(
Icons.filter_list_rounded, Icons.filter_list_rounded,
size: 20, size: 20,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
TextSpan(text: " to filter business types"), TextSpan(text: " to filter business types"),
@@ -551,7 +553,8 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
"Error pulling Patients Data\n/users/search/${mzansiSearchController.text}", "Error pulling Patients Data\n/users/search/${mzansiSearchController.text}",
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
color: MzansiInnovationHub.of(context)!.theme.errorColor()), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark")),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
); );

View File

@@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:flutter_speed_dial/flutter_speed_dial.dart'; import 'package:flutter_speed_dial/flutter_speed_dial.dart';
import 'package:mzansi_innovation_hub/main.dart'; 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_alert_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_validation_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'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
@@ -161,17 +162,19 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
SpeedDialChild( SpeedDialChild(
child: Icon( child: Icon(
Icons.delete, Icons.delete,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
label: "Delete Employee", label: "Delete Employee",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () { onTap: () {
showDeleteWarning(index); showDeleteWarning(index);
}, },
@@ -191,10 +194,10 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
formKey: _formKey, formKey: _formKey,
formFields: [ formFields: [
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: fnameController, controller: fnameController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -203,10 +206,10 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
), ),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: lnameController, controller: lnameController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -257,15 +260,16 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
MihAlertServices().formNotFilledCompletely(context); MihAlertServices().formNotFilledCompletely(context);
} }
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Update", "Update",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -309,7 +313,8 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
separatorBuilder: (BuildContext context, index) { separatorBuilder: (BuildContext context, index) {
return Divider( return Divider(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}, },
itemCount: widget.employees.length, itemCount: widget.employees.length,
@@ -327,7 +332,8 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
subtitle: Text( subtitle: Text(
"${widget.employees[index].username}\n${widget.employees[index].email}\nAccess: ${widget.employees[index].access}", "${widget.employees[index].username}\n${widget.employees[index].email}\nAccess: ${widget.employees[index].access}",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
onTap: () { onTap: () {

View File

@@ -1,6 +1,7 @@
import 'dart:convert'; import 'dart:convert';
import 'package:mzansi_innovation_hub/main.dart'; 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_alert_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_validation_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'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
@@ -142,12 +143,12 @@ class _BuildUserListState extends State<BuildUserList> {
formKey: _formKey, formKey: _formKey,
formFields: [ formFields: [
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: usernameController, controller: usernameController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -156,12 +157,12 @@ class _BuildUserListState extends State<BuildUserList> {
), ),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: emailController, controller: emailController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -213,16 +214,16 @@ class _BuildUserListState extends State<BuildUserList> {
.formNotFilledCompletely(context); .formNotFilledCompletely(context);
} }
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.successColor(), "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Add", "Add",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -256,7 +257,8 @@ class _BuildUserListState extends State<BuildUserList> {
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
separatorBuilder: (BuildContext context, index) { separatorBuilder: (BuildContext context, index) {
return Divider( return Divider(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}, },
itemCount: widget.users.length, itemCount: widget.users.length,
@@ -271,7 +273,8 @@ class _BuildUserListState extends State<BuildUserList> {
subtitle: Text( subtitle: Text(
"Email: ${hideEmail(widget.users[index].email)}", "Email: ${hideEmail(widget.users[index].email)}",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
onTap: () { onTap: () {

View File

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

View File

@@ -35,7 +35,8 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
RedactedConfiguration getRedactedConfiguration() { RedactedConfiguration getRedactedConfiguration() {
return RedactedConfiguration( return RedactedConfiguration(
// redactedColor: Colors.pink, // 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( alertIcon: Icon(
Icons.warning_rounded, Icons.warning_rounded,
size: 100, size: 100,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
alertTitle: "Error Making Call", alertTitle: "Error Making Call",
alertBody: Column( alertBody: Column(
@@ -60,15 +62,16 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Text( 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.", "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( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
fontSize: 15, fontSize: 15,
), ),
), ),
], ],
), ),
alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}); });
} }
@@ -102,7 +105,8 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
alertIcon: Icon( alertIcon: Icon(
Icons.warning_rounded, Icons.warning_rounded,
size: 100, size: 100,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
alertTitle: "Error Creating Email", alertTitle: "Error Creating Email",
alertBody: Column( alertBody: Column(
@@ -110,15 +114,16 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Text( 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.", "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( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
fontSize: 15, fontSize: 15,
), ),
), ),
], ],
), ),
alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}); });
} }
@@ -143,7 +148,8 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
alertIcon: Icon( alertIcon: Icon(
Icons.warning_rounded, Icons.warning_rounded,
size: 100, size: 100,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
alertTitle: "Error Creating Maps", alertTitle: "Error Creating Maps",
alertBody: Column( alertBody: Column(
@@ -151,16 +157,16 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Text( 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.", "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( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
fontSize: 15, fontSize: 15,
), ),
), ),
], ],
), ),
alertColour: alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}); });
} }
@@ -172,7 +178,8 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
alertIcon: Icon( alertIcon: Icon(
Icons.warning_rounded, Icons.warning_rounded,
size: 100, size: 100,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
alertTitle: "Error Creating Maps", alertTitle: "Error Creating Maps",
alertBody: Column( alertBody: Column(
@@ -180,15 +187,16 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Text( 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.", "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( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
fontSize: 15, fontSize: 15,
), ),
), ),
], ],
), ),
alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}); });
} }
@@ -212,7 +220,8 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
alertIcon: Icon( alertIcon: Icon(
Icons.warning_rounded, Icons.warning_rounded,
size: 100, size: 100,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
alertTitle: "Error Opening Website", alertTitle: "Error Opening Website",
alertBody: Column( alertBody: Column(
@@ -220,16 +229,16 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Text( 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.", "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( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
fontSize: 15, fontSize: 15,
), ),
), ),
], ],
), ),
alertColour: alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}); });
} }
@@ -241,7 +250,8 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
alertIcon: Icon( alertIcon: Icon(
Icons.warning_rounded, Icons.warning_rounded,
size: 100, size: 100,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
alertTitle: "Error Opening Website", alertTitle: "Error Opening Website",
alertBody: Column( alertBody: Column(
@@ -249,15 +259,16 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Text( 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.", "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( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
fontSize: 15, fontSize: 15,
), ),
), ),
], ],
), ),
alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}); });
} }
@@ -272,12 +283,12 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Function()? ontap, Function()? ontap,
) { ) {
return Material( return Material(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
child: InkWell( child: InkWell(
onTap: ontap, onTap: ontap,
splashColor: MzansiInnovationHub.of(context)! splashColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode == "Dark")
.primaryColor()
.withOpacity(0.2), .withOpacity(0.2),
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
child: Padding( child: Padding(
@@ -299,8 +310,8 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
child: Icon( child: Icon(
icon, icon,
// size: 35, // size: 35,
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
).redacted( ).redacted(
@@ -320,9 +331,9 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
height: 1.0, height: 1.0,
), ),
).redacted( ).redacted(
@@ -335,9 +346,9 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
), ),
).redacted( ).redacted(
context: context, context: context,
@@ -387,16 +398,16 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
// double screenWidth = MediaQuery.of(context).size.width; // double screenWidth = MediaQuery.of(context).size.width;
return Material( return Material(
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode == "Dark")
.secondaryColor()
.withValues(alpha: 0.6), .withValues(alpha: 0.6),
borderRadius: BorderRadius.circular(25), borderRadius: BorderRadius.circular(25),
elevation: 10, elevation: 10,
shadowColor: Colors.black, shadowColor: Colors.black,
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
), ),
child: Column( child: Column(
@@ -406,7 +417,8 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
"Call", "Call",
"Give us a quick call.", "Give us a quick call.",
Icons.phone, Icons.phone,
MihColors.getGreenColor(context), MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
false, false,
() { () {
// print("Calling ${widget.cellNumber}"); // print("Calling ${widget.cellNumber}");
@@ -414,13 +426,15 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
}, },
), ),
Divider( Divider(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
_buildContactInfo( _buildContactInfo(
"Email", "Email",
"Send us an email.", "Send us an email.",
Icons.email, Icons.email,
MihColors.getPinkColor(context), MihColors.getPinkColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
false, false,
() { () {
// print("Emailing ${widget.email}"); // print("Emailing ${widget.email}");
@@ -436,14 +450,15 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
child: Column( child: Column(
children: [ children: [
Divider( Divider(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
_buildContactInfo( _buildContactInfo(
"Location", "Location",
"Come visit us.", "Come visit us.",
Icons.location_on, Icons.location_on,
MihColors.getOrangeColor(context), MihColors.getOrangeColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
false, false,
() { () {
final latitude = double.parse( final latitude = double.parse(
@@ -465,14 +480,15 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
child: Column( child: Column(
children: [ children: [
Divider( Divider(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
_buildContactInfo( _buildContactInfo(
"Website", "Website",
"Find out more about us.", "Find out more about us.",
Icons.vpn_lock, Icons.vpn_lock,
MihColors.getRedColor(context), MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
false, false,
() { () {
_launchWebsite(widget.business.website); _launchWebsite(widget.business.website);
@@ -491,9 +507,9 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0), padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Divider( child: Divider(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
), ),
), ),
Container( Container(
@@ -501,7 +517,9 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
"Loading Rating", "Loading Rating",
"Loading your rating.", "Loading your rating.",
Icons.star_rate_rounded, Icons.star_rate_rounded,
MihColors.getYellowColor(context), MihColors.getYellowColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
true, true,
null, null,
), ),
@@ -521,16 +539,18 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0), padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Divider( child: Divider(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
), ),
), ),
_buildContactInfo( _buildContactInfo(
ratingDisplayTitle, ratingDisplayTitle,
"Let us know how we are doing.", "Let us know how we are doing.",
Icons.star_rate_rounded, Icons.star_rate_rounded,
MihColors.getYellowColor(context), MihColors.getYellowColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
false, false,
() { () {
businessReviewRatingWindow( businessReviewRatingWindow(
@@ -552,9 +572,9 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0), padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Divider( child: Divider(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
), ),
), ),
Container( Container(
@@ -562,7 +582,9 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
"Loading Bookmark", "Loading Bookmark",
"Loading your bookmark.", "Loading your bookmark.",
Icons.bookmark_add_rounded, Icons.bookmark_add_rounded,
MihColors.getBluishPurpleColor(context), MihColors.getBluishPurpleColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
true, true,
null, null,
), ),
@@ -582,9 +604,9 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0), padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Divider( child: Divider(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
), ),
), ),
_buildContactInfo( _buildContactInfo(
@@ -593,7 +615,9 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
bookmarkBusiness == null bookmarkBusiness == null
? Icons.bookmark_add_rounded ? Icons.bookmark_add_rounded
: Icons.bookmark_remove_rounded, : Icons.bookmark_remove_rounded,
MihColors.getBluishPurpleColor(context), MihColors.getBluishPurpleColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
false, false,
() { () {
// _launchWebsite(widget.website); // _launchWebsite(widget.website);
@@ -612,14 +636,14 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
// Padding( // Padding(
// padding: const EdgeInsets.symmetric(horizontal: 10.0), // padding: const EdgeInsets.symmetric(horizontal: 10.0),
// child: Divider( // child: Divider(
// color: MzansiInnovationHub.of(context)!.theme.primaryColor(), // color: MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ), // ),
// ), // ),
// _buildContactInfo( // _buildContactInfo(
// "Bookmark", // "Bookmark",
// "Save us for later.", // "Save us for later.",
// Icons.bookmark_add_rounded, // Icons.bookmark_add_rounded,
// MihColors.getBluishPurpleColor(context), // MihColors.getBluishPurpleColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// () { // () {
// // _launchWebsite(widget.website); // // _launchWebsite(widget.website);
// print("Saving ${widget.business.Name} to Directory"); // print("Saving ${widget.business.Name} to Directory");
@@ -630,7 +654,7 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
// Padding( // Padding(
// padding: const EdgeInsets.symmetric(horizontal: 10.0), // padding: const EdgeInsets.symmetric(horizontal: 10.0),
// child: Divider( // 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MihPackageAlert( return MihPackageAlert(
alertColour: MihColors.getSecondaryColor(context), alertColour: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
alertIcon: Icon( alertIcon: Icon(
Icons.warning_rounded, Icons.warning_rounded,
size: 100, size: 100,
color: MihColors.getSecondaryColor(context), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
alertTitle: "Remove Bookmark", alertTitle: "Remove Bookmark",
alertBody: Column( alertBody: Column(
@@ -89,7 +91,8 @@ class _MihDeleteBookmarkAlertState extends State<MihDeleteBookmarkAlert> {
Text( Text(
"Are you sure you want to remove ${widget.business.Name} from your Mzansi Directory?", "Are you sure you want to remove ${widget.business.Name} from your Mzansi Directory?",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 15, fontSize: 15,
), ),
), ),
@@ -103,13 +106,13 @@ class _MihDeleteBookmarkAlertState extends State<MihDeleteBookmarkAlert> {
onPressed: () async { onPressed: () async {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
child: Text( child: Text(
"Cancel", "Cancel",
style: TextStyle( style: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -122,13 +125,13 @@ class _MihDeleteBookmarkAlertState extends State<MihDeleteBookmarkAlert> {
deleteBookmark( deleteBookmark(
widget.bookmarkBusiness!.idbookmarked_businesses); widget.bookmarkBusiness!.idbookmarked_businesses);
}, },
buttonColor: buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
child: Text( child: Text(
"Remove Business", "Remove Business",
style: TextStyle( style: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

View File

@@ -52,11 +52,13 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
showDialog( showDialog(
context: context, context: context,
builder: (context) => MihPackageAlert( builder: (context) => MihPackageAlert(
alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
alertIcon: Icon( alertIcon: Icon(
Icons.warning_rounded, Icons.warning_rounded,
size: 100, size: 100,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
alertTitle: "Delete Review", alertTitle: "Delete Review",
alertBody: Column( alertBody: Column(
@@ -64,7 +66,8 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
Text( Text(
"Are you sure you want to delete this review? This action cannot be undone.", "Are you sure you want to delete this review? This action cannot be undone.",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 15, fontSize: 15,
), ),
), ),
@@ -117,13 +120,14 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
} }
}); });
}, },
buttonColor: buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
child: Text( child: Text(
"Delete", "Delete",
style: TextStyle( style: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -134,13 +138,14 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
child: Text( child: Text(
"Cancel", "Cancel",
style: TextStyle( style: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -156,9 +161,11 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
Color getMissionVisionLimitColor(int limit) { Color getMissionVisionLimitColor(int limit) {
if (_counter.value <= limit) { if (_counter.value <= limit) {
return MzansiInnovationHub.of(context)!.theme.secondaryColor(); return MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} else { } else {
return MzansiInnovationHub.of(context)!.theme.errorColor(); return MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} }
} }
@@ -302,17 +309,19 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
SpeedDialChild( SpeedDialChild(
child: Icon( child: Icon(
Icons.delete, Icons.delete,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
label: "Delete Review", label: "Delete Review",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () { onTap: () {
showDeleteReviewAlert(); showDeleteReviewAlert();
}, },
@@ -340,9 +349,9 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
"Business Rating", "Business Rating",
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -357,14 +366,18 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
filledIcon: Icons.star, filledIcon: Icons.star,
emptyIcon: Icons.star_border, emptyIcon: Icons.star_border,
halfFilledIcon: Icons.star_half, halfFilledIcon: Icons.star_half,
filledColor: MihColors.getYellowColor(context), filledColor: MihColors.getYellowColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
// filledColor: MzansiInnovationHub.of(context)! // filledColor: MzansiInnovationHub.of(context)!
// .theme // .theme
// .secondaryColor(), // .secondaryColor(),
emptyColor: MzansiInnovationHub.of(context)! emptyColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
halfFilledColor: MihColors.getYellowColor(context), halfFilledColor: MihColors.getYellowColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
// MzansiInnovationHub.of(context)! // MzansiInnovationHub.of(context)!
// .theme // .theme
// .secondaryColor(), // .secondaryColor(),
@@ -380,11 +393,15 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
filledIcon: Icons.star, filledIcon: Icons.star,
emptyIcon: Icons.star_border, emptyIcon: Icons.star_border,
halfFilledIcon: Icons.star_half, halfFilledIcon: Icons.star_half,
filledColor: MihColors.getYellowColor(context), filledColor: MihColors.getYellowColor(
emptyColor: MzansiInnovationHub.of(context)! MzansiInnovationHub.of(context)!.theme.mode ==
.theme "Dark"),
.secondaryColor(), emptyColor: MihColors.getSecondaryColor(
halfFilledColor: MihColors.getYellowColor(context), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
halfFilledColor: MihColors.getYellowColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
isHalfAllowed: true, isHalfAllowed: true,
initialRating: widget.businessReview != null initialRating: widget.businessReview != null
? double.parse(_reviewScoreController.text) ? double.parse(_reviewScoreController.text)
@@ -406,11 +423,12 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
visible: widget.readOnly, visible: widget.readOnly,
child: MihTextFormField( child: MihTextFormField(
// width: 200, // width: 200,
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
controller: _reviewReviewerController, controller: _reviewReviewerController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -424,10 +442,10 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
// width: 200, // width: 200,
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: _reviewTitleController, controller: _reviewTitleController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -441,10 +459,10 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
height: 250, height: 250,
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: _reviewDescriptionController, controller: _reviewDescriptionController,
multiLineInput: true, multiLineInput: true,
requiredText: widget.readOnly, requiredText: widget.readOnly,
@@ -504,18 +522,18 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
MihAlertServices().formNotFilledCompletely(context); MihAlertServices().formNotFilledCompletely(context);
} }
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.successColor(), "Dark"),
width: 300, width: 300,
child: Text( child: Text(
widget.businessReview != null widget.businessReview != null
? "Update Review" ? "Update Review"
: "Add Review", : "Add Review",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, 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_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MzansiBusinessProfileTile extends StatefulWidget { class MzansiBusinessProfileTile extends StatefulWidget {
final BusinessArguments arguments; final BusinessArguments arguments;
@@ -31,12 +32,15 @@ class _MzansiBusinessProfileTileState extends State<MzansiBusinessProfileTile> {
appName: "Business Profile", appName: "Business Profile",
appIcon: Icon( appIcon: Icon(
MihIcons.businessProfile, MihIcons.businessProfile,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// size: widget.packageSize, // size: widget.packageSize,
), ),
iconSize: widget.packageSize, iconSize: widget.packageSize,
primaryColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(), primaryColor: MihColors.getSecondaryColor(
secondaryColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), 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_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MzansiSetupBusinessProfileTile extends StatefulWidget { class MzansiSetupBusinessProfileTile extends StatefulWidget {
final AppUser signedInUser; final AppUser signedInUser;
@@ -32,11 +33,14 @@ class _MzansiSetupBusinessProfileTileState
appName: "Set Up Business", appName: "Set Up Business",
appIcon: Icon( appIcon: Icon(
MihIcons.businessSetup, MihIcons.businessSetup,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
iconSize: widget.packageSize, iconSize: widget.packageSize,
primaryColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(), primaryColor: MihColors.getSecondaryColor(
secondaryColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
secondaryColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
} }
} }

View File

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

View File

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

View File

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

View File

@@ -6,6 +6,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart'; 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:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/business_profile/builders/build_user_list.dart'; import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/business_profile/builders/build_user_list.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_user_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_user_services.dart';
@@ -70,7 +71,8 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
Icon( Icon(
MihIcons.iDontKnow, MihIcons.iDontKnow,
size: 165, size: 165,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Text( Text(
@@ -80,7 +82,8 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
], ],
@@ -96,7 +99,8 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
Icon( Icon(
MihIcons.personalProfile, MihIcons.personalProfile,
size: 165, size: 165,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Text( Text(
@@ -106,7 +110,8 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
const SizedBox(height: 25), const SizedBox(height: 25),
@@ -117,8 +122,8 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
children: [ children: [
TextSpan( TextSpan(
@@ -147,7 +152,7 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
// "Enter Username or Email to search", // "Enter Username or Email to search",
// style: TextStyle( // style: TextStyle(
// fontSize: 25, // fontSize: 25,
// color: MzansiInnovationHub.of(context)!.theme.messageTextColor()), // color: MihColors.getGreyColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark")),
// textAlign: TextAlign.center, // textAlign: TextAlign.center,
// ), // ),
// ); // );
@@ -186,8 +191,10 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
controller: searchController, controller: searchController,
hintText: "Search Users", hintText: "Search Users",
prefixIcon: Icons.search, prefixIcon: Icons.search,
fillColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(), fillColor: MihColors.getSecondaryColor(
hintColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
hintColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onPrefixIconTap: () { onPrefixIconTap: () {
submitUserForm(); submitUserForm();
}, },
@@ -224,8 +231,9 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
"$errorCode: Error pulling Patients Data\n/users/search/$userSearch\n$errorBody", "$errorCode: Error pulling Patients Data\n/users/search/$userSearch\n$errorBody",
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
color: color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor()), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark")),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
); );

View File

@@ -1,9 +1,9 @@
import 'dart:convert'; import 'dart:convert';
import 'package:mzansi_innovation_hub/main.dart'; 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_single_child_scroll.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_env.dart'; import 'package:mzansi_innovation_hub/mih_config/mih_env.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business_employee.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/business_employee.dart';
@@ -60,7 +60,8 @@ class _MihMyBusinessTeamState extends State<MihMyBusinessTeam> {
"", "",
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
color: MzansiInnovationHub.of(context)!.theme.messageTextColor()), color: MihColors.getGreyColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark")),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
); );
@@ -105,8 +106,9 @@ class _MihMyBusinessTeamState extends State<MihMyBusinessTeam> {
"$errorCode: Error pulling Patients Data\n${AppEnviroment.baseApiUrl}/business-user/users/${widget.arguments.businessUser!.business_id}\n$errorBody", "$errorCode: Error pulling Patients Data\n${AppEnviroment.baseApiUrl}/business-user/users/${widget.arguments.businessUser!.business_id}\n$errorBody",
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
color: color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor()), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark")),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
); );

View File

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

View File

@@ -4,6 +4,7 @@ import 'package:country_code_picker/country_code_picker.dart';
import 'package:http/http.dart'; import 'package:http/http.dart';
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.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_alert_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_business_details_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_business_details_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_file_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_file_services.dart';
@@ -257,9 +258,11 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
Color getMissionVisionLimitColor(int limit) { Color getMissionVisionLimitColor(int limit) {
if (_counter.value <= limit) { if (_counter.value <= limit) {
return MzansiInnovationHub.of(context)!.theme.secondaryColor(); return MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} else { } else {
return MzansiInnovationHub.of(context)!.theme.errorColor(); return MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} }
} }
@@ -296,20 +299,20 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
), ),
), ),
Divider( Divider(
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor()), "Dark")),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihForm( MihForm(
formKey: _formKey, formKey: _formKey,
formFields: [ formFields: [
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: nameController, controller: nameController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -320,12 +323,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
), ),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: typeController, controller: typeController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -336,12 +339,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
), ),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: emailController, controller: emailController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -378,22 +381,21 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
initialSelection: countryCodeController.text, initialSelection: countryCodeController.text,
showDropDownButton: false, showDropDownButton: false,
pickerStyle: PickerStyle.bottomSheet, pickerStyle: PickerStyle.bottomSheet,
dialogBackgroundColor: dialogBackgroundColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)! MzansiInnovationHub.of(context)!.theme.mode ==
.theme "Dark"),
.primaryColor(), barrierColor: MihColors.getPrimaryColor(
barrierColor: MzansiInnovationHub.of(context)! MzansiInnovationHub.of(context)!.theme.mode ==
.theme "Dark"),
.primaryColor(),
), ),
Expanded( Expanded(
child: MihTextFormField( child: MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: contactController, controller: contactController,
numberMode: true, numberMode: true,
multiLineInput: false, multiLineInput: false,
@@ -409,12 +411,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
height: 250, height: 250,
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: missionVisionController, controller: missionVisionController,
multiLineInput: true, multiLineInput: true,
requiredText: true, requiredText: true,
@@ -456,12 +458,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
), ),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: websiteController, controller: websiteController,
multiLineInput: false, multiLineInput: false,
requiredText: false, requiredText: false,
@@ -474,12 +476,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: regController, controller: regController,
multiLineInput: false, multiLineInput: false,
requiredText: false, requiredText: false,
@@ -491,12 +493,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
), ),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: practiceNoController, controller: practiceNoController,
multiLineInput: false, multiLineInput: false,
requiredText: false, requiredText: false,
@@ -508,12 +510,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: vatNoController, controller: vatNoController,
multiLineInput: false, multiLineInput: false,
requiredText: false, requiredText: false,
@@ -529,12 +531,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
children: [ children: [
Flexible( Flexible(
child: MihTextFormField( child: MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: locationController, controller: locationController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -565,16 +567,18 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
Navigator.of(context).pop(); Navigator.of(context).pop();
}); });
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
width: 100, width: 100,
child: Text( child: Text(
"Set", "Set",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!
.primaryColor(), .theme
.mode ==
"Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -594,17 +598,17 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
), ),
), ),
Divider( Divider(
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor()), "Dark")),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: titleController, controller: titleController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -626,12 +630,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
// ), // ),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: fnameController, controller: fnameController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -643,12 +647,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
), ),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: lnameController, controller: lnameController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -660,12 +664,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
), ),
const SizedBox(height: 15.0), const SizedBox(height: 15.0),
MihTextFormField( MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: accessController, controller: accessController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -697,16 +701,16 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
.formNotFilledCompletely(context); .formNotFilledCompletely(context);
} }
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.successColor(), "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Add", "Add",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, 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/app_user.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MzansiProfileTile extends StatefulWidget { class MzansiProfileTile extends StatefulWidget {
final AppUser signedInUser; final AppUser signedInUser;
@@ -38,12 +39,15 @@ class _MzansiProfileTileState extends State<MzansiProfileTile> {
appName: "Mzansi Profile", appName: "Mzansi Profile",
appIcon: Icon( appIcon: Icon(
MihIcons.mihLogo, MihIcons.mihLogo,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// size: widget.packageSize, // size: widget.packageSize,
), ),
iconSize: widget.packageSize, iconSize: widget.packageSize,
primaryColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(), primaryColor: MihColors.getSecondaryColor(
secondaryColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), 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/app_user.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MzansiSetupProfileTile extends StatefulWidget { class MzansiSetupProfileTile extends StatefulWidget {
final AppUser signedInUser; final AppUser signedInUser;
@@ -37,12 +38,15 @@ class _MzansiSetupProfileTileState extends State<MzansiSetupProfileTile> {
appName: "Set Up Profile", appName: "Set Up Profile",
appIcon: Icon( appIcon: Icon(
MihIcons.profileSetup, MihIcons.profileSetup,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// size: widget.packageSize, // size: widget.packageSize,
), ),
iconSize: widget.packageSize, iconSize: widget.packageSize,
primaryColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(), primaryColor: MihColors.getSecondaryColor(
secondaryColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
secondaryColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
} }
} }

View File

@@ -1,5 +1,6 @@
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.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_alert_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_file_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_file_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_user_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_user_services.dart';
@@ -53,7 +54,8 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
alertIcon: Icon( alertIcon: Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: 100, size: 100,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
alertTitle: "Too Slow, That Username is Taken", alertTitle: "Too Slow, That Username is Taken",
alertBody: const Text( alertBody: const Text(
@@ -62,7 +64,8 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
fontSize: 15, fontSize: 15,
), ),
), ),
alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}, },
); );
@@ -193,9 +196,11 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
Color getPurposeLimitColor(int limit) { Color getPurposeLimitColor(int limit) {
if (_counter.value <= limit) { if (_counter.value <= limit) {
return MzansiInnovationHub.of(context)!.theme.secondaryColor(); return MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} else { } else {
return MzansiInnovationHub.of(context)!.theme.errorColor(); return MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
} }
} }
@@ -226,11 +231,12 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
editable: true, editable: true,
fileNameController: proPicController, fileNameController: proPicController,
userSelectedfile: proPic, userSelectedfile: proPic,
frameColor: MzansiInnovationHub.of(context)! frameColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
backgroundColor: backgroundColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
onChange: (selectedImage) { onChange: (selectedImage) {
setState(() { setState(() {
proPic = selectedImage; proPic = selectedImage;
@@ -242,11 +248,12 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
Visibility( Visibility(
visible: false, visible: false,
child: MihTextFormField( child: MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
controller: proPicController, controller: proPicController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -256,10 +263,10 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
), ),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: usernameController, controller: usernameController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -270,10 +277,10 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
), ),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: fnameController, controller: fnameController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -284,10 +291,10 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
), ),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: lnameController, controller: lnameController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -299,10 +306,10 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
height: 250, height: 250,
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: purposeController, controller: purposeController,
multiLineInput: true, multiLineInput: true,
requiredText: true, requiredText: true,
@@ -346,10 +353,10 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
MihToggle( MihToggle(
hintText: "Activate Business Account", hintText: "Activate Business Account",
initialPostion: businessUser, initialPostion: businessUser,
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
secondaryFillColor: secondaryFillColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onChange: (value) { onChange: (value) {
setState(() { setState(() {
businessUser = value; businessUser = value;
@@ -367,15 +374,16 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
MihAlertServices().formNotFilledCompletely(context); MihAlertServices().formNotFilledCompletely(context);
} }
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Update", "Update",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -464,10 +472,10 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
editable: false, editable: false,
fileNameController: proPicController, fileNameController: proPicController,
userSelectedfile: proPic, userSelectedfile: proPic,
frameColor: frameColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
backgroundColor: backgroundColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onChange: (selectedImage) { onChange: (selectedImage) {
setState(() { setState(() {
proPic = selectedImage; proPic = selectedImage;
@@ -483,9 +491,9 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
style: TextStyle( style: TextStyle(
fontSize: 35, fontSize: 35,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
), ),
@@ -497,9 +505,9 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
), ),
@@ -509,9 +517,9 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
style: TextStyle( style: TextStyle(
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
), ),
@@ -527,9 +535,9 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
style: TextStyle( style: TextStyle(
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
), ),
@@ -541,17 +549,17 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
// Connect with the user // Connect with the user
editProfileWindow(width); editProfileWindow(width);
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
widget.arguments.signedInUser.username.isEmpty widget.arguments.signedInUser.username.isEmpty
? "Set Up Profile" ? "Set Up Profile"
: "Edit Profile", : "Edit Profile",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -571,17 +579,17 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
// SpeedDialChild( // SpeedDialChild(
// child: Icon( // child: Icon(
// Icons.edit, // Icons.edit,
// color: MzansiInnovationHub.of(context)!.theme.primaryColor(), // color: MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ), // ),
// label: "Edit Profile", // label: "Edit Profile",
// labelBackgroundColor: // labelBackgroundColor:
// MzansiInnovationHub.of(context)!.theme.successColor(), // MihColors.getGreenColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// labelStyle: TextStyle( // labelStyle: TextStyle(
// color: MzansiInnovationHub.of(context)!.theme.primaryColor(), // color: MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
// ), // ),
// backgroundColor: // backgroundColor:
// MzansiInnovationHub.of(context)!.theme.successColor(), // MihColors.getGreenColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// onTap: () { // onTap: () {
// editProfileWindow(width); // editProfileWindow(width);
// }, // },

View File

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

View File

@@ -1,4 +1,5 @@
import 'package:mzansi_innovation_hub/main.dart'; 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_user_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_user_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_single_child_scroll.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
@@ -38,7 +39,8 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
alertIcon: Icon( alertIcon: Icon(
Icons.warning_amber_rounded, Icons.warning_amber_rounded,
size: 100, size: 100,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
alertTitle: alertTitle:
"Are you sure you want to permanently delete your MIH account?", "Are you sure you want to permanently delete your MIH account?",
@@ -48,8 +50,8 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
Text( 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.", "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( style: TextStyle(
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -64,15 +66,15 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
MihUserServices.deleteAccount( MihUserServices.deleteAccount(
widget.signedInUser.app_id, context); widget.signedInUser.app_id, context);
}, },
buttonColor: buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Delete", "Delete",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -82,15 +84,15 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
onPressed: () { onPressed: () {
Navigator.pop(context); Navigator.pop(context);
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Cancel", "Cancel",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -100,7 +102,8 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
) )
], ],
), ),
alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}, },
); );
@@ -113,7 +116,8 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
Center( Center(
child: FaIcon( child: FaIcon(
FontAwesomeIcons.trashCan, FontAwesomeIcons.trashCan,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 150, size: 150,
), ),
), ),
@@ -124,7 +128,8 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
style: TextStyle( style: TextStyle(
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
@@ -132,12 +137,14 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
onPressed: () { onPressed: () {
deleteAccountPopUp(context); deleteAccountPopUp(context);
}, },
buttonColor: MzansiInnovationHub.of(context)!.theme.errorColor(), buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Delete Account", "Delete Account",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

View File

@@ -2,6 +2,7 @@ import 'package:flutter_speed_dial/flutter_speed_dial.dart';
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_banner_ad.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_banner_ad.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.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_alert_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_wallet_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_wallet_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
@@ -77,10 +78,10 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
formKey: _formKey, formKey: _formKey,
formFields: [ formFields: [
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: _nicknameController, controller: _nicknameController,
multiLineInput: false, multiLineInput: false,
requiredText: false, requiredText: false,
@@ -94,12 +95,12 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
children: [ children: [
Flexible( Flexible(
child: MihTextFormField( child: MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: _cardNumberController, controller: _cardNumberController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -115,16 +116,16 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
onPressed: () { onPressed: () {
openscanner(); openscanner();
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
width: 100, width: 100,
child: Text( child: Text(
"Scan", "Scan",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -151,15 +152,16 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
MihAlertServices().formNotFilledCompletely(context); MihAlertServices().formNotFilledCompletely(context);
} }
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Update", "Update",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -200,10 +202,12 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
barrierDismissible: false, barrierDismissible: false,
builder: (context) { builder: (context) {
return MihPackageAlert( return MihPackageAlert(
alertColour: MzansiInnovationHub.of(context)!.theme.successColor(), alertColour: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
alertIcon: Icon( alertIcon: Icon(
Icons.favorite, Icons.favorite,
color: MzansiInnovationHub.of(context)!.theme.successColor(), color: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 100, size: 100,
), ),
alertTitle: "Add to Favourites", alertTitle: "Add to Favourites",
@@ -213,8 +217,8 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
"Are you sure you want to add this card to your favourites?", "Are you sure you want to add this card to your favourites?",
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
const SizedBox( const SizedBox(
@@ -233,14 +237,14 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
ctxt, ctxt,
); );
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Add", "Add",
style: TextStyle( style: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -259,10 +263,12 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
barrierDismissible: false, barrierDismissible: false,
builder: (context) { builder: (context) {
return MihPackageAlert( return MihPackageAlert(
alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), alertColour: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
alertIcon: Icon( alertIcon: Icon(
Icons.favorite_border, Icons.favorite_border,
color: MzansiInnovationHub.of(context)!.theme.errorColor(), color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
size: 100, size: 100,
), ),
alertTitle: "Remove From Favourites", alertTitle: "Remove From Favourites",
@@ -272,8 +278,8 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
"Are you sure you want to remove this card from your favourites?", "Are you sure you want to remove this card from your favourites?",
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
const SizedBox( const SizedBox(
@@ -292,14 +298,14 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
ctxt, ctxt,
); );
}, },
buttonColor: buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Remove", "Remove",
style: TextStyle( style: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -332,25 +338,26 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
child: widget.cardList[index].favourite == "" child: widget.cardList[index].favourite == ""
? Icon( ? Icon(
Icons.favorite, Icons.favorite,
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
) )
: Icon( : Icon(
Icons.favorite_border, Icons.favorite_border,
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
label: widget.cardList[index].favourite == "" label: widget.cardList[index].favourite == ""
? "Add to Favourite" ? "Add to Favourite"
: "Remove from Favourite", : "Remove from Favourite",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () { onTap: () {
if (widget.cardList[index].favourite == "") { if (widget.cardList[index].favourite == "") {
addToFavCardWindow(context, index); addToFavCardWindow(context, index);
@@ -362,17 +369,19 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
SpeedDialChild( SpeedDialChild(
child: Icon( child: Icon(
Icons.edit, Icons.edit,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
label: "Edit Card Details", label: "Edit Card Details",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () { onTap: () {
setState(() { setState(() {
_cardNumberController.text = widget.cardList[index].card_number; _cardNumberController.text = widget.cardList[index].card_number;
@@ -384,17 +393,19 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
SpeedDialChild( SpeedDialChild(
child: Icon( child: Icon(
Icons.delete, Icons.delete,
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
label: "Delete Card", label: "Delete Card",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.primaryColor(), color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () { onTap: () {
deleteCardWindow(context, index); deleteCardWindow(context, index);
}, },
@@ -432,7 +443,7 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
height: 75, height: 75,
// width: 300, // width: 300,
child: BarcodeWidget( child: BarcodeWidget(
//color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), //color: MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
barcode: Barcode.code128(), barcode: Barcode.code128(),
backgroundColor: Colors.white, backgroundColor: Colors.white,
data: widget.cardList[index].card_number, data: widget.cardList[index].card_number,
@@ -454,7 +465,7 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
color: Colors.black, color: Colors.black,
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold fontWeight: FontWeight.bold
//MzansiInnovationHub.of(context)!.theme.secondaryColor(), //MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
], ],
@@ -536,7 +547,8 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
Icon( Icon(
MihIcons.iDontKnow, MihIcons.iDontKnow,
size: 165, size: 165,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Text( Text(
@@ -546,8 +558,8 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
], ],
@@ -563,7 +575,8 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
Icon( Icon(
MihIcons.mzansiWallet, MihIcons.mzansiWallet,
size: 165, size: 165,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Text( Text(
@@ -573,8 +586,8 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
const SizedBox(height: 25), const SizedBox(height: 25),
@@ -585,9 +598,9 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
children: [ children: [
TextSpan(text: "Press "), TextSpan(text: "Press "),
@@ -596,9 +609,9 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
child: Icon( child: Icon(
Icons.menu, Icons.menu,
size: 20, size: 20,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
TextSpan(text: " to add your first loyalty card"), TextSpan(text: " to add your first loyalty card"),
@@ -620,7 +633,8 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
Icon( Icon(
MihIcons.mzansiWallet, MihIcons.mzansiWallet,
size: 165, size: 165,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Text( Text(
@@ -630,8 +644,8 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
const SizedBox(height: 25), const SizedBox(height: 25),
@@ -642,9 +656,9 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
children: [ children: [
TextSpan(text: "Press "), TextSpan(text: "Press "),
@@ -653,9 +667,9 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
child: Icon( child: Icon(
Icons.menu, Icons.menu,
size: 20, size: 20,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
TextSpan( TextSpan(

View File

@@ -1,9 +1,9 @@
import 'dart:async'; import 'dart:async';
import 'package:mzansi_innovation_hub/main.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mobile_scanner/mobile_scanner.dart'; import 'package:mobile_scanner/mobile_scanner.dart';
import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MihBarcodeScanner extends StatefulWidget { class MihBarcodeScanner extends StatefulWidget {
final TextEditingController cardNumberController; final TextEditingController cardNumberController;
@@ -105,9 +105,9 @@ class _MihBarcodeScannerState extends State<MihBarcodeScanner>
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all( border: Border.all(
width: 5, width: 5,
color: MzansiInnovationHub.of(context)! color: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
), ),
), ),
), ),
@@ -125,16 +125,17 @@ class _MihBarcodeScannerState extends State<MihBarcodeScanner>
_scannerController.stop(); _scannerController.stop();
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
buttonColor: buttonColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 100, width: 100,
height: 50, height: 50,
child: Text( child: Text(
"Cancel", "Cancel",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, 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/app_user.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MihWalletTile extends StatefulWidget { class MihWalletTile extends StatefulWidget {
final AppUser signedInUser; final AppUser signedInUser;
@@ -32,12 +33,15 @@ class _MihWalletTileState extends State<MihWalletTile> {
appName: "Mzansi Wallet", appName: "Mzansi Wallet",
appIcon: Icon( appIcon: Icon(
MihIcons.mzansiWallet, MihIcons.mzansiWallet,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// size: widget.packageSize, // size: widget.packageSize,
), ),
iconSize: widget.packageSize, iconSize: widget.packageSize,
primaryColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(), primaryColor: MihColors.getSecondaryColor(
secondaryColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
secondaryColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
} }
} }

View File

@@ -92,18 +92,18 @@ class _MihCardFavouritesState extends State<MihCardFavourites> {
// child: Icon( // child: Icon(
// Icons.add, // Icons.add,
// color: // color:
// MzansiInnovationHub.of(context)!.theme.primaryColor(), // MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ), // ),
// label: "Add Loyalty Card", // label: "Add Loyalty Card",
// labelBackgroundColor: // labelBackgroundColor:
// MzansiInnovationHub.of(context)!.theme.successColor(), // MihColors.getGreenColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// labelStyle: TextStyle( // labelStyle: TextStyle(
// color: // color:
// MzansiInnovationHub.of(context)!.theme.primaryColor(), // MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
// ), // ),
// backgroundColor: // backgroundColor:
// MzansiInnovationHub.of(context)!.theme.successColor(), // MihColors.getGreenColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// onTap: () { // onTap: () {
// // addCardWindow(context); // // addCardWindow(context);
// }, // },

View File

@@ -1,6 +1,7 @@
import 'package:flutter_speed_dial/flutter_speed_dial.dart'; import 'package:flutter_speed_dial/flutter_speed_dial.dart';
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_banner_ad.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_banner_ad.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_alert_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_wallet_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_wallet_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
@@ -187,10 +188,10 @@ class _MihCardsState extends State<MihCards> {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: _nicknameController, controller: _nicknameController,
multiLineInput: false, multiLineInput: false,
requiredText: false, requiredText: false,
@@ -204,12 +205,12 @@ class _MihCardsState extends State<MihCards> {
children: [ children: [
Flexible( Flexible(
child: MihTextFormField( child: MihTextFormField(
fillColor: MzansiInnovationHub.of(context)! fillColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
inputColor: MzansiInnovationHub.of(context)! inputColor: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
controller: cardNumberController, controller: cardNumberController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -225,16 +226,16 @@ class _MihCardsState extends State<MihCards> {
onPressed: () { onPressed: () {
openscanner(); openscanner();
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
width: 100, width: 100,
child: Text( child: Text(
"Scan", "Scan",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -272,15 +273,16 @@ class _MihCardsState extends State<MihCards> {
MihAlertServices().formNotFilledCompletely(context); MihAlertServices().formNotFilledCompletely(context);
} }
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Add", "Add",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -341,10 +343,10 @@ class _MihCardsState extends State<MihCards> {
hintText: "Search Cards", hintText: "Search Cards",
// prefixIcon: Icons.search, // prefixIcon: Icons.search,
prefixIcon: Icons.search, prefixIcon: Icons.search,
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
hintColor: hintColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onPrefixIconTap: () { onPrefixIconTap: () {
// print("Search Icon Pressed: ${cardSearchController.text}"); // print("Search Icon Pressed: ${cardSearchController.text}");
}, },
@@ -402,19 +404,19 @@ class _MihCardsState extends State<MihCards> {
SpeedDialChild( SpeedDialChild(
child: Icon( child: Icon(
Icons.add, Icons.add,
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
label: "Add Loyalty Card", label: "Add Loyalty Card",
labelBackgroundColor: labelBackgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
labelStyle: TextStyle( labelStyle: TextStyle(
color: color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
backgroundColor: backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onTap: () { onTap: () {
addCardWindow(context, width); addCardWindow(context, width);
}, },

View File

@@ -1,6 +1,6 @@
import 'dart:convert'; import 'dart:convert';
import 'package:mzansi_innovation_hub/main.dart'; 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_service_calls.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_service_calls.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_validation_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'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
@@ -218,9 +218,10 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
windowBody: Column( windowBody: Column(
children: [ children: [
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: idController, controller: idController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -232,9 +233,10 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
), ),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: fnameController, controller: fnameController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -246,9 +248,10 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
), ),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: lnameController, controller: lnameController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -260,9 +263,10 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
), ),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: accessStatusController, controller: accessStatusController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -283,16 +287,18 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
"Important Notice: Requesting Patient Profile Access", "Important Notice: Requesting Patient Profile Access",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
), ),
), ),
Text( Text(
"You are about to request access to a patient's profile. Please be aware of the following important points:", "You are about to request access to a patient's profile. Please be aware of the following important points:",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
), ),
), ),
SizedBox( SizedBox(
@@ -301,8 +307,9 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
"1. Permanent Access: Once the patient accepts your access request, it will become permanent.", "1. Permanent Access: Once the patient accepts your access request, it will become permanent.",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
), ),
), ),
), ),
@@ -312,8 +319,9 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
"2. Shared Information: Any updates you make to the patient's profile will be visible to others who have access to the profile.", "2. Shared Information: Any updates you make to the patient's profile will be visible to others who have access to the profile.",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
), ),
), ),
), ),
@@ -323,8 +331,9 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
"3. Irreversible Access: Once granted, you cannot revoke your access to the patient's profile.", "3. Irreversible Access: Once granted, you cannot revoke your access to the patient's profile.",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
), ),
), ),
), ),
@@ -332,8 +341,9 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
"By pressing the \"Request Access\" button you accept the above terms.\n", "By pressing the \"Request Access\" button you accept the above terms.\n",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
), ),
), ),
], ],
@@ -366,16 +376,16 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
noAccessWarning(); noAccessWarning();
} }
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.successColor(), "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"View Profile", "View Profile",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -402,16 +412,16 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
context, context,
); );
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.successColor(), "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Request Access", "Request Access",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -436,16 +446,16 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
context, context,
); );
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getGreenColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.successColor(), "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Re-apply", "Re-apply",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -486,7 +496,8 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
// "$firstLetterFName$fnameStar $firstLetterLName$lnameStar", // "$firstLetterFName$fnameStar $firstLetterLName$lnameStar",
"${widget.patients[index].first_name} ${widget.patients[index].last_name}", "${widget.patients[index].first_name} ${widget.patients[index].last_name}",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
const SizedBox( const SizedBox(
@@ -494,7 +505,8 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
), ),
Icon( Icon(
Icons.star_border_rounded, Icons.star_border_rounded,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
], ],
); );
@@ -503,7 +515,8 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
// "$firstLetterFName$fnameStar $firstLetterLName$lnameStar", // "$firstLetterFName$fnameStar $firstLetterLName$lnameStar",
"${widget.patients[index].first_name} ${widget.patients[index].last_name}", "${widget.patients[index].first_name} ${widget.patients[index].last_name}",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
); );
} }
@@ -520,7 +533,8 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
subtitle: Text( subtitle: Text(
"ID No.: $startedOutPatientIdNo\nMedical Aid No.: $medAidNoStar", "ID No.: $startedOutPatientIdNo\nMedical Aid No.: $medAidNoStar",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
onTap: () { onTap: () {
@@ -535,7 +549,8 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
}, },
trailing: Icon( trailing: Icon(
Icons.arrow_forward, Icons.arrow_forward,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
); );
} else { } else {
@@ -544,7 +559,8 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
subtitle: Text( subtitle: Text(
"ID No.: $startedOutPatientIdNo\nMedical Aid No.: $medAidNoStar", "ID No.: $startedOutPatientIdNo\nMedical Aid No.: $medAidNoStar",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
onTap: () { onTap: () {
@@ -558,7 +574,8 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
}, },
trailing: Icon( trailing: Icon(
Icons.add, Icons.add,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
); );
} }
@@ -582,7 +599,8 @@ class _BuildPatientsListState extends State<BuildMihPatientSearchList> {
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
separatorBuilder: (BuildContext context, index) { separatorBuilder: (BuildContext context, index) {
return Divider( return Divider(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}, },
itemCount: widget.patients.length, itemCount: widget.patients.length,

View File

@@ -1,4 +1,5 @@
import 'package:mzansi_innovation_hub/main.dart'; 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_alert_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_service_calls.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_service_calls.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_calendar_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_calendar_services.dart';
@@ -108,10 +109,10 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
formKey: _formKey, formKey: _formKey,
formFields: [ formFields: [
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: idController, controller: idController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -123,10 +124,10 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
), ),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: fnameController, controller: fnameController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -138,10 +139,10 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
), ),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: lnameController, controller: lnameController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -190,15 +191,16 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
MihAlertServices().formNotFilledCompletely(context); MihAlertServices().formNotFilledCompletely(context);
} }
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Book Appointment", "Book Appointment",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -269,10 +271,10 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
child: Column( child: Column(
children: [ children: [
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: idController, controller: idController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -284,10 +286,10 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
), ),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: fnameController, controller: fnameController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -299,10 +301,10 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
), ),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
MihTextFormField( MihTextFormField(
fillColor: fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: lnameController, controller: lnameController,
multiLineInput: false, multiLineInput: false,
requiredText: true, requiredText: true,
@@ -322,15 +324,16 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
onPressed: () { onPressed: () {
appointmentPopUp(index, width); appointmentPopUp(index, width);
}, },
buttonColor: buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.successColor(), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
width: 300, width: 300,
child: Text( child: Text(
"Book Appointment", "Book Appointment",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -348,16 +351,16 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
"business", "business",
)); ));
}, },
buttonColor: MzansiInnovationHub.of(context)! buttonColor: MihColors.getSecondaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.secondaryColor(), "Dark"),
width: 300, width: 300,
child: Text( child: Text(
"View Medical Records", "View Medical Records",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)! color: MihColors.getPrimaryColor(
.theme MzansiInnovationHub.of(context)!.theme.mode ==
.primaryColor(), "Dark"),
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@@ -387,29 +390,32 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
accessWithColour = TextSpan( accessWithColour = TextSpan(
text: "$access\n", text: "$access\n",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.successColor())); color: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark")));
} else if (access == "PENDING") { } else if (access == "PENDING") {
firstName = "${widget.patientAccesses[index].fname[0]}********"; firstName = "${widget.patientAccesses[index].fname[0]}********";
lastName = "${widget.patientAccesses[index].lname[0]}********"; lastName = "${widget.patientAccesses[index].lname[0]}********";
accessWithColour = TextSpan( accessWithColour = TextSpan(
text: "$access\n", text: "$access\n",
style: TextStyle( style: TextStyle(
color: color: MihColors.getGreyColor(
MzansiInnovationHub.of(context)!.theme.messageTextColor())); MzansiInnovationHub.of(context)!.theme.mode == "Dark")));
} else { } else {
firstName = "${widget.patientAccesses[index].fname[0]}********"; firstName = "${widget.patientAccesses[index].fname[0]}********";
lastName = "${widget.patientAccesses[index].lname[0]}********"; lastName = "${widget.patientAccesses[index].lname[0]}********";
accessWithColour = TextSpan( accessWithColour = TextSpan(
text: "$access\n", text: "$access\n",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.errorColor())); color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark")));
} }
return ListTile( return ListTile(
title: Text( title: Text(
"$firstName $lastName", "$firstName $lastName",
style: TextStyle( style: TextStyle(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
subtitle: RichText( subtitle: RichText(
@@ -438,7 +444,8 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
}, },
trailing: Icon( trailing: Icon(
Icons.arrow_forward, Icons.arrow_forward,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
); );
} }
@@ -461,7 +468,8 @@ class _BuildPatientsListState extends State<BuildMyPatientListList> {
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
separatorBuilder: (BuildContext context, index) { separatorBuilder: (BuildContext context, index) {
return Divider( return Divider(
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
}, },
itemCount: widget.patientAccesses.length, itemCount: widget.patientAccesses.length,

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_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class PatManagerTile extends StatefulWidget { class PatManagerTile extends StatefulWidget {
final PatManagerArguments arguments; final PatManagerArguments arguments;
@@ -30,12 +31,15 @@ class _PatManagerTileState extends State<PatManagerTile> {
appName: "Patient Manager", appName: "Patient Manager",
appIcon: Icon( appIcon: Icon(
MihIcons.patientManager, MihIcons.patientManager,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// size: widget.packageSize, // size: widget.packageSize,
), ),
iconSize: widget.packageSize, iconSize: widget.packageSize,
primaryColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(), primaryColor: MihColors.getSecondaryColor(
secondaryColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
secondaryColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
); );
} }
} }

View File

@@ -1,5 +1,6 @@
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.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_service_calls.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_service_calls.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_single_child_scroll.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
@@ -50,8 +51,10 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
controller: _mihPatientSearchController, controller: _mihPatientSearchController,
hintText: "Search Patient ID/ Aid No.", hintText: "Search Patient ID/ Aid No.",
prefixIcon: Icons.search, prefixIcon: Icons.search,
fillColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(), fillColor: MihColors.getSecondaryColor(
hintColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
hintColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onPrefixIconTap: () { onPrefixIconTap: () {
submitPatientSearch(); submitPatientSearch();
}, },
@@ -92,8 +95,9 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
"Error pulling Patients Data\n$baseUrl/patients/search/$_mihPatientSearchString", "Error pulling Patients Data\n$baseUrl/patients/search/$_mihPatientSearchString",
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
color: color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.errorColor()), MzansiInnovationHub.of(context)!.theme.mode ==
"Dark")),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
); );
@@ -133,7 +137,8 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
Icon( Icon(
MihIcons.iDontKnow, MihIcons.iDontKnow,
size: 165, size: 165,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Text( Text(
@@ -143,7 +148,8 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
], ],
@@ -159,7 +165,8 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
Icon( Icon(
MihIcons.patientProfile, MihIcons.patientProfile,
size: 165, size: 165,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Text( Text(
@@ -169,7 +176,8 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
style: TextStyle( style: TextStyle(
fontSize: 25, fontSize: 25,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(), color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
), ),
const SizedBox(height: 25), const SizedBox(height: 25),
@@ -180,8 +188,8 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.secondaryColor(), MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
), ),
children: [ children: [
TextSpan( TextSpan(
@@ -213,7 +221,7 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
// style: TextStyle( // style: TextStyle(
// fontSize: 25, // fontSize: 25,
// color: // color:
// MzansiInnovationHub.of(context)!.theme.messageTextColor()), // MihColors.getGreyColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark")),
// textAlign: TextAlign.center, // textAlign: TextAlign.center,
// ), // ),
// ), // ),

Some files were not shown because too many files have changed in this diff Show More