From b9c8441f9bb991f8881b315f16b84ee194edc3fe Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Thu, 6 Mar 2025 10:31:57 +0200 Subject: [PATCH 01/11] remove old package --- .../lib/mih_packages/about_mih/mih_about.dart | 700 ------------------ 1 file changed, 700 deletions(-) delete mode 100644 Frontend/lib/mih_packages/about_mih/mih_about.dart diff --git a/Frontend/lib/mih_packages/about_mih/mih_about.dart b/Frontend/lib/mih_packages/about_mih/mih_about.dart deleted file mode 100644 index 6ea1c3b5..00000000 --- a/Frontend/lib/mih_packages/about_mih/mih_about.dart +++ /dev/null @@ -1,700 +0,0 @@ -import 'package:Mzansi_Innovation_Hub/mih_components/mih_package/mih_app_window.dart'; -import 'package:Mzansi_Innovation_Hub/mih_objects/arguments.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; -import '../../mih_components/mih_inputs_and_buttons/mih_button.dart'; -import '../../mih_components/mih_layout/mih_action.dart'; -import '../../mih_components/mih_layout/mih_body.dart'; -import '../../mih_components/mih_layout/mih_header.dart'; -import '../../mih_components/mih_layout/mih_layout_builder.dart'; -import '../../mih_components/mih_layout/mih_tile.dart'; -import '../../main.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; -import "package:universal_html/js.dart" as js; -import 'package:url_launcher/url_launcher.dart'; -// import 'dart:io' show Platform; -// import 'dart:html' as html; - -class MIHAbout extends StatefulWidget { - const MIHAbout({ - super.key, - }); - - @override - State createState() => _MIHAboutState(); -} - -class _MIHAboutState extends State { - final Uri _tiktokUrl = - Uri.parse('https://www.tiktok.com/@mzansi.innovation.hub'); - final Uri _whatsappUrl = - Uri.parse('https://whatsapp.com/channel/0029Vax3INCIyPtMn8KgeM2F'); - - final Uri _threadsUrl = - Uri.parse('https://www.threads.net/@mzansi.innovation.hub'); - final Uri _instagramUrl = - Uri.parse('https://www.instagram.com/mzansi.innovation.hub'); - final Uri _youtubeUrl = - Uri.parse('https://www.youtube.com/@mzansiinnovationhub'); - final Uri _xUrl = Uri.parse('https://x.com/mzansi_inno_hub'); - final Uri _linkedinUrl = - Uri.parse('https://www.linkedin.com/company/mzansi-innovation-hub/'); - final Uri _facebookUrl = - Uri.parse('https://www.facebook.com/profile.php?id=61565345762136'); - - MIHAction getActionButton() { - return MIHAction( - icon: const Icon(Icons.arrow_back), - iconSize: 35, - onTap: () { - Navigator.of(context).pushNamedAndRemoveUntil( - '/', - arguments: AuthArguments(true, false), - (route) => false, - ); - }, - ); - } - - MIHHeader getHeader() { - return const MIHHeader( - headerAlignment: MainAxisAlignment.center, - headerItems: [ - Text( - "About", - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 25, - ), - ), - ], - ); - } - - MIHBody getBody() { - return MIHBody( - borderOn: false, - bodyItems: [ - SizedBox( - width: 165, - child: Image( - image: MzanziInnovationHub.of(context)!.theme.altLogoImage()), - ), - const SizedBox( - height: 10, - ), - const Text( - "Mzansi Innovation Hub", - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 30, - ), - ), - const Padding( - padding: EdgeInsets.symmetric(vertical: 10.0), - child: Divider(), - ), - // const SizedBox( - // height: 10, - // ), - Wrap( - alignment: WrapAlignment.start, - crossAxisAlignment: WrapCrossAlignment.start, - spacing: 10, - runSpacing: 10, - children: [ - ourVision(), - ourMission(), - ], - ), - const SizedBox( - height: 10, - ), - Wrap( - alignment: WrapAlignment.start, - crossAxisAlignment: WrapCrossAlignment.start, - spacing: 10, - runSpacing: 10, - children: [ - SizedBox( - width: 300, - height: 50, - child: MIHButton( - onTap: () { - installMihTrigger(); - }, - buttonText: "Install MIH", - buttonColor: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - textColor: - MzanziInnovationHub.of(context)!.theme.primaryColor(), - ), - ), - SizedBox( - width: 300, - height: 50, - child: MIHButton( - onTap: () { - launchSocialUrl( - Uri.parse( - "https://www.youtube.com/playlist?list=PLuT35kJIui0H5kXjxNOZlHoOPZbQLr4qh", - ), - ); - }, - buttonText: "MIH Beginners Guide", - buttonColor: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - textColor: - MzanziInnovationHub.of(context)!.theme.primaryColor(), - ), - ), - ]), - const SizedBox( - height: 10, - ), - const Padding( - padding: EdgeInsets.symmetric(vertical: 10.0), - child: Divider(), - ), - Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisSize: MainAxisSize.max, - // spacing: 10, - // runSpacing: 10, - children: [ - founderTitle(), - founderBio(), - ], - ), - const Padding( - padding: EdgeInsets.symmetric(vertical: 10.0), - child: Divider(), - ), - mihSocials(), - ], - ); - } - - void installMihTrigger() { - final isWebAndroid = - kIsWeb && (defaultTargetPlatform == TargetPlatform.android); - final isWebIos = kIsWeb && (defaultTargetPlatform == TargetPlatform.iOS); - - if (isWebAndroid) { - launchSocialUrl( - Uri.parse( - "https://play.google.com/store/apps/details?id=za.co.mzansiinnovationhub.mih", - ), - ); - } else if (isWebIos) { - //Show pop up for IOS - _showIOSInstallationGuide(); - } else if (MzanziInnovationHub.of(context)!.theme.getPlatform() == - "Android") { - //Installed Android App - // _showIOSInstallationGuide(); - launchSocialUrl( - Uri.parse( - "https://play.google.com/store/apps/details?id=za.co.mzansiinnovationhub.mih", - ), - ); - } else { - //Web - js.context.callMethod("presentAddToHome"); - } - } - - void _showIOSInstallationGuide() { - double windowFontSize = 17.0; - showDialog( - context: context, - barrierDismissible: false, - builder: (context) { - return MihAppWindow( - fullscreen: false, - windowTitle: "MIH Installation Guide (iOS)", - windowTools: const [], - onWindowTapClose: () { - Navigator.of(context).pop(); - }, - windowBody: [ - Align( - alignment: Alignment.centerLeft, - child: Text( - "In order to install MIH on your iPhone, please follow the below steps:- ", - textAlign: TextAlign.left, - style: TextStyle( - color: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - fontSize: windowFontSize, - fontWeight: FontWeight.bold, - ), - ), - ), - const SizedBox(height: 10), - Align( - alignment: Alignment.centerLeft, - child: Text( - "1. Launch MIH on Safari.", - textAlign: TextAlign.left, - style: TextStyle( - color: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - fontSize: windowFontSize, - fontWeight: FontWeight.bold, - ), - ), - ), - const SizedBox(height: 10), - Align( - alignment: Alignment.centerLeft, - child: Text( - "2. Tap the Share Button.", - textAlign: TextAlign.left, - style: TextStyle( - color: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - fontSize: windowFontSize, - fontWeight: FontWeight.bold, - ), - ), - ), - const SizedBox(height: 10), - Align( - alignment: Alignment.centerLeft, - child: Text( - "3. Scroll down and tap \"Add to Home Screen\".", - textAlign: TextAlign.left, - style: TextStyle( - color: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - fontSize: windowFontSize, - fontWeight: FontWeight.bold, - ), - ), - ), - const SizedBox(height: 10), - Align( - alignment: Alignment.centerLeft, - child: Text( - "4. Choose a name for the shortcut (Optional).", - textAlign: TextAlign.left, - style: TextStyle( - color: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - fontSize: windowFontSize, - fontWeight: FontWeight.bold, - ), - ), - ), - const SizedBox(height: 10), - Align( - alignment: Alignment.centerLeft, - child: Text( - "5. Tap \"Add\".", - textAlign: TextAlign.left, - style: TextStyle( - color: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - fontSize: windowFontSize, - fontWeight: FontWeight.bold, - ), - ), - ), - const SizedBox(height: 10), - Align( - alignment: Alignment.centerLeft, - child: Text( - "That's it! Now you can tap the MIH icon on your home screen to open it quickly.", - textAlign: TextAlign.left, - style: TextStyle( - color: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - fontSize: windowFontSize, - fontWeight: FontWeight.bold, - ), - ), - ), - const SizedBox(height: 10), - Align( - alignment: Alignment.centerLeft, - child: Text( - "If you are still having trouble, please click on the button below to view a video guide.", - textAlign: TextAlign.left, - style: TextStyle( - color: MzanziInnovationHub.of(context)!.theme.errorColor(), - fontSize: windowFontSize, - fontWeight: FontWeight.bold, - ), - ), - ), - const SizedBox(height: 15), - SizedBox( - width: 300, - height: 50, - child: MIHButton( - onTap: () { - launchSocialUrl( - Uri.parse( - "https://www.youtube.com/watch?v=KVK78IV28JY", - ), - ); - }, - buttonText: "Video Guide", - buttonColor: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - textColor: - MzanziInnovationHub.of(context)!.theme.primaryColor(), - ), - ), - ], - ); - }, - ); - } - - Widget founderBio() { - String bio = ""; - bio += "BSc Comnputer Science & Information Systems\n"; - bio += "(University of the Western Cap)\n"; - bio += - "6 Year of banking experience with one of the big 5 banks of South Africa."; - ImageProvider logoFrame = - MzanziInnovationHub.of(context)!.theme.altLogoFrame(); - return Wrap( - alignment: WrapAlignment.center, - crossAxisAlignment: WrapCrossAlignment.center, - spacing: 10, - runSpacing: 10, - children: [ - SizedBox( - width: 300, - child: Stack( - alignment: Alignment.center, - fit: StackFit.loose, - children: [ - CircleAvatar( - backgroundColor: - MzanziInnovationHub.of(context)!.theme.primaryColor(), - backgroundImage: const AssetImage("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'), - radius: 75, - ), - SizedBox( - width: 165, - child: Image(image: logoFrame), - ) - ], - ), - ), - SizedBox( - width: 400, - child: Text( - bio, - textAlign: TextAlign.center, - style: const TextStyle( - //fontWeight: FontWeight.bold, - fontSize: 15, - ), - ), - ), - const SizedBox( - height: 10, - ), - ], - ); - } - - Widget founderTitle() { - String heading = "Yasien Meth (Founder & CEO)"; - return Column( - children: [ - Text( - heading, - textAlign: TextAlign.center, - style: const TextStyle( - fontWeight: FontWeight.bold, - fontSize: 25, - ), - ), - const SizedBox( - height: 10, - ), - ], - ); - } - - Widget ourVision() { - String heading = "Our Vision"; - String vision = - "Digitizing Mzansi one process at a time. Discover essential Mzansi apps to streamline your personal and professional life. Simplify your daily tasks with our user-friendly solutions."; - - return SizedBox( - width: 500, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - mainAxisSize: MainAxisSize.max, - children: [ - Text( - heading, - textAlign: TextAlign.center, - style: const TextStyle( - fontWeight: FontWeight.bold, - fontSize: 25, - ), - ), - const SizedBox( - height: 10, - ), - Text( - vision, - textAlign: TextAlign.center, - style: const TextStyle( - //fontWeight: FontWeight.bold, - fontSize: 15, - ), - ), - ], - ), - ); - } - - Widget ourMission() { - String heading = "Our Mission"; - String mission = - "Bridge the digital divide in Mzansi, ensuring that everyone can benefit from the power of technology. We empower lives by providing simple, elegant solutions that elevate daily experiences. With our user-friendly approach, we're making the digital world accessible to all, ensuring no one is left behind in the digital revolution."; - - return SizedBox( - width: 500, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Text( - heading, - textAlign: TextAlign.center, - style: const TextStyle( - fontWeight: FontWeight.bold, - fontSize: 25, - ), - ), - const SizedBox( - height: 10, - ), - Text( - mission, - textAlign: TextAlign.center, - style: const TextStyle( - //fontWeight: FontWeight.bold, - fontSize: 15, - ), - ), - ], - ), - ); - } - - Widget mihSocials() { - String heading = "Follow Our Journey"; - return Column( - children: [ - Text( - heading, - textAlign: TextAlign.center, - style: const TextStyle( - fontWeight: FontWeight.bold, - fontSize: 25, - ), - ), - const SizedBox( - height: 10, - ), - SizedBox( - width: 500, - height: 450, - child: GridView.builder( - padding: const EdgeInsets.only( - // left: width / 10, - // right: width / 10, - // //bottom: height / 5, - // top: 20, - ), - physics: const NeverScrollableScrollPhysics(), - // shrinkWrap: true, - itemCount: getSocialsList().length, - gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent( - mainAxisSpacing: 15, maxCrossAxisExtent: 150), - itemBuilder: (context, index) { - return getSocialsList()[index]; - }, - ), - ), - ], - ); - } - - List getSocialsList() { - List socials = []; - socials.add(MIHTile( - onTap: () { - launchSocialUrl(_youtubeUrl); - }, - tileName: "YouTube", - tileIcon: Center( - child: FaIcon( - FontAwesomeIcons.youtube, - color: MzanziInnovationHub.of(context)!.theme.primaryColor(), - size: 175, - ), - ), - p: MzanziInnovationHub.of(context)!.theme.secondaryColor(), - s: MzanziInnovationHub.of(context)!.theme.primaryColor(), - )); - //================================================================== - socials.add(MIHTile( - onTap: () { - launchSocialUrl(_tiktokUrl); - }, - tileName: "TikTok", - tileIcon: Center( - child: FaIcon( - FontAwesomeIcons.tiktok, - color: MzanziInnovationHub.of(context)!.theme.primaryColor(), - size: 200, - ), - ), - p: MzanziInnovationHub.of(context)!.theme.secondaryColor(), - s: MzanziInnovationHub.of(context)!.theme.primaryColor(), - )); - //================================================================== - socials.add(MIHTile( - onTap: () { - launchSocialUrl(_threadsUrl); - }, - tileName: "Threads", - tileIcon: Center( - child: FaIcon( - FontAwesomeIcons.threads, - color: MzanziInnovationHub.of(context)!.theme.primaryColor(), - size: 200, - ), - ), - p: MzanziInnovationHub.of(context)!.theme.secondaryColor(), - s: MzanziInnovationHub.of(context)!.theme.primaryColor(), - )); - //================================================================== - socials.add(MIHTile( - onTap: () { - launchSocialUrl(_whatsappUrl); - }, - tileName: "Whatsapp", - tileIcon: Center( - child: FaIcon( - FontAwesomeIcons.whatsapp, - color: MzanziInnovationHub.of(context)!.theme.primaryColor(), - size: 200, - ), - ), - p: MzanziInnovationHub.of(context)!.theme.secondaryColor(), - s: MzanziInnovationHub.of(context)!.theme.primaryColor(), - )); - //================================================================== - socials.add(MIHTile( - onTap: () { - launchSocialUrl(_instagramUrl); - }, - tileName: "Instagram", - tileIcon: Center( - child: FaIcon( - FontAwesomeIcons.instagram, - color: MzanziInnovationHub.of(context)!.theme.primaryColor(), - size: 200, - ), - ), - p: MzanziInnovationHub.of(context)!.theme.secondaryColor(), - s: MzanziInnovationHub.of(context)!.theme.primaryColor(), - )); - //================================================================== - - socials.add(MIHTile( - onTap: () { - launchSocialUrl(_xUrl); - }, - tileName: "X", - tileIcon: Center( - child: FaIcon( - FontAwesomeIcons.xTwitter, - color: MzanziInnovationHub.of(context)!.theme.primaryColor(), - size: 200, - ), - ), - p: MzanziInnovationHub.of(context)!.theme.secondaryColor(), - s: MzanziInnovationHub.of(context)!.theme.primaryColor(), - )); - //================================================================== - socials.add(MIHTile( - onTap: () { - launchSocialUrl(_linkedinUrl); - }, - tileName: "LinkedIn", - tileIcon: Center( - child: FaIcon( - FontAwesomeIcons.linkedin, - color: MzanziInnovationHub.of(context)!.theme.primaryColor(), - size: 200, - ), - ), - p: MzanziInnovationHub.of(context)!.theme.secondaryColor(), - s: MzanziInnovationHub.of(context)!.theme.primaryColor(), - )); - //================================================================== - socials.add(MIHTile( - onTap: () { - launchSocialUrl(_facebookUrl); - }, - tileName: "FaceBook", - tileIcon: Center( - child: FaIcon( - FontAwesomeIcons.facebook, - color: MzanziInnovationHub.of(context)!.theme.primaryColor(), - size: 200, - ), - ), - p: MzanziInnovationHub.of(context)!.theme.secondaryColor(), - s: MzanziInnovationHub.of(context)!.theme.primaryColor(), - )); - //================================================================== - return socials; - } - - Future launchSocialUrl(Uri linkUrl) async { - if (!await launchUrl(linkUrl)) { - throw Exception('Could not launch $linkUrl'); - } - } - - @override - void dispose() { - super.dispose(); - } - - @override - void initState() { - super.initState(); - } - - @override - Widget build(BuildContext context) { - return MIHLayoutBuilder( - actionButton: getActionButton(), - secondaryActionButton: null, - header: getHeader(), - body: getBody(), - actionDrawer: null, - secondaryActionDrawer: null, - bottomNavBar: null, - pullDownToRefresh: false, - onPullDown: () async {}, - ); - } -} From 99245740bfd873c75c16db56f71ff648265c13bb Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Thu, 6 Mar 2025 10:32:31 +0200 Subject: [PATCH 02/11] delete old Privacy Policy and TOS package folder --- .../mih_policy_tos/mih_privacy_polocy.dart | 67 -- .../mih_policy_tos/mih_terms_of_service.dart | 67 -- .../mih_policy_tos/policy_and_terms_text.dart | 974 ------------------ 3 files changed, 1108 deletions(-) delete mode 100644 Frontend/lib/mih_packages/mih_policy_tos/mih_privacy_polocy.dart delete mode 100644 Frontend/lib/mih_packages/mih_policy_tos/mih_terms_of_service.dart delete mode 100644 Frontend/lib/mih_packages/mih_policy_tos/policy_and_terms_text.dart diff --git a/Frontend/lib/mih_packages/mih_policy_tos/mih_privacy_polocy.dart b/Frontend/lib/mih_packages/mih_policy_tos/mih_privacy_polocy.dart deleted file mode 100644 index 54996152..00000000 --- a/Frontend/lib/mih_packages/mih_policy_tos/mih_privacy_polocy.dart +++ /dev/null @@ -1,67 +0,0 @@ -import 'package:Mzansi_Innovation_Hub/mih_components/mih_layout/mih_action.dart'; -import 'package:Mzansi_Innovation_Hub/mih_components/mih_layout/mih_body.dart'; -import 'package:Mzansi_Innovation_Hub/mih_components/mih_layout/mih_header.dart'; -import 'package:Mzansi_Innovation_Hub/mih_components/mih_layout/mih_layout_builder.dart'; -import 'package:Mzansi_Innovation_Hub/mih_objects/arguments.dart'; -import 'package:Mzansi_Innovation_Hub/mih_packages/mih_policy_tos/policy_and_terms_text.dart'; -import 'package:flutter/material.dart'; - -class MIHPrivacyPolocy extends StatefulWidget { - const MIHPrivacyPolocy({super.key}); - - @override - State createState() => _MIHPrivacyPolocyState(); -} - -class _MIHPrivacyPolocyState extends State { - MIHAction getActionButton() { - return MIHAction( - icon: const Icon(Icons.arrow_back), - iconSize: 35, - onTap: () { - Navigator.of(context).pushNamedAndRemoveUntil( - '/', - arguments: AuthArguments(true, false), - (route) => false, - ); - }, - ); - } - - MIHHeader getHeader() { - return const MIHHeader( - headerAlignment: MainAxisAlignment.center, - headerItems: [ - Text( - "Privacy Policy", - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 25, - ), - ), - ], - ); - } - - MIHBody getBody() { - return MIHBody( - borderOn: false, - bodyItems: PolicyAndTermsText().getPrivacyPolicyText(context), - ); - } - - @override - Widget build(BuildContext context) { - return MIHLayoutBuilder( - actionButton: getActionButton(), - header: getHeader(), - secondaryActionButton: null, - body: getBody(), - actionDrawer: null, - secondaryActionDrawer: null, - bottomNavBar: null, - pullDownToRefresh: false, - onPullDown: () async {}, - ); - } -} diff --git a/Frontend/lib/mih_packages/mih_policy_tos/mih_terms_of_service.dart b/Frontend/lib/mih_packages/mih_policy_tos/mih_terms_of_service.dart deleted file mode 100644 index 3c914ad5..00000000 --- a/Frontend/lib/mih_packages/mih_policy_tos/mih_terms_of_service.dart +++ /dev/null @@ -1,67 +0,0 @@ -import 'package:Mzansi_Innovation_Hub/mih_components/mih_layout/mih_action.dart'; -import 'package:Mzansi_Innovation_Hub/mih_components/mih_layout/mih_body.dart'; -import 'package:Mzansi_Innovation_Hub/mih_components/mih_layout/mih_header.dart'; -import 'package:Mzansi_Innovation_Hub/mih_components/mih_layout/mih_layout_builder.dart'; -import 'package:Mzansi_Innovation_Hub/mih_objects/arguments.dart'; -import 'package:Mzansi_Innovation_Hub/mih_packages/mih_policy_tos/policy_and_terms_text.dart'; -import 'package:flutter/material.dart'; - -class MIHTermsOfService extends StatefulWidget { - const MIHTermsOfService({super.key}); - - @override - State createState() => _MIHTermsOfServiceState(); -} - -class _MIHTermsOfServiceState extends State { - MIHAction getActionButton() { - return MIHAction( - icon: const Icon(Icons.arrow_back), - iconSize: 35, - onTap: () { - Navigator.of(context).pushNamedAndRemoveUntil( - '/', - arguments: AuthArguments(true, false), - (route) => false, - ); - }, - ); - } - - MIHHeader getHeader() { - return const MIHHeader( - headerAlignment: MainAxisAlignment.center, - headerItems: [ - Text( - "Terms of Service", - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 25, - ), - ), - ], - ); - } - - MIHBody getBody() { - return MIHBody( - borderOn: false, - bodyItems: PolicyAndTermsText().getTermsOfServiceText(context), - ); - } - - @override - Widget build(BuildContext context) { - return MIHLayoutBuilder( - actionButton: getActionButton(), - header: getHeader(), - secondaryActionButton: null, - body: getBody(), - actionDrawer: null, - secondaryActionDrawer: null, - bottomNavBar: null, - pullDownToRefresh: false, - onPullDown: () async {}, - ); - } -} diff --git a/Frontend/lib/mih_packages/mih_policy_tos/policy_and_terms_text.dart b/Frontend/lib/mih_packages/mih_policy_tos/policy_and_terms_text.dart deleted file mode 100644 index 904d0825..00000000 --- a/Frontend/lib/mih_packages/mih_policy_tos/policy_and_terms_text.dart +++ /dev/null @@ -1,974 +0,0 @@ -import 'package:Mzansi_Innovation_Hub/main.dart'; -import 'package:flutter/material.dart'; - -class PolicyAndTermsText { - List getPrivacyPolicyText(BuildContext context) { - String effectDate = "6 December 2024"; - String intro = - "Mzansi Innovation Hub - MIH (\"we,\" \"our,\" \"us\") values your privacy and is committed to protecting your personal data. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our app, Mzansi Innovation Hub - MIH, available globally."; - String infoCollect = - "We collect the following personal information to provide and improve our services:\n• Personal Details: Name, ID, address, phone number etc.\n• Medical Information: Medical aid details (if applicable).\n• Loyalty Card Information: Loyalty card numbers for the Mzansi Wallet feature."; - String useInfo = - "Your personal information is used for the following purposes:\n• To create and manage your account.\n• To facilitate interactions between clients and businesses.\n• To enable the storage of loyalty card information within the Mzansi Wallet.\n• To provide technical support and improve our app's functionality."; - String dataShare = - "We only share your data under the following conditions:\n• With Your Consent: Businesses can access your information only with your explicit permission.\n• Legal Obligations: We may disclose information to comply with applicable laws or regulations."; - String dataSec = - "We implement advanced security measures to protect your personal data:\n• Data encryption during transmission.\n• Secure authentication protocols to prevent unauthorized access.\n• Regular audits to identify and address vulnerabilities."; - - String yourRights = - "You have the following rights regarding your personal data:\n• Access and Correction: View and update your information via your account settings.\n• Data Deletion: Request the deletion of your account and associated data.\n• Withdrawal of Consent: Revoke permissions for businesses to access your data is restricted once granted.\n• To exercise these rights, contact us at mzansi.innovation.hub@gmail.com."; - String dataRet = - "We retain your personal data for as long as necessary to provide our services. Upon account deletion, your data will be permanently removed unless required by law to retain certain records."; - String policyChanges = - "We may update this Privacy Policy to reflect changes in our practices or legal requirements. We will notify you of significant updates via in app notifications and/ or email."; - String contactUs = - "If you have questions or concerns about this Privacy Policy, please contact us:\n• Email: mzansi.innovation.hub@gmail.com\n• Phone: +27 655 530 195\n"; - return [ - SizedBox( - width: 165, - child: - Image(image: MzanziInnovationHub.of(context)!.theme.altLogoImage()), - ), - const SizedBox( - height: 10, - ), - //=============== Effective Date =============== - SizedBox( - width: 1250, - child: Row( - children: [ - const Text( - "Effective Date: ", - textAlign: TextAlign.center, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 15, - ), - ), - Text( - effectDate, - textAlign: TextAlign.center, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== Introduction =============== - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - intro, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 1. Information We Collect =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "1. Information We Collect", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - infoCollect, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 2. How We Use Your Information =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "2. How We Use Your Information", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - useInfo, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 3. Data Sharing =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "3. Data Sharing", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - dataShare, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 4. Data Security =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "4. Data Security", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - dataSec, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 5. Your Rights =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "5. Your Rights", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - yourRights, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 6. Data Retention =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "6. Data Retention", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - dataRet, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 7. Changes to This Privacy Policy =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "7. Changes to This Privacy Policy", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - policyChanges, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 8. Contact Us =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "8. Contact Us", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - contactUs, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - ]; - } - - List getTermsOfServiceText(BuildContext context) { - String effectDate = "6 December 2024"; - String intro = - "Welcome to Mzansi Innovation Hub (MIH)! These Terms of Service (\"Terms\") govern your access to and use of our application and services (\"Services\"). By accessing or using Mzansi Innovation Hub (MIH), you agree to these Terms."; - String acceptTerms = - "By creating an account or using the app, you agree to be bound by these Terms. If you do not agree, please do not use the Services."; - String eligib = - "You must be at least 18 years old or the age of majority in your jurisdiction to use this app. By using the app, you represent and warrant that you meet these eligibility requirements."; - String yourResponse = - "• Account Security: You are responsible for maintaining the confidentiality of your login credentials.\n• Accurate Information: Ensure that all data you provide is accurate and up to date.\n• Prohibited Uses:\n\t\t• Do not use the app for unlawful purposes.\n\t\t• Do not engage in activities that could harm the app or its users, such as hacking, data scraping, or introducing malware."; - String ourServ = - "• We provide tools to help businesses and clients interact, including a patient manager and the Mzansi Wallet etc.\n• We do not guarantee uninterrupted or error-free services, though we strive to maintain high reliability."; - - String dataCol = - "Your use of the app is subject to our Privacy Policy, which explains how we collect, use, and protect your data. By using the app, you consent to these practices."; - String userContent = - "• Ownership: Any content you submit to the app (e.g., loyalty card data, client profiles) remains your property.\n• License: By using the app, you grant us a non-exclusive license to use your content solely to operate the app and provide services."; - String intelProp = - "• All rights to the app, including designs, code, and trademarks, belong to Mzansi Innovation Hub.\n• Users may not copy, distribute, or reverse-engineer any part of the app."; - String termUse = - "We reserve the right to suspend or terminate your account for violations of these Terms or if required by law."; - String disclaimerWarens = - "The app and services are provided \"as is\" without warranties of any kind, whether express or implied. We do not guarantee that the app will meet your expectations or requirements."; - String limitLiability = - "To the maximum extent permitted by law, we are not liable for:\n• Indirect, incidental, or consequential damages arising from the use or inability to use the app.\n• Loss of data, revenue, or profits."; - String modifyTerms = - "We may update these Terms periodically. Continued use of the app after changes are posted constitutes your acceptance of the new Terms."; - String governLaw = - "These Terms are governed by the laws of South Africa. Any disputes will be resolved in courts located in South Africa."; - String contactUs = - "If you have questions about these Terms, please contact us:\n• Email: mzansi.innovation.hub@gmail.com\n• Phone: +27 655 530 195\n"; - return [ - SizedBox( - width: 165, - child: - Image(image: MzanziInnovationHub.of(context)!.theme.altLogoImage()), - ), - const SizedBox( - height: 10, - ), - //=============== Effective Date =============== - SizedBox( - width: 1250, - child: Row( - children: [ - const Text( - "Effective Date: ", - textAlign: TextAlign.center, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 15, - ), - ), - Text( - effectDate, - textAlign: TextAlign.center, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== Introduction =============== - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - intro, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 1. Acceptance of Terms =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "1. Acceptance of Terms", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - acceptTerms, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 2. Eligibility =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "2. Eligibility", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - eligib, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 3. Your Responsibilities =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "3. Your Responsibilities", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - yourResponse, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 4. Data Security =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "4. Our Services", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - ourServ, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 5. Data Collection and Privacy =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "5. Data Collection and Privacy", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - dataCol, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 6. User-Generated Content =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "6. User-Generated Content", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - userContent, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 7. Intellectual Property =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "7. Intellectual Property", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - intelProp, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 8. Termination of Use =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "8. Termination of Use", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - termUse, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 9. Disclaimer of Warranties =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "9. Disclaimer of Warranties", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - disclaimerWarens, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 10. Limitation of Liability =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "10. Limitation of Liability", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - limitLiability, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 11. Modifications to Terms =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "11. Modifications to Terms", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - modifyTerms, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 12. Governing Law =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "12. Governing Law", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - governLaw, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - //=============== 13. Contact Information =============== - const SizedBox( - width: 1250, - child: Row( - // crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - "13. Contact Information", - textAlign: TextAlign.start, - softWrap: true, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ], - ), - ), - SizedBox( - width: 1250, - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.start, - children: [ - Text( - contactUs, - textAlign: TextAlign.start, - softWrap: true, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 15, - ), - ), - ], - ), - ), - const SizedBox( - height: 10, - ), - ]; - } -} From 564eae50df10ff99a4c8b9021a0fee133caafbc5 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Thu, 6 Mar 2025 10:33:09 +0200 Subject: [PATCH 03/11] update router to point to new about MIH package --- Frontend/lib/mih_router/routeGenerator.dart | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Frontend/lib/mih_router/routeGenerator.dart b/Frontend/lib/mih_router/routeGenerator.dart index e69e8450..bb9b2fb0 100644 --- a/Frontend/lib/mih_router/routeGenerator.dart +++ b/Frontend/lib/mih_router/routeGenerator.dart @@ -1,8 +1,9 @@ import 'package:Mzansi_Innovation_Hub/mih_components/mih_package/test/package_test.dart'; +import 'package:Mzansi_Innovation_Hub/mih_packages/about_mih/about_mih.dart'; +import 'package:Mzansi_Innovation_Hub/mih_packages/about_mih/mih_policy_tos_ext/mih_privacy_polocy_external.dart'; +import 'package:Mzansi_Innovation_Hub/mih_packages/about_mih/mih_policy_tos_ext/mih_terms_of_service_external.dart'; import 'package:Mzansi_Innovation_Hub/mih_packages/calendar/mzansi_calendar.dart'; import 'package:Mzansi_Innovation_Hub/mih_packages/calculator/mih_calculator.dart'; -import 'package:Mzansi_Innovation_Hub/mih_packages/mih_policy_tos/mih_privacy_polocy.dart'; -import 'package:Mzansi_Innovation_Hub/mih_packages/mih_policy_tos/mih_terms_of_service.dart'; import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_ai/mzansi_ai.dart'; import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_wallet/mih_barcode_scanner.dart'; import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_wallet/mzansi_wallet.dart'; @@ -17,7 +18,7 @@ import '../mih_packages/patient_profile/patient_edit.dart'; // import '../mih_packages/patient_profile/patient_manager.dart'; import '../mih_objects/app_user.dart'; import '../mih_objects/arguments.dart'; -import '../mih_packages/about_mih/mih_about.dart'; +// import '../mih_packages/about_mih/mih_about.dart'; import '../mih_packages/authentication/forgot_password.dart'; import '../mih_packages/authentication/reset_password.dart'; import '../mih_packages/patient_profile/full_screen_file.dart'; @@ -46,13 +47,15 @@ class RouteGenerator { //Privacy Policy case '/privacy-policy': return MaterialPageRoute( - settings: settings, builder: (_) => const MIHPrivacyPolocy()); + settings: settings, + builder: (_) => const MIHPrivacyPolocyExternal()); //=============================================================== //Terms Of Service case '/terms-of-service': return MaterialPageRoute( - settings: settings, builder: (_) => const MIHTermsOfService()); + settings: settings, + builder: (_) => const MIHTermsOfServiceExternal()); //=============================================================== default: // Internal Navigation @@ -88,19 +91,21 @@ class RouteGenerator { //About MIH case '/about': return MaterialPageRoute( - settings: settings, builder: (_) => const MIHAbout()); + settings: settings, builder: (_) => const AboutMih()); //=============================================================== //Privacy Policy case '/privacy-policy': return MaterialPageRoute( - settings: settings, builder: (_) => const MIHPrivacyPolocy()); + settings: settings, + builder: (_) => const MIHPrivacyPolocyExternal()); //=============================================================== //Terms Of Service case '/terms-of-service': return MaterialPageRoute( - settings: settings, builder: (_) => const MIHTermsOfService()); + settings: settings, + builder: (_) => const MIHTermsOfServiceExternal()); //=============================================================== //User Profile From 78f5dede61fecc8a9e234c75e195771d4e171a21 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Thu, 6 Mar 2025 10:33:31 +0200 Subject: [PATCH 04/11] new About MIH Package start --- .../lib/mih_packages/about_mih/about_mih.dart | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Frontend/lib/mih_packages/about_mih/about_mih.dart diff --git a/Frontend/lib/mih_packages/about_mih/about_mih.dart b/Frontend/lib/mih_packages/about_mih/about_mih.dart new file mode 100644 index 00000000..8f61b90e --- /dev/null +++ b/Frontend/lib/mih_packages/about_mih/about_mih.dart @@ -0,0 +1,77 @@ +import 'package:Mzansi_Innovation_Hub/mih_components/mih_package/mih_app.dart'; +import 'package:Mzansi_Innovation_Hub/mih_components/mih_package/mih_app_action.dart'; +import 'package:Mzansi_Innovation_Hub/mih_components/mih_package/mih_app_tools.dart'; +import 'package:Mzansi_Innovation_Hub/mih_packages/about_mih/app_tools/mih_info.dart'; +import 'package:Mzansi_Innovation_Hub/mih_packages/about_mih/app_tools/mih_privacy_policy.dart'; +import 'package:Mzansi_Innovation_Hub/mih_packages/about_mih/app_tools/mih_terms_of_service.dart'; +import 'package:flutter/material.dart'; + +class AboutMih extends StatefulWidget { + const AboutMih({super.key}); + + @override + State createState() => _AboutMihState(); +} + +class _AboutMihState extends State { + int _selcetedIndex = 0; + + @override + Widget build(BuildContext context) { + return MihApp( + appActionButton: getAction(), + appTools: getTools(), + appBody: getToolBody(), + selectedbodyIndex: _selcetedIndex, + onIndexChange: (newValue) { + setState(() { + _selcetedIndex = newValue; + }); + print("Index: $_selcetedIndex"); + }, + ); + } + + MihAppAction getAction() { + return MihAppAction( + icon: const Icon(Icons.arrow_back), + iconSize: 35, + onTap: () { + Navigator.of(context).pop(); + }, + ); + } + + MihAppTools getTools() { + Map temp = {}; + temp[const Icon(Icons.info)] = () { + setState(() { + _selcetedIndex = 0; + }); + }; + temp[const Icon(Icons.policy)] = () { + setState(() { + _selcetedIndex = 1; + }); + }; + temp[const Icon(Icons.design_services)] = () { + setState(() { + _selcetedIndex = 2; + }); + }; + + return MihAppTools( + tools: temp, + selcetedIndex: _selcetedIndex, + ); + } + + List getToolBody() { + List toolBodies = [ + const MihInfo(), + const MihPrivacyPolicy(), + const MIHTermsOfService(), + ]; + return toolBodies; + } +} From ed99e7ccf67adbcc65181d8d12d2f39ae024e3f8 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Thu, 6 Mar 2025 10:34:40 +0200 Subject: [PATCH 05/11] Add external pages for PP & TOS --- .../mih_privacy_polocy_external.dart | 60 +++++++++++++++++++ .../mih_terms_of_service_external.dart | 60 +++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 Frontend/lib/mih_packages/about_mih/mih_policy_tos_ext/mih_privacy_polocy_external.dart create mode 100644 Frontend/lib/mih_packages/about_mih/mih_policy_tos_ext/mih_terms_of_service_external.dart diff --git a/Frontend/lib/mih_packages/about_mih/mih_policy_tos_ext/mih_privacy_polocy_external.dart b/Frontend/lib/mih_packages/about_mih/mih_policy_tos_ext/mih_privacy_polocy_external.dart new file mode 100644 index 00000000..3a9a9d44 --- /dev/null +++ b/Frontend/lib/mih_packages/about_mih/mih_policy_tos_ext/mih_privacy_polocy_external.dart @@ -0,0 +1,60 @@ +import 'package:Mzansi_Innovation_Hub/mih_components/mih_layout/mih_action.dart'; +import 'package:Mzansi_Innovation_Hub/mih_components/mih_layout/mih_body.dart'; +import 'package:Mzansi_Innovation_Hub/mih_components/mih_layout/mih_header.dart'; +import 'package:Mzansi_Innovation_Hub/mih_components/mih_layout/mih_layout_builder.dart'; +import 'package:Mzansi_Innovation_Hub/mih_objects/arguments.dart'; +import 'package:Mzansi_Innovation_Hub/mih_packages/about_mih/mih_policy_tos_ext/policy_and_terms_text.dart'; +import 'package:flutter/material.dart'; + +class MIHPrivacyPolocyExternal extends StatefulWidget { + const MIHPrivacyPolocyExternal({super.key}); + + @override + State createState() => + _MIHPrivacyPolocyExternalState(); +} + +class _MIHPrivacyPolocyExternalState extends State { + MIHAction getActionButton() { + return MIHAction( + icon: const Icon(Icons.arrow_back), + iconSize: 35, + onTap: () { + Navigator.of(context).pushNamedAndRemoveUntil( + '/', + arguments: AuthArguments(true, false), + (route) => false, + ); + }, + ); + } + + MIHHeader getHeader() { + return const MIHHeader( + headerAlignment: MainAxisAlignment.center, + headerItems: [], + ); + } + + MIHBody getBody() { + return MIHBody( + borderOn: false, + bodyItems: PolicyAndTermsText().getPrivacyPolicyText(context), + ); + } + + @override + Widget build(BuildContext context) { + return MIHLayoutBuilder( + actionButton: getActionButton(), + header: getHeader(), + secondaryActionButton: null, + body: getBody(), + actionDrawer: null, + secondaryActionDrawer: null, + bottomNavBar: null, + pullDownToRefresh: false, + onPullDown: () async {}, + ); + } +} diff --git a/Frontend/lib/mih_packages/about_mih/mih_policy_tos_ext/mih_terms_of_service_external.dart b/Frontend/lib/mih_packages/about_mih/mih_policy_tos_ext/mih_terms_of_service_external.dart new file mode 100644 index 00000000..c562e18c --- /dev/null +++ b/Frontend/lib/mih_packages/about_mih/mih_policy_tos_ext/mih_terms_of_service_external.dart @@ -0,0 +1,60 @@ +import 'package:Mzansi_Innovation_Hub/mih_components/mih_layout/mih_action.dart'; +import 'package:Mzansi_Innovation_Hub/mih_components/mih_layout/mih_body.dart'; +import 'package:Mzansi_Innovation_Hub/mih_components/mih_layout/mih_header.dart'; +import 'package:Mzansi_Innovation_Hub/mih_components/mih_layout/mih_layout_builder.dart'; +import 'package:Mzansi_Innovation_Hub/mih_objects/arguments.dart'; +import 'package:Mzansi_Innovation_Hub/mih_packages/about_mih/mih_policy_tos_ext/policy_and_terms_text.dart'; +import 'package:flutter/material.dart'; + +class MIHTermsOfServiceExternal extends StatefulWidget { + const MIHTermsOfServiceExternal({super.key}); + + @override + State createState() => + _MIHTermsOfServiceExternalState(); +} + +class _MIHTermsOfServiceExternalState extends State { + MIHAction getActionButton() { + return MIHAction( + icon: const Icon(Icons.arrow_back), + iconSize: 35, + onTap: () { + Navigator.of(context).pushNamedAndRemoveUntil( + '/', + arguments: AuthArguments(true, false), + (route) => false, + ); + }, + ); + } + + MIHHeader getHeader() { + return const MIHHeader( + headerAlignment: MainAxisAlignment.center, + headerItems: [], + ); + } + + MIHBody getBody() { + return MIHBody( + borderOn: false, + bodyItems: PolicyAndTermsText().getTermsOfServiceText(context), + ); + } + + @override + Widget build(BuildContext context) { + return MIHLayoutBuilder( + actionButton: getActionButton(), + header: getHeader(), + secondaryActionButton: null, + body: getBody(), + actionDrawer: null, + secondaryActionDrawer: null, + bottomNavBar: null, + pullDownToRefresh: false, + onPullDown: () async {}, + ); + } +} From a84f21accc27a7714b1bc7ce328eaafa4ee38a88 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Thu, 6 Mar 2025 10:35:03 +0200 Subject: [PATCH 06/11] Update PP & TOS to show heading --- .../policy_and_terms_text.dart | 994 ++++++++++++++++++ 1 file changed, 994 insertions(+) create mode 100644 Frontend/lib/mih_packages/about_mih/mih_policy_tos_ext/policy_and_terms_text.dart diff --git a/Frontend/lib/mih_packages/about_mih/mih_policy_tos_ext/policy_and_terms_text.dart b/Frontend/lib/mih_packages/about_mih/mih_policy_tos_ext/policy_and_terms_text.dart new file mode 100644 index 00000000..7065937c --- /dev/null +++ b/Frontend/lib/mih_packages/about_mih/mih_policy_tos_ext/policy_and_terms_text.dart @@ -0,0 +1,994 @@ +import 'package:Mzansi_Innovation_Hub/main.dart'; +import 'package:flutter/material.dart'; + +class PolicyAndTermsText { + List getPrivacyPolicyText(BuildContext context) { + String effectDate = "6 December 2024"; + String intro = + "Mzansi Innovation Hub - MIH (\"we,\" \"our,\" \"us\") values your privacy and is committed to protecting your personal data. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our app, Mzansi Innovation Hub - MIH, available globally."; + String infoCollect = + "We collect the following personal information to provide and improve our services:\n• Personal Details: Name, ID, address, phone number etc.\n• Medical Information: Medical aid details (if applicable).\n• Loyalty Card Information: Loyalty card numbers for the Mzansi Wallet feature."; + String useInfo = + "Your personal information is used for the following purposes:\n• To create and manage your account.\n• To facilitate interactions between clients and businesses.\n• To enable the storage of loyalty card information within the Mzansi Wallet.\n• To provide technical support and improve our app's functionality."; + String dataShare = + "We only share your data under the following conditions:\n• With Your Consent: Businesses can access your information only with your explicit permission.\n• Legal Obligations: We may disclose information to comply with applicable laws or regulations."; + String dataSec = + "We implement advanced security measures to protect your personal data:\n• Data encryption during transmission.\n• Secure authentication protocols to prevent unauthorized access.\n• Regular audits to identify and address vulnerabilities."; + + String yourRights = + "You have the following rights regarding your personal data:\n• Access and Correction: View and update your information via your account settings.\n• Data Deletion: Request the deletion of your account and associated data.\n• Withdrawal of Consent: Revoke permissions for businesses to access your data is restricted once granted.\n• To exercise these rights, contact us at mzansi.innovation.hub@gmail.com."; + String dataRet = + "We retain your personal data for as long as necessary to provide our services. Upon account deletion, your data will be permanently removed unless required by law to retain certain records."; + String policyChanges = + "We may update this Privacy Policy to reflect changes in our practices or legal requirements. We will notify you of significant updates via in app notifications and/ or email."; + String contactUs = + "If you have questions or concerns about this Privacy Policy, please contact us:\n• Email: mzansi.innovation.hub@gmail.com\n• Phone: +27 655 530 195\n"; + return [ + SizedBox( + width: 165, + child: + Image(image: MzanziInnovationHub.of(context)!.theme.altLogoImage()), + ), + const SizedBox(height: 10), + const Text( + "Privacy Policy", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 30, + ), + ), + const Padding( + padding: EdgeInsets.symmetric(vertical: 10.0), + child: Divider(), + ), + //=============== Effective Date =============== + SizedBox( + width: 1250, + child: Row( + children: [ + const Text( + "Effective Date: ", + textAlign: TextAlign.center, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 15, + ), + ), + Text( + effectDate, + textAlign: TextAlign.center, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== Introduction =============== + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + intro, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 1. Information We Collect =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "1. Information We Collect", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + infoCollect, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 2. How We Use Your Information =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "2. How We Use Your Information", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + useInfo, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 3. Data Sharing =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "3. Data Sharing", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + dataShare, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 4. Data Security =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "4. Data Security", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + dataSec, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 5. Your Rights =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "5. Your Rights", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + yourRights, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 6. Data Retention =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "6. Data Retention", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + dataRet, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 7. Changes to This Privacy Policy =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "7. Changes to This Privacy Policy", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + policyChanges, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 8. Contact Us =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "8. Contact Us", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + contactUs, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + ]; + } + + List getTermsOfServiceText(BuildContext context) { + String effectDate = "6 December 2024"; + String intro = + "Welcome to Mzansi Innovation Hub (MIH)! These Terms of Service (\"Terms\") govern your access to and use of our application and services (\"Services\"). By accessing or using Mzansi Innovation Hub (MIH), you agree to these Terms."; + String acceptTerms = + "By creating an account or using the app, you agree to be bound by these Terms. If you do not agree, please do not use the Services."; + String eligib = + "You must be at least 18 years old or the age of majority in your jurisdiction to use this app. By using the app, you represent and warrant that you meet these eligibility requirements."; + String yourResponse = + "• Account Security: You are responsible for maintaining the confidentiality of your login credentials.\n• Accurate Information: Ensure that all data you provide is accurate and up to date.\n• Prohibited Uses:\n\t\t• Do not use the app for unlawful purposes.\n\t\t• Do not engage in activities that could harm the app or its users, such as hacking, data scraping, or introducing malware."; + String ourServ = + "• We provide tools to help businesses and clients interact, including a patient manager and the Mzansi Wallet etc.\n• We do not guarantee uninterrupted or error-free services, though we strive to maintain high reliability."; + + String dataCol = + "Your use of the app is subject to our Privacy Policy, which explains how we collect, use, and protect your data. By using the app, you consent to these practices."; + String userContent = + "• Ownership: Any content you submit to the app (e.g., loyalty card data, client profiles) remains your property.\n• License: By using the app, you grant us a non-exclusive license to use your content solely to operate the app and provide services."; + String intelProp = + "• All rights to the app, including designs, code, and trademarks, belong to Mzansi Innovation Hub.\n• Users may not copy, distribute, or reverse-engineer any part of the app."; + String termUse = + "We reserve the right to suspend or terminate your account for violations of these Terms or if required by law."; + String disclaimerWarens = + "The app and services are provided \"as is\" without warranties of any kind, whether express or implied. We do not guarantee that the app will meet your expectations or requirements."; + String limitLiability = + "To the maximum extent permitted by law, we are not liable for:\n• Indirect, incidental, or consequential damages arising from the use or inability to use the app.\n• Loss of data, revenue, or profits."; + String modifyTerms = + "We may update these Terms periodically. Continued use of the app after changes are posted constitutes your acceptance of the new Terms."; + String governLaw = + "These Terms are governed by the laws of South Africa. Any disputes will be resolved in courts located in South Africa."; + String contactUs = + "If you have questions about these Terms, please contact us:\n• Email: mzansi.innovation.hub@gmail.com\n• Phone: +27 655 530 195\n"; + return [ + SizedBox( + width: 165, + child: + Image(image: MzanziInnovationHub.of(context)!.theme.altLogoImage()), + ), + const SizedBox( + height: 10, + ), + const Text( + "Terms of Service", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 30, + ), + ), + const Padding( + padding: EdgeInsets.symmetric(vertical: 10.0), + child: Divider(), + ), + //=============== Effective Date =============== + SizedBox( + width: 1250, + child: Row( + children: [ + const Text( + "Effective Date: ", + textAlign: TextAlign.center, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 15, + ), + ), + Text( + effectDate, + textAlign: TextAlign.center, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== Introduction =============== + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + intro, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 1. Acceptance of Terms =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "1. Acceptance of Terms", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + acceptTerms, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 2. Eligibility =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "2. Eligibility", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + eligib, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 3. Your Responsibilities =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "3. Your Responsibilities", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + yourResponse, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 4. Data Security =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "4. Our Services", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + ourServ, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 5. Data Collection and Privacy =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "5. Data Collection and Privacy", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + dataCol, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 6. User-Generated Content =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "6. User-Generated Content", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + userContent, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 7. Intellectual Property =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "7. Intellectual Property", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + intelProp, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 8. Termination of Use =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "8. Termination of Use", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + termUse, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 9. Disclaimer of Warranties =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "9. Disclaimer of Warranties", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + disclaimerWarens, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 10. Limitation of Liability =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "10. Limitation of Liability", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + limitLiability, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 11. Modifications to Terms =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "11. Modifications to Terms", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + modifyTerms, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 12. Governing Law =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "12. Governing Law", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + governLaw, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + //=============== 13. Contact Information =============== + const SizedBox( + width: 1250, + child: Row( + // crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + "13. Contact Information", + textAlign: TextAlign.start, + softWrap: true, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + ], + ), + ), + SizedBox( + width: 1250, + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.start, + children: [ + Text( + contactUs, + textAlign: TextAlign.start, + softWrap: true, + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 15, + ), + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + ]; + } +} From e1ac4923c9dc64ead7d7b69c00010e30a2099ef0 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Thu, 6 Mar 2025 10:35:18 +0200 Subject: [PATCH 07/11] New About MIH Body Tools --- .../about_mih/app_tools/mih_info.dart | 652 ++++++++++++++++++ .../app_tools/mih_privacy_policy.dart | 26 + .../app_tools/mih_terms_of_service.dart | 26 + 3 files changed, 704 insertions(+) create mode 100644 Frontend/lib/mih_packages/about_mih/app_tools/mih_info.dart create mode 100644 Frontend/lib/mih_packages/about_mih/app_tools/mih_privacy_policy.dart create mode 100644 Frontend/lib/mih_packages/about_mih/app_tools/mih_terms_of_service.dart diff --git a/Frontend/lib/mih_packages/about_mih/app_tools/mih_info.dart b/Frontend/lib/mih_packages/about_mih/app_tools/mih_info.dart new file mode 100644 index 00000000..34b7a353 --- /dev/null +++ b/Frontend/lib/mih_packages/about_mih/app_tools/mih_info.dart @@ -0,0 +1,652 @@ +import 'package:Mzansi_Innovation_Hub/main.dart'; +import 'package:Mzansi_Innovation_Hub/mih_components/mih_inputs_and_buttons/mih_button.dart'; +import 'package:Mzansi_Innovation_Hub/mih_components/mih_layout/mih_tile.dart'; +import 'package:Mzansi_Innovation_Hub/mih_components/mih_package/mih-app_tool_body.dart'; +import 'package:Mzansi_Innovation_Hub/mih_components/mih_package/mih_app_window.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import "package:universal_html/js.dart" as js; +import 'package:url_launcher/url_launcher.dart'; + +class MihInfo extends StatefulWidget { + const MihInfo({super.key}); + + @override + State createState() => _MihInfoState(); +} + +class _MihInfoState extends State { + final Uri _tiktokUrl = + Uri.parse('https://www.tiktok.com/@mzansi.innovation.hub'); + final Uri _whatsappUrl = + Uri.parse('https://whatsapp.com/channel/0029Vax3INCIyPtMn8KgeM2F'); + + final Uri _threadsUrl = + Uri.parse('https://www.threads.net/@mzansi.innovation.hub'); + final Uri _instagramUrl = + Uri.parse('https://www.instagram.com/mzansi.innovation.hub'); + final Uri _youtubeUrl = + Uri.parse('https://www.youtube.com/@mzansiinnovationhub'); + final Uri _xUrl = Uri.parse('https://x.com/mzansi_inno_hub'); + final Uri _linkedinUrl = + Uri.parse('https://www.linkedin.com/company/mzansi-innovation-hub/'); + final Uri _facebookUrl = + Uri.parse('https://www.facebook.com/profile.php?id=61565345762136'); + + void installMihTrigger() { + final isWebAndroid = + kIsWeb && (defaultTargetPlatform == TargetPlatform.android); + final isWebIos = kIsWeb && (defaultTargetPlatform == TargetPlatform.iOS); + + if (isWebAndroid) { + launchSocialUrl( + Uri.parse( + "https://play.google.com/store/apps/details?id=za.co.mzansiinnovationhub.mih", + ), + ); + } else if (isWebIos) { + //Show pop up for IOS + _showIOSInstallationGuide(); + } else if (MzanziInnovationHub.of(context)!.theme.getPlatform() == + "Android") { + //Installed Android App + // _showIOSInstallationGuide(); + launchSocialUrl( + Uri.parse( + "https://play.google.com/store/apps/details?id=za.co.mzansiinnovationhub.mih", + ), + ); + } else { + //Web + js.context.callMethod("presentAddToHome"); + } + } + + void _showIOSInstallationGuide() { + double windowFontSize = 17.0; + showDialog( + context: context, + barrierDismissible: false, + builder: (context) { + return MihAppWindow( + fullscreen: false, + windowTitle: "MIH Installation Guide (iOS)", + windowTools: const [], + onWindowTapClose: () { + Navigator.of(context).pop(); + }, + windowBody: [ + Align( + alignment: Alignment.centerLeft, + child: Text( + "In order to install MIH on your iPhone, please follow the below steps:- ", + textAlign: TextAlign.left, + style: TextStyle( + color: + MzanziInnovationHub.of(context)!.theme.secondaryColor(), + fontSize: windowFontSize, + fontWeight: FontWeight.bold, + ), + ), + ), + const SizedBox(height: 10), + Align( + alignment: Alignment.centerLeft, + child: Text( + "1. Launch MIH on Safari.", + textAlign: TextAlign.left, + style: TextStyle( + color: + MzanziInnovationHub.of(context)!.theme.secondaryColor(), + fontSize: windowFontSize, + fontWeight: FontWeight.bold, + ), + ), + ), + const SizedBox(height: 10), + Align( + alignment: Alignment.centerLeft, + child: Text( + "2. Tap the Share Button.", + textAlign: TextAlign.left, + style: TextStyle( + color: + MzanziInnovationHub.of(context)!.theme.secondaryColor(), + fontSize: windowFontSize, + fontWeight: FontWeight.bold, + ), + ), + ), + const SizedBox(height: 10), + Align( + alignment: Alignment.centerLeft, + child: Text( + "3. Scroll down and tap \"Add to Home Screen\".", + textAlign: TextAlign.left, + style: TextStyle( + color: + MzanziInnovationHub.of(context)!.theme.secondaryColor(), + fontSize: windowFontSize, + fontWeight: FontWeight.bold, + ), + ), + ), + const SizedBox(height: 10), + Align( + alignment: Alignment.centerLeft, + child: Text( + "4. Choose a name for the shortcut (Optional).", + textAlign: TextAlign.left, + style: TextStyle( + color: + MzanziInnovationHub.of(context)!.theme.secondaryColor(), + fontSize: windowFontSize, + fontWeight: FontWeight.bold, + ), + ), + ), + const SizedBox(height: 10), + Align( + alignment: Alignment.centerLeft, + child: Text( + "5. Tap \"Add\".", + textAlign: TextAlign.left, + style: TextStyle( + color: + MzanziInnovationHub.of(context)!.theme.secondaryColor(), + fontSize: windowFontSize, + fontWeight: FontWeight.bold, + ), + ), + ), + const SizedBox(height: 10), + Align( + alignment: Alignment.centerLeft, + child: Text( + "That's it! Now you can tap the MIH icon on your home screen to open it quickly.", + textAlign: TextAlign.left, + style: TextStyle( + color: + MzanziInnovationHub.of(context)!.theme.secondaryColor(), + fontSize: windowFontSize, + fontWeight: FontWeight.bold, + ), + ), + ), + const SizedBox(height: 10), + Align( + alignment: Alignment.centerLeft, + child: Text( + "If you are still having trouble, please click on the button below to view a video guide.", + textAlign: TextAlign.left, + style: TextStyle( + color: MzanziInnovationHub.of(context)!.theme.errorColor(), + fontSize: windowFontSize, + fontWeight: FontWeight.bold, + ), + ), + ), + const SizedBox(height: 15), + SizedBox( + width: 300, + height: 50, + child: MIHButton( + onTap: () { + launchSocialUrl( + Uri.parse( + "https://www.youtube.com/watch?v=KVK78IV28JY", + ), + ); + }, + buttonText: "Video Guide", + buttonColor: + MzanziInnovationHub.of(context)!.theme.secondaryColor(), + textColor: + MzanziInnovationHub.of(context)!.theme.primaryColor(), + ), + ), + ], + ); + }, + ); + } + + Widget founderBio() { + String bio = ""; + bio += "BSc Comnputer Science & Information Systems\n"; + bio += "(University of the Western Cap)\n"; + bio += + "6 Year of banking experience with one of the big 5 banks of South Africa."; + ImageProvider logoFrame = + MzanziInnovationHub.of(context)!.theme.altLogoFrame(); + return Wrap( + alignment: WrapAlignment.center, + crossAxisAlignment: WrapCrossAlignment.center, + spacing: 10, + runSpacing: 10, + children: [ + SizedBox( + width: 300, + child: Stack( + alignment: Alignment.center, + fit: StackFit.loose, + children: [ + CircleAvatar( + backgroundColor: + MzanziInnovationHub.of(context)!.theme.primaryColor(), + backgroundImage: const AssetImage("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'), + radius: 75, + ), + SizedBox( + width: 165, + child: Image(image: logoFrame), + ) + ], + ), + ), + SizedBox( + width: 400, + child: Text( + bio, + textAlign: TextAlign.center, + style: const TextStyle( + //fontWeight: FontWeight.bold, + fontSize: 15, + ), + ), + ), + const SizedBox( + height: 10, + ), + ], + ); + } + + Widget founderTitle() { + String heading = "Yasien Meth (Founder & CEO)"; + return Column( + children: [ + Text( + heading, + textAlign: TextAlign.center, + style: const TextStyle( + fontWeight: FontWeight.bold, + fontSize: 25, + ), + ), + const SizedBox( + height: 10, + ), + ], + ); + } + + Widget ourVision() { + String heading = "Our Vision"; + String vision = + "Digitizing Mzansi one process at a time. Discover essential Mzansi apps to streamline your personal and professional life. Simplify your daily tasks with our user-friendly solutions."; + + return SizedBox( + width: 500, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + Text( + heading, + textAlign: TextAlign.center, + style: const TextStyle( + fontWeight: FontWeight.bold, + fontSize: 25, + ), + ), + const SizedBox( + height: 10, + ), + Text( + vision, + textAlign: TextAlign.center, + style: const TextStyle( + //fontWeight: FontWeight.bold, + fontSize: 15, + ), + ), + ], + ), + ); + } + + Widget ourMission() { + String heading = "Our Mission"; + String mission = + "Bridge the digital divide in Mzansi, ensuring that everyone can benefit from the power of technology. We empower lives by providing simple, elegant solutions that elevate daily experiences. With our user-friendly approach, we're making the digital world accessible to all, ensuring no one is left behind in the digital revolution."; + + return SizedBox( + width: 500, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + heading, + textAlign: TextAlign.center, + style: const TextStyle( + fontWeight: FontWeight.bold, + fontSize: 25, + ), + ), + const SizedBox( + height: 10, + ), + Text( + mission, + textAlign: TextAlign.center, + style: const TextStyle( + //fontWeight: FontWeight.bold, + fontSize: 15, + ), + ), + ], + ), + ); + } + + Widget mihSocials() { + String heading = "Follow Our Journey"; + return Column( + children: [ + Text( + heading, + textAlign: TextAlign.center, + style: const TextStyle( + fontWeight: FontWeight.bold, + fontSize: 25, + ), + ), + const SizedBox( + height: 10, + ), + SizedBox( + width: 500, + height: 450, + child: GridView.builder( + padding: const EdgeInsets.only( + // left: width / 10, + // right: width / 10, + // //bottom: height / 5, + // top: 20, + ), + physics: const NeverScrollableScrollPhysics(), + // shrinkWrap: true, + itemCount: getSocialsList().length, + gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent( + mainAxisSpacing: 15, maxCrossAxisExtent: 150), + itemBuilder: (context, index) { + return getSocialsList()[index]; + }, + ), + ), + ], + ); + } + + List getSocialsList() { + List socials = []; + socials.add(MIHTile( + onTap: () { + launchSocialUrl(_youtubeUrl); + }, + tileName: "YouTube", + tileIcon: Center( + child: FaIcon( + FontAwesomeIcons.youtube, + color: MzanziInnovationHub.of(context)!.theme.primaryColor(), + size: 175, + ), + ), + p: MzanziInnovationHub.of(context)!.theme.secondaryColor(), + s: MzanziInnovationHub.of(context)!.theme.primaryColor(), + )); + //================================================================== + socials.add(MIHTile( + onTap: () { + launchSocialUrl(_tiktokUrl); + }, + tileName: "TikTok", + tileIcon: Center( + child: FaIcon( + FontAwesomeIcons.tiktok, + color: MzanziInnovationHub.of(context)!.theme.primaryColor(), + size: 200, + ), + ), + p: MzanziInnovationHub.of(context)!.theme.secondaryColor(), + s: MzanziInnovationHub.of(context)!.theme.primaryColor(), + )); + //================================================================== + socials.add(MIHTile( + onTap: () { + launchSocialUrl(_threadsUrl); + }, + tileName: "Threads", + tileIcon: Center( + child: FaIcon( + FontAwesomeIcons.threads, + color: MzanziInnovationHub.of(context)!.theme.primaryColor(), + size: 200, + ), + ), + p: MzanziInnovationHub.of(context)!.theme.secondaryColor(), + s: MzanziInnovationHub.of(context)!.theme.primaryColor(), + )); + //================================================================== + socials.add(MIHTile( + onTap: () { + launchSocialUrl(_whatsappUrl); + }, + tileName: "Whatsapp", + tileIcon: Center( + child: FaIcon( + FontAwesomeIcons.whatsapp, + color: MzanziInnovationHub.of(context)!.theme.primaryColor(), + size: 200, + ), + ), + p: MzanziInnovationHub.of(context)!.theme.secondaryColor(), + s: MzanziInnovationHub.of(context)!.theme.primaryColor(), + )); + //================================================================== + socials.add(MIHTile( + onTap: () { + launchSocialUrl(_instagramUrl); + }, + tileName: "Instagram", + tileIcon: Center( + child: FaIcon( + FontAwesomeIcons.instagram, + color: MzanziInnovationHub.of(context)!.theme.primaryColor(), + size: 200, + ), + ), + p: MzanziInnovationHub.of(context)!.theme.secondaryColor(), + s: MzanziInnovationHub.of(context)!.theme.primaryColor(), + )); + //================================================================== + + socials.add(MIHTile( + onTap: () { + launchSocialUrl(_xUrl); + }, + tileName: "X", + tileIcon: Center( + child: FaIcon( + FontAwesomeIcons.xTwitter, + color: MzanziInnovationHub.of(context)!.theme.primaryColor(), + size: 200, + ), + ), + p: MzanziInnovationHub.of(context)!.theme.secondaryColor(), + s: MzanziInnovationHub.of(context)!.theme.primaryColor(), + )); + //================================================================== + socials.add(MIHTile( + onTap: () { + launchSocialUrl(_linkedinUrl); + }, + tileName: "LinkedIn", + tileIcon: Center( + child: FaIcon( + FontAwesomeIcons.linkedin, + color: MzanziInnovationHub.of(context)!.theme.primaryColor(), + size: 200, + ), + ), + p: MzanziInnovationHub.of(context)!.theme.secondaryColor(), + s: MzanziInnovationHub.of(context)!.theme.primaryColor(), + )); + //================================================================== + socials.add(MIHTile( + onTap: () { + launchSocialUrl(_facebookUrl); + }, + tileName: "FaceBook", + tileIcon: Center( + child: FaIcon( + FontAwesomeIcons.facebook, + color: MzanziInnovationHub.of(context)!.theme.primaryColor(), + size: 200, + ), + ), + p: MzanziInnovationHub.of(context)!.theme.secondaryColor(), + s: MzanziInnovationHub.of(context)!.theme.primaryColor(), + )); + //================================================================== + return socials; + } + + Future launchSocialUrl(Uri linkUrl) async { + if (!await launchUrl(linkUrl)) { + throw Exception('Could not launch $linkUrl'); + } + } + + @override + Widget build(BuildContext context) { + return MihAppToolBody( + borderOn: false, + bodyItem: getBody(), + ); + } + + Widget getBody() { + return SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 10.0), + child: Column( + children: [ + SizedBox( + width: 165, + child: Image( + image: MzanziInnovationHub.of(context)!.theme.altLogoImage()), + ), + const SizedBox( + height: 10, + ), + const Text( + "Mzansi Innovation Hub", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 30, + ), + ), + const Padding( + padding: EdgeInsets.symmetric(vertical: 10.0), + child: Divider(), + ), + // const SizedBox( + // height: 10, + // ), + Wrap( + alignment: WrapAlignment.start, + crossAxisAlignment: WrapCrossAlignment.start, + spacing: 10, + runSpacing: 10, + children: [ + ourVision(), + ourMission(), + ], + ), + const SizedBox( + height: 10, + ), + Wrap( + alignment: WrapAlignment.start, + crossAxisAlignment: WrapCrossAlignment.start, + spacing: 10, + runSpacing: 10, + children: [ + SizedBox( + width: 300, + height: 50, + child: MIHButton( + onTap: () { + installMihTrigger(); + }, + buttonText: "Install MIH", + buttonColor: MzanziInnovationHub.of(context)! + .theme + .secondaryColor(), + textColor: + MzanziInnovationHub.of(context)!.theme.primaryColor(), + ), + ), + SizedBox( + width: 300, + height: 50, + child: MIHButton( + onTap: () { + launchSocialUrl( + Uri.parse( + "https://www.youtube.com/playlist?list=PLuT35kJIui0H5kXjxNOZlHoOPZbQLr4qh", + ), + ); + }, + buttonText: "MIH Beginners Guide", + buttonColor: MzanziInnovationHub.of(context)! + .theme + .secondaryColor(), + textColor: + MzanziInnovationHub.of(context)!.theme.primaryColor(), + ), + ), + ]), + const SizedBox( + height: 10, + ), + const Padding( + padding: EdgeInsets.symmetric(vertical: 10.0), + child: Divider(), + ), + Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisSize: MainAxisSize.max, + // spacing: 10, + // runSpacing: 10, + children: [ + founderTitle(), + founderBio(), + ], + ), + const Padding( + padding: EdgeInsets.symmetric(vertical: 10.0), + child: Divider(), + ), + mihSocials(), + ], + ), + ), + ); + } +} diff --git a/Frontend/lib/mih_packages/about_mih/app_tools/mih_privacy_policy.dart b/Frontend/lib/mih_packages/about_mih/app_tools/mih_privacy_policy.dart new file mode 100644 index 00000000..52cf5d11 --- /dev/null +++ b/Frontend/lib/mih_packages/about_mih/app_tools/mih_privacy_policy.dart @@ -0,0 +1,26 @@ +import 'package:Mzansi_Innovation_Hub/mih_components/mih_package/mih-app_tool_body.dart'; +import 'package:Mzansi_Innovation_Hub/mih_packages/about_mih/mih_policy_tos_ext/policy_and_terms_text.dart'; +import 'package:flutter/material.dart'; + +class MihPrivacyPolicy extends StatelessWidget { + const MihPrivacyPolicy({super.key}); + + @override + Widget build(BuildContext context) { + return MihAppToolBody( + borderOn: false, + bodyItem: getBody(context), + ); + } + + Widget getBody(BuildContext context) { + return SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 10.0), + child: Column( + children: PolicyAndTermsText().getPrivacyPolicyText(context), + ), + ), + ); + } +} diff --git a/Frontend/lib/mih_packages/about_mih/app_tools/mih_terms_of_service.dart b/Frontend/lib/mih_packages/about_mih/app_tools/mih_terms_of_service.dart new file mode 100644 index 00000000..d57aa05f --- /dev/null +++ b/Frontend/lib/mih_packages/about_mih/app_tools/mih_terms_of_service.dart @@ -0,0 +1,26 @@ +import 'package:Mzansi_Innovation_Hub/mih_components/mih_package/mih-app_tool_body.dart'; +import 'package:Mzansi_Innovation_Hub/mih_packages/about_mih/mih_policy_tos_ext/policy_and_terms_text.dart'; +import 'package:flutter/material.dart'; + +class MIHTermsOfService extends StatelessWidget { + const MIHTermsOfService({super.key}); + + @override + Widget build(BuildContext context) { + return MihAppToolBody( + borderOn: false, + bodyItem: getBody(context), + ); + } + + Widget getBody(BuildContext context) { + return SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 10.0), + child: Column( + children: PolicyAndTermsText().getTermsOfServiceText(context), + ), + ), + ); + } +} From 166c13faf39a7f2d56d6ad52f251ce345c38f555 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Thu, 6 Mar 2025 10:55:16 +0200 Subject: [PATCH 08/11] add param of selected index to preselect page --- .../lib/mih_packages/about_mih/about_mih.dart | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Frontend/lib/mih_packages/about_mih/about_mih.dart b/Frontend/lib/mih_packages/about_mih/about_mih.dart index 8f61b90e..5944a259 100644 --- a/Frontend/lib/mih_packages/about_mih/about_mih.dart +++ b/Frontend/lib/mih_packages/about_mih/about_mih.dart @@ -7,14 +7,26 @@ import 'package:Mzansi_Innovation_Hub/mih_packages/about_mih/app_tools/mih_terms import 'package:flutter/material.dart'; class AboutMih extends StatefulWidget { - const AboutMih({super.key}); + final int packageIndex; + const AboutMih({ + super.key, + required this.packageIndex, + }); @override State createState() => _AboutMihState(); } class _AboutMihState extends State { - int _selcetedIndex = 0; + late int _selcetedIndex; + + @override + void initState() { + super.initState(); + setState(() { + _selcetedIndex = widget.packageIndex; + }); + } @override Widget build(BuildContext context) { From b0e05e35f2dc8b2eed64ac3e113349b2ca0400dc Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Thu, 6 Mar 2025 10:55:31 +0200 Subject: [PATCH 09/11] add preselected index --- .../lib/mih_components/mih_layout/mih_app_drawer.dart | 8 ++++---- Frontend/lib/mih_packages/mih_home/mih_home.dart | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Frontend/lib/mih_components/mih_layout/mih_app_drawer.dart b/Frontend/lib/mih_components/mih_layout/mih_app_drawer.dart index 2e28b7a7..07d8e6eb 100644 --- a/Frontend/lib/mih_components/mih_layout/mih_app_drawer.dart +++ b/Frontend/lib/mih_components/mih_layout/mih_app_drawer.dart @@ -224,8 +224,8 @@ class _MIHAppDrawerState extends State { ), onTap: () { Navigator.of(context).pushNamed( - '/privacy-policy', - //arguments: widget.signedInUser, + '/about', + arguments: 1, ); }, ), @@ -253,8 +253,8 @@ class _MIHAppDrawerState extends State { ), onTap: () { Navigator.of(context).pushNamed( - '/terms-of-service', - //arguments: widget.signedInUser, + '/about', + arguments: 2, ); }, ), diff --git a/Frontend/lib/mih_packages/mih_home/mih_home.dart b/Frontend/lib/mih_packages/mih_home/mih_home.dart index 5392d4d7..f12a6d47 100644 --- a/Frontend/lib/mih_packages/mih_home/mih_home.dart +++ b/Frontend/lib/mih_packages/mih_home/mih_home.dart @@ -329,7 +329,7 @@ class _MIHHomeState extends State { onTap: () { Navigator.of(context).pushNamed( '/about', - //arguments: widget.signedInUser, + arguments: 0, ); }, tileName: "About MIH", @@ -510,7 +510,7 @@ class _MIHHomeState extends State { onTap: () { Navigator.of(context).pushNamed( '/about', - //arguments: widget.signedInUser, + arguments: 0, ); }, tileName: "About MIH", From 39bbdae7f598ed35e3a8c1b69c0c45069bff0191 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Thu, 6 Mar 2025 10:55:44 +0200 Subject: [PATCH 10/11] add route param validation --- Frontend/lib/mih_router/routeGenerator.dart | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Frontend/lib/mih_router/routeGenerator.dart b/Frontend/lib/mih_router/routeGenerator.dart index bb9b2fb0..60d064b1 100644 --- a/Frontend/lib/mih_router/routeGenerator.dart +++ b/Frontend/lib/mih_router/routeGenerator.dart @@ -90,8 +90,15 @@ class RouteGenerator { //About MIH case '/about': - return MaterialPageRoute( - settings: settings, builder: (_) => const AboutMih()); + if (args is int) { + return MaterialPageRoute( + settings: settings, + builder: (_) => AboutMih( + packageIndex: args, + ), + ); + } + return _errorRoute(); //=============================================================== //Privacy Policy From 3a7063a6ad7fc254986e5d9fedb03ff115373c22 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Thu, 6 Mar 2025 11:04:48 +0200 Subject: [PATCH 11/11] update sign in and register MIH logo nav --- Frontend/lib/mih_packages/authentication/register.dart | 2 +- Frontend/lib/mih_packages/authentication/signin.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Frontend/lib/mih_packages/authentication/register.dart b/Frontend/lib/mih_packages/authentication/register.dart index 22f5fdcc..cab1ddec 100644 --- a/Frontend/lib/mih_packages/authentication/register.dart +++ b/Frontend/lib/mih_packages/authentication/register.dart @@ -243,7 +243,7 @@ class _RegisterState extends State { onTap: () { Navigator.of(context).pushNamed( '/about', - //arguments: widget.signedInUser, + arguments: 0, ); }, ); diff --git a/Frontend/lib/mih_packages/authentication/signin.dart b/Frontend/lib/mih_packages/authentication/signin.dart index f5ef1c4c..fb3611be 100644 --- a/Frontend/lib/mih_packages/authentication/signin.dart +++ b/Frontend/lib/mih_packages/authentication/signin.dart @@ -291,7 +291,7 @@ class _SignInState extends State { onTap: () { Navigator.of(context).pushNamed( '/about', - //arguments: widget.signedInUser, + arguments: 0, ); }, );