rename container folders
This commit is contained in:
102
mih_ui/lib/mih_packages/about_mih/about_mih.dart
Normal file
102
mih_ui/lib/mih_packages/about_mih/about_mih.dart
Normal file
@@ -0,0 +1,102 @@
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_package.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_action.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_tools.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_providers/about_mih_provider.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_packages/about_mih/package_tools/mih_%20attributes.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_packages/about_mih/package_tools/mih_info.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_packages/about_mih/package_tools/mih_privacy_policy.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_packages/about_mih/package_tools/mih_terms_of_service.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class AboutMih extends StatefulWidget {
|
||||
const AboutMih({
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
State<AboutMih> createState() => _AboutMihState();
|
||||
}
|
||||
|
||||
class _AboutMihState extends State<AboutMih> {
|
||||
late final MihInfo _info;
|
||||
late final MihPrivacyPolicy _privacyPolicy;
|
||||
late final MIHTermsOfService _termsOfService;
|
||||
late final MihAttributes _attributes;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_info = MihInfo();
|
||||
_privacyPolicy = MihPrivacyPolicy();
|
||||
_termsOfService = MIHTermsOfService();
|
||||
_attributes = MihAttributes();
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MihPackage(
|
||||
appActionButton: getAction(),
|
||||
appTools: getTools(),
|
||||
appBody: getToolBody(),
|
||||
appToolTitles: getToolTitle(),
|
||||
selectedbodyIndex: context.watch<AboutMihProvider>().toolIndex,
|
||||
onIndexChange: (newIndex) {
|
||||
context.read<AboutMihProvider>().setToolIndex(newIndex);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
MihPackageAction getAction() {
|
||||
return MihPackageAction(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
iconSize: 35,
|
||||
onTap: () {
|
||||
context.goNamed(
|
||||
'mihHome',
|
||||
);
|
||||
FocusScope.of(context).unfocus();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
MihPackageTools getTools() {
|
||||
Map<Widget, void Function()?> temp = {};
|
||||
temp[const Icon(Icons.info)] = () {
|
||||
context.read<AboutMihProvider>().setToolIndex(0);
|
||||
};
|
||||
temp[const Icon(Icons.policy)] = () {
|
||||
context.read<AboutMihProvider>().setToolIndex(1);
|
||||
};
|
||||
temp[const Icon(Icons.design_services)] = () {
|
||||
context.read<AboutMihProvider>().setToolIndex(2);
|
||||
};
|
||||
temp[const Icon(Icons.star_rounded)] = () {
|
||||
context.read<AboutMihProvider>().setToolIndex(3);
|
||||
};
|
||||
return MihPackageTools(
|
||||
tools: temp,
|
||||
selcetedIndex: context.watch<AboutMihProvider>().toolIndex,
|
||||
);
|
||||
}
|
||||
|
||||
List<Widget> getToolBody() {
|
||||
return [
|
||||
_info,
|
||||
_privacyPolicy,
|
||||
_termsOfService,
|
||||
_attributes,
|
||||
];
|
||||
}
|
||||
|
||||
List<String> getToolTitle() {
|
||||
List<String> toolTitles = [
|
||||
"About",
|
||||
"Privacy Policy",
|
||||
"Terms of Service",
|
||||
"Attributions",
|
||||
];
|
||||
return toolTitles;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,44 @@
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:mzansi_innovation_hub/main.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_tile.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_icons.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
||||
|
||||
class AboutMihTile extends StatefulWidget {
|
||||
final double packageSize;
|
||||
const AboutMihTile({
|
||||
super.key,
|
||||
required this.packageSize,
|
||||
});
|
||||
|
||||
@override
|
||||
State<AboutMihTile> createState() => _AboutMihTileState();
|
||||
}
|
||||
|
||||
class _AboutMihTileState extends State<AboutMihTile> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MihPackageTile(
|
||||
onTap: () {
|
||||
context.goNamed(
|
||||
"aboutMih",
|
||||
);
|
||||
// Navigator.of(context).pushNamed(
|
||||
// '/about',
|
||||
// arguments: 0,
|
||||
// );
|
||||
},
|
||||
appName: "About MIH",
|
||||
appIcon: Icon(
|
||||
MihIcons.aboutMih,
|
||||
color: MihColors.getSecondaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
// size: widget.packageSize,
|
||||
),
|
||||
iconSize: widget.packageSize,
|
||||
textColor: MihColors.getSecondaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,287 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mzansi_innovation_hub/main.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_single_child_scroll.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_button.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_tool_body.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_icons.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class MihAttributes extends StatefulWidget {
|
||||
const MihAttributes({super.key});
|
||||
|
||||
@override
|
||||
State<MihAttributes> createState() => _MihAttributesState();
|
||||
}
|
||||
|
||||
class _MihAttributesState extends State<MihAttributes> {
|
||||
Future<void> launchUrlLink(Uri linkUrl) async {
|
||||
if (!await launchUrl(linkUrl)) {
|
||||
throw Exception('Could not launch $linkUrl');
|
||||
}
|
||||
}
|
||||
|
||||
TableRow displayIcon(IconData icon, String creator, String link) {
|
||||
return TableRow(
|
||||
children: [
|
||||
TableCell(
|
||||
verticalAlignment: TableCellVerticalAlignment.middle,
|
||||
child: SizedBox(
|
||||
height: 150,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 15.0),
|
||||
child: FittedBox(
|
||||
child: Center(
|
||||
child: Icon(
|
||||
icon,
|
||||
// size: 125,
|
||||
color: MihColors.getSecondaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
TableCell(
|
||||
verticalAlignment: TableCellVerticalAlignment.middle,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(15.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
creator,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
TableCell(
|
||||
verticalAlignment: TableCellVerticalAlignment.middle,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 15.0),
|
||||
child: MihButton(
|
||||
onPressed: () {
|
||||
launchUrlLink(
|
||||
Uri.parse(
|
||||
link,
|
||||
),
|
||||
);
|
||||
},
|
||||
buttonColor: MihColors.getGreenColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
width: 100,
|
||||
child: Text(
|
||||
"Visit",
|
||||
style: TextStyle(
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MihPackageToolBody(
|
||||
borderOn: false,
|
||||
innerHorizontalPadding: 10,
|
||||
bodyItem: getBody(),
|
||||
);
|
||||
}
|
||||
|
||||
Widget getBody() {
|
||||
String message =
|
||||
"Some APIs, Icons and Assets used in MIH were sourced from third party providers.\n";
|
||||
message +=
|
||||
"We are grateful to the talented creators for providing these resources.\n";
|
||||
message +=
|
||||
"As per the terms for free use for these third party providers, the following assets require attribution";
|
||||
|
||||
return MihSingleChildScroll(
|
||||
child: Column(
|
||||
children: [
|
||||
Icon(
|
||||
MihIcons.mihLogo,
|
||||
color: MihColors.getSecondaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
size: 165,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
SelectableText(
|
||||
message,
|
||||
style: const TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
SizedBox(
|
||||
width: 700,
|
||||
child: Table(
|
||||
defaultVerticalAlignment: TableCellVerticalAlignment.middle,
|
||||
columnWidths: const {
|
||||
0: FlexColumnWidth(1),
|
||||
1: FlexColumnWidth(1),
|
||||
2: FlexColumnWidth(1),
|
||||
},
|
||||
children: [
|
||||
const TableRow(
|
||||
children: [
|
||||
TableCell(
|
||||
verticalAlignment: TableCellVerticalAlignment.middle,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 15.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"Resources",
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
TableCell(
|
||||
verticalAlignment: TableCellVerticalAlignment.middle,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 15.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"Creator",
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
TableCell(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 15.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"Link",
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
displayIcon(MihIcons.mihRing, "Tarah Meth",
|
||||
"https://www.linkedin.com/in/tarah-meth-3b6309254/"),
|
||||
displayIcon(MihIcons.mihLogo, "Tarah Meth",
|
||||
"https://www.linkedin.com/in/tarah-meth-3b6309254/"),
|
||||
displayIcon(MihIcons.mzansiAi, "Ollama", "https://ollama.com/"),
|
||||
displayIcon(MihIcons.mzansiWallet, "Freepik",
|
||||
"https://www.flaticon.com/free-icon/wallet-passes-app_3884407?term=wallet&page=1&position=21&origin=search&related_id=3884407"),
|
||||
displayIcon(MihIcons.patientProfile, "RaftelDesign",
|
||||
"https://www.flaticon.com/free-icon/patient_2376100?term=medication&page=1&position=6&origin=search&related_id=2376100"),
|
||||
displayIcon(MihIcons.patientProfile, "Srip",
|
||||
"https://www.flaticon.com/free-icon/hospital_1233930?term=medical+snake&page=1&position=7&origin=search&related_id=1233930"),
|
||||
displayIcon(MihIcons.calendar, "Freepik",
|
||||
"https://www.flaticon.com/free-icon/calendar_2278049?term=calendar&page=1&position=5&origin=search&related_id=2278049"),
|
||||
displayIcon(MihIcons.calculator, "Freepik",
|
||||
"https://www.flaticon.com/free-icon/calculator_2374409?term=calculator&page=1&position=20&origin=search&related_id=2374409"),
|
||||
displayIcon(MihIcons.aboutMih, "Chanut",
|
||||
"https://www.flaticon.com/free-icon/info_151776?term=about&page=1&position=8&origin=search&related_id=151776"),
|
||||
displayIcon(MihIcons.personalProfile, "Freepik",
|
||||
"https://www.flaticon.com/free-icon/user_1077063?term=profile&page=1&position=6&origin=search&related_id=1077063"),
|
||||
displayIcon(MihIcons.businessProfile, "Gravisio",
|
||||
"https://www.flaticon.com/free-icon/contractor_11813336?term=company+profile&page=1&position=2&origin=search&related_id=11813336"),
|
||||
displayIcon(MihIcons.patientManager, "Vector Tank",
|
||||
"https://www.flaticon.com/free-icon/doctor_10215061?term=doctor&page=1&position=73&origin=search&related_id=10215061"),
|
||||
displayIcon(MihIcons.profileSetup, "Freepik",
|
||||
"https://www.flaticon.com/free-icon/add-user_748137?term=profile+add&page=1&position=1&origin=search&related_id=748137"),
|
||||
displayIcon(MihIcons.businessSetup, "kerismaker",
|
||||
"https://www.flaticon.com/free-icon/business_13569850?term=company+add&page=1&position=25&origin=search&related_id=13569850"),
|
||||
displayIcon(MihIcons.calculator, "fawazahmed0",
|
||||
"https://github.com/fawazahmed0/exchange-api"),
|
||||
displayIcon(MihIcons.iDontKnow, "Freepik",
|
||||
"https://www.flaticon.com/free-icon/i-dont-know_5359909?term=i+dont+know&page=1&position=7&origin=search&related_id=5359909"),
|
||||
],
|
||||
),
|
||||
),
|
||||
// SizedBox(
|
||||
// width: 500,
|
||||
// child: Column(
|
||||
// children: [
|
||||
// const SizedBox(
|
||||
// width: double.infinity,
|
||||
// child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Flexible(
|
||||
// child: Text(
|
||||
// "Icon",
|
||||
// style: TextStyle(
|
||||
// fontSize: 25,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Flexible(
|
||||
// child: Text(
|
||||
// "Creator",
|
||||
// style: TextStyle(
|
||||
// fontSize: 25,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Flexible(
|
||||
// child: Text(
|
||||
// "Link",
|
||||
// style: TextStyle(
|
||||
// fontSize: 25,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// const Padding(
|
||||
// padding: EdgeInsets.symmetric(vertical: 10.0),
|
||||
// child: Divider(),
|
||||
// ),
|
||||
// displayIcon(MihIcons.mihLogo, "Tarah Meth",
|
||||
// "https://app.mzansi-innovation-hub.co.za/"),
|
||||
// const SizedBox(height: 10),
|
||||
// displayIcon(MihIcons.mihLogo, "Test",
|
||||
// "https://www.flaticon.com/free-icons/mih"),
|
||||
// const SizedBox(height: 10),
|
||||
// displayIcon(MihIcons.mihLogo, "Test",
|
||||
// "https://www.flaticon.com/free-icons/mih"),
|
||||
// const SizedBox(height: 10),
|
||||
// displayIcon(MihIcons.mihLogo, "Test",
|
||||
// "https://www.flaticon.com/free-icons/mih"),
|
||||
// const SizedBox(height: 10),
|
||||
// ],
|
||||
// ),
|
||||
// )
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
904
mih_ui/lib/mih_packages/about_mih/package_tools/mih_info.dart
Normal file
904
mih_ui/lib/mih_packages/about_mih/package_tools/mih_info.dart
Normal file
@@ -0,0 +1,904 @@
|
||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
||||
import 'package:mzansi_innovation_hub/main.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_objects/profile_link.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_profile_links.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_services/mih_business_details_services.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_services/mih_install_services.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_single_child_scroll.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_button.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_tool_body.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_floating_menu.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_icons.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_services/mih_user_services.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:redacted/redacted.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
|
||||
class MihInfo extends StatefulWidget {
|
||||
const MihInfo({super.key});
|
||||
|
||||
@override
|
||||
State<MihInfo> createState() => _MihInfoState();
|
||||
}
|
||||
|
||||
class _MihInfoState extends State<MihInfo> {
|
||||
late Future<int> _futureUserCount;
|
||||
late Future<int> _futureBusinessCount;
|
||||
|
||||
Widget founderBio() {
|
||||
String bio = "";
|
||||
bio += "BSc Computer Science & Information Systems\n";
|
||||
bio += "(University of the Western Cape)\n";
|
||||
bio +=
|
||||
"6 Year of banking experience with one of the big 5 banks of South Africa.";
|
||||
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: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 4.0),
|
||||
child: CircleAvatar(
|
||||
backgroundColor: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
backgroundImage: const AssetImage(
|
||||
"lib/mih_package_components/assets/images/founder.jpg"),
|
||||
//'https://media.licdn.com/dms/image/D4D03AQGd1-QhjtWWpA/profile-displayphoto-shrink_400_400/0/1671698053061?e=2147483647&v=beta&t=a3dJI5yxs5-KeXjj10LcNCFuC9IOfa8nNn3k_Qyr0CA'),
|
||||
radius: 75,
|
||||
),
|
||||
),
|
||||
Icon(
|
||||
MihIcons.mihRing,
|
||||
size: 165,
|
||||
color: MihColors.getSecondaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 400,
|
||||
child: Text(
|
||||
bio,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
//fontWeight: FontWeight.bold,
|
||||
fontSize: 17,
|
||||
),
|
||||
),
|
||||
),
|
||||
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: 17,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
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: 17,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> launchSocialUrl(Uri linkUrl) async {
|
||||
if (!await launchUrl(linkUrl)) {
|
||||
throw Exception('Could not launch $linkUrl');
|
||||
}
|
||||
}
|
||||
|
||||
Widget getInstallButtonText() {
|
||||
final isWebAndroid =
|
||||
kIsWeb && (defaultTargetPlatform == TargetPlatform.android);
|
||||
final isWebIos = kIsWeb && (defaultTargetPlatform == TargetPlatform.iOS);
|
||||
String btnText = "";
|
||||
IconData platformIcon;
|
||||
if (isWebAndroid) {
|
||||
btnText = "Install MIH";
|
||||
platformIcon = FontAwesomeIcons.googlePlay;
|
||||
} else if (isWebIos) {
|
||||
btnText = "Install MIH";
|
||||
platformIcon = FontAwesomeIcons.appStoreIos;
|
||||
} else if (MzansiInnovationHub.of(context)!.theme.getPlatform() ==
|
||||
"Android") {
|
||||
btnText = "Update MIH";
|
||||
platformIcon = FontAwesomeIcons.googlePlay;
|
||||
} else if (MzansiInnovationHub.of(context)!.theme.getPlatform() == "iOS") {
|
||||
btnText = "Update MIH";
|
||||
platformIcon = FontAwesomeIcons.appStoreIos;
|
||||
} else {
|
||||
btnText = "Install MIH";
|
||||
platformIcon = FontAwesomeIcons.globe;
|
||||
}
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
FaIcon(
|
||||
platformIcon,
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
btnText,
|
||||
style: TextStyle(
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
void shareMIHLink(BuildContext context, String message, String link) {
|
||||
String shareText = "$message: $link";
|
||||
SharePlus.instance.share(
|
||||
ShareParams(text: shareText),
|
||||
);
|
||||
}
|
||||
|
||||
Widget displayBusinessCount() {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
FutureBuilder<int>(
|
||||
future: _futureBusinessCount,
|
||||
builder: (context, snapshot) {
|
||||
bool isLoading = true;
|
||||
String userCount = "⚠️";
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
isLoading = true;
|
||||
} else if (snapshot.connectionState == ConnectionState.done &&
|
||||
snapshot.hasError) {
|
||||
isLoading = false;
|
||||
} else if (snapshot.connectionState == ConnectionState.done &&
|
||||
snapshot.hasData) {
|
||||
isLoading = false;
|
||||
userCount = snapshot.data.toString();
|
||||
} else {
|
||||
isLoading = true;
|
||||
}
|
||||
return SizedBox(
|
||||
child: Text(
|
||||
userCount,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 23,
|
||||
),
|
||||
),
|
||||
).redacted(
|
||||
context: context,
|
||||
redact: isLoading,
|
||||
configuration: RedactedConfiguration(
|
||||
defaultBorderRadius: BorderRadius.circular(5),
|
||||
redactedColor: MihColors.getSecondaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark",
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"Businesses",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 20,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget displayUserCount() {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
FutureBuilder<int>(
|
||||
future: _futureUserCount,
|
||||
builder: (context, snapshot) {
|
||||
bool isLoading = true;
|
||||
String userCount = "⚠️";
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
isLoading = true;
|
||||
} else if (snapshot.connectionState == ConnectionState.done &&
|
||||
snapshot.hasError) {
|
||||
isLoading = false;
|
||||
} else if (snapshot.connectionState == ConnectionState.done &&
|
||||
snapshot.hasData) {
|
||||
isLoading = false;
|
||||
userCount = snapshot.data.toString();
|
||||
} else {
|
||||
isLoading = true;
|
||||
}
|
||||
return SizedBox(
|
||||
child: Text(
|
||||
userCount,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 23,
|
||||
),
|
||||
),
|
||||
).redacted(
|
||||
context: context,
|
||||
redact: isLoading,
|
||||
configuration: RedactedConfiguration(
|
||||
defaultBorderRadius: BorderRadius.circular(5),
|
||||
redactedColor: MihColors.getSecondaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark",
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"People",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 20,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget mihDivider() {
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 10.0,
|
||||
horizontal: 25,
|
||||
),
|
||||
child: Divider(
|
||||
thickness: 1,
|
||||
color: MihColors.getGreyColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget aboutHeadings() {
|
||||
return Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 165,
|
||||
child: FittedBox(
|
||||
child: Icon(
|
||||
MihIcons.mihLogo,
|
||||
color: MihColors.getSecondaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
const Text(
|
||||
"Mzansi Innovation Hub",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 30,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"MIH App Version: ${MzansiInnovationHub.of(context)!.theme.getLatestVersion()}",
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 15,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget communityCounter() {
|
||||
return Column(
|
||||
children: [
|
||||
Wrap(
|
||||
alignment: WrapAlignment.spaceAround,
|
||||
crossAxisAlignment: WrapCrossAlignment.center,
|
||||
spacing: 25,
|
||||
runSpacing: 10,
|
||||
children: [
|
||||
displayUserCount(),
|
||||
displayBusinessCount(),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
"The MIH Community",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 22,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget callToActionsButtons() {
|
||||
return Column(
|
||||
children: [
|
||||
Wrap(
|
||||
alignment: WrapAlignment.center,
|
||||
crossAxisAlignment: WrapCrossAlignment.center,
|
||||
spacing: 10,
|
||||
runSpacing: 10,
|
||||
children: [
|
||||
MihButton(
|
||||
onPressed: () {
|
||||
MihInstallServices().installMihTrigger(context);
|
||||
},
|
||||
buttonColor: MihColors.getGreenColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
width: 300,
|
||||
child: getInstallButtonText(),
|
||||
),
|
||||
MihButton(
|
||||
onPressed: () {
|
||||
launchSocialUrl(
|
||||
Uri.parse(
|
||||
"https://www.youtube.com/playlist?list=PLuT35kJIui0H5kXjxNOZlHoOPZbQLr4qh",
|
||||
),
|
||||
);
|
||||
},
|
||||
buttonColor: MihColors.getGreenColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
width: 300,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
FaIcon(
|
||||
FontAwesomeIcons.youtube,
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"MIH Beginners Guide",
|
||||
style: TextStyle(
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
||||
"Dark"),
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
MihButton(
|
||||
onPressed: () {
|
||||
launchSocialUrl(
|
||||
Uri.parse(
|
||||
"https://patreon.com/MzansiInnovationHub?utm_medium=unknown&utm_source=join_link&utm_campaign=creatorshare_creator&utm_content=copyLink",
|
||||
),
|
||||
);
|
||||
},
|
||||
buttonColor: MihColors.getGreenColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
width: 300,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
FaIcon(
|
||||
FontAwesomeIcons.patreon,
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"Support Our Journey",
|
||||
style: TextStyle(
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
||||
"Dark"),
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget womenForChange() {
|
||||
String heading = "MIH Stands with Women For Change SA";
|
||||
String mission =
|
||||
"South Africa is facing a devastating crisis of Gender-Based Violence and Femicide (GBVF), with at least 15 women murdered and 117 women reporting rape daily, often at the hands of known individuals, as highlighted by a shocking 33.8% rise in femicide in the last year, despite the existence of the National Strategic Plan on GBVF (NSP GBVF). Due to the government's lack of urgent action and funding for the NSP GBVF's implementation, organizations like Women For Change are urgently calling for the immediate declaration of GBVF as a National Disaster to mobilize resources and political will for decisive action, which must include judicial reforms (like opposing bail and implementing harsher sentences), immediate funding of the NSP GBVF and the new National Council, making the National Sex Offenders Register publicly accessible, and mandating comprehensive GBVF education and continuous public awareness campaigns.";
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 25.0),
|
||||
child: 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,
|
||||
),
|
||||
Wrap(
|
||||
alignment: WrapAlignment.center,
|
||||
crossAxisAlignment: WrapCrossAlignment.center,
|
||||
spacing: 10,
|
||||
runSpacing: 10,
|
||||
children: [
|
||||
MihButton(
|
||||
onPressed: () {
|
||||
launchSocialUrl(
|
||||
Uri.parse(
|
||||
"https://www.tiktok.com/@womenforchange.sa",
|
||||
),
|
||||
);
|
||||
},
|
||||
buttonColor: MihColors.getGreenColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
width: 300,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
FaIcon(
|
||||
FontAwesomeIcons.tiktok,
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
||||
"Dark"),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"@womenforchange.sa",
|
||||
style: TextStyle(
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
||||
"Dark"),
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
MihButton(
|
||||
onPressed: () {
|
||||
launchSocialUrl(
|
||||
Uri.parse(
|
||||
"https://www.change.org/p/declare-gbvf-a-national-disaster-in-south-africa",
|
||||
),
|
||||
);
|
||||
},
|
||||
buttonColor: MihColors.getGreenColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
width: 300,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
FaIcon(
|
||||
Icons.edit,
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
||||
"Dark"),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"Sign Petition",
|
||||
style: TextStyle(
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
||||
"Dark"),
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Text(
|
||||
mission,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
//fontWeight: FontWeight.bold,
|
||||
fontSize: 17,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget missionAndVission() {
|
||||
return Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 25.0),
|
||||
child: Wrap(
|
||||
alignment: WrapAlignment.start,
|
||||
crossAxisAlignment: WrapCrossAlignment.start,
|
||||
spacing: 10,
|
||||
runSpacing: 10,
|
||||
children: [
|
||||
ourVision(),
|
||||
ourMission(),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget founderDetails() {
|
||||
return Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
founderTitle(),
|
||||
founderBio(),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget mihSocials() {
|
||||
List<ProfileLink> links = [
|
||||
ProfileLink(
|
||||
idprofile_links: 1,
|
||||
app_id: "1234",
|
||||
business_id: "",
|
||||
destination: "Youtube",
|
||||
web_link: "https://www.youtube.com/@MzansiInnovationHub",
|
||||
),
|
||||
ProfileLink(
|
||||
idprofile_links: 1,
|
||||
app_id: "1234",
|
||||
business_id: "",
|
||||
destination: "TikTok",
|
||||
web_link: "https://www.tiktok.com/@mzansiinnovationhub",
|
||||
),
|
||||
ProfileLink(
|
||||
idprofile_links: 1,
|
||||
app_id: "1234",
|
||||
business_id: "",
|
||||
destination: "Twitch",
|
||||
web_link: "https://www.twitch.tv/mzansiinnovationhub",
|
||||
),
|
||||
ProfileLink(
|
||||
idprofile_links: 1,
|
||||
app_id: "1234",
|
||||
business_id: "",
|
||||
destination: "Threads",
|
||||
web_link: "https://www.threads.com/@mzansi.innovation.hub",
|
||||
),
|
||||
ProfileLink(
|
||||
idprofile_links: 1,
|
||||
app_id: "1234",
|
||||
business_id: "",
|
||||
destination: "WhatsApp",
|
||||
web_link: "https://whatsapp.com/channel/0029Vax3INCIyPtMn8KgeM2F",
|
||||
),
|
||||
ProfileLink(
|
||||
idprofile_links: 1,
|
||||
app_id: "1234",
|
||||
business_id: "",
|
||||
destination: "Instagram",
|
||||
web_link: "https://www.instagram.com/mzansi.innovation.hub/",
|
||||
),
|
||||
ProfileLink(
|
||||
idprofile_links: 1,
|
||||
app_id: "1234",
|
||||
business_id: "",
|
||||
destination: "X",
|
||||
web_link: "https://x.com/mzansi_inno_hub",
|
||||
),
|
||||
ProfileLink(
|
||||
idprofile_links: 1,
|
||||
app_id: "1234",
|
||||
business_id: "",
|
||||
destination: "LinkedIn",
|
||||
web_link: "https://www.linkedin.com/company/mzansi-innovation-hub/",
|
||||
),
|
||||
ProfileLink(
|
||||
idprofile_links: 1,
|
||||
app_id: "1234",
|
||||
business_id: "",
|
||||
destination: "Facebook",
|
||||
web_link: "https://www.facebook.com/profile.php?id=61565345762136",
|
||||
),
|
||||
ProfileLink(
|
||||
idprofile_links: 1,
|
||||
app_id: "1234",
|
||||
business_id: "",
|
||||
destination: "Reddit",
|
||||
web_link: "https://www.reddit.com/r/Mzani_Innovation_Hub/",
|
||||
),
|
||||
];
|
||||
return Column(
|
||||
children: [
|
||||
Text(
|
||||
"Follow Our Journey",
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 25,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
MihProfileLinks(links: links),
|
||||
const SizedBox(
|
||||
height: 25,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_futureUserCount = MihUserServices().fetchUserCount();
|
||||
_futureBusinessCount = MihBusinessDetailsServices().fetchBusinessCount();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MihPackageToolBody(
|
||||
borderOn: false,
|
||||
bodyItem: getBody(),
|
||||
);
|
||||
}
|
||||
|
||||
Widget getBody() {
|
||||
return Stack(
|
||||
children: [
|
||||
MihSingleChildScroll(
|
||||
child: Column(
|
||||
children: [
|
||||
aboutHeadings(),
|
||||
communityCounter(),
|
||||
callToActionsButtons(),
|
||||
mihDivider(),
|
||||
womenForChange(),
|
||||
mihDivider(),
|
||||
missionAndVission(),
|
||||
mihDivider(),
|
||||
founderDetails(),
|
||||
mihDivider(),
|
||||
mihSocials(),
|
||||
],
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 10,
|
||||
bottom: 10,
|
||||
child: MihFloatingMenu(
|
||||
icon: Icons.share,
|
||||
children: [
|
||||
SpeedDialChild(
|
||||
child: Icon(
|
||||
Icons.android,
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
),
|
||||
label: "Android",
|
||||
labelBackgroundColor: MihColors.getGreenColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
labelStyle: TextStyle(
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
backgroundColor: MihColors.getGreenColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
onTap: () {
|
||||
shareMIHLink(
|
||||
context,
|
||||
"Check out the MIH app on the Play Store",
|
||||
"https://play.google.com/store/apps/details?id=za.co.mzansiinnovationhub.mih",
|
||||
);
|
||||
},
|
||||
),
|
||||
SpeedDialChild(
|
||||
child: Icon(
|
||||
Icons.apple,
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
),
|
||||
label: "iOS",
|
||||
labelBackgroundColor: MihColors.getGreenColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
labelStyle: TextStyle(
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
backgroundColor: MihColors.getGreenColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
onTap: () {
|
||||
shareMIHLink(
|
||||
context,
|
||||
"Check out the MIH app on the App Store",
|
||||
"https://apps.apple.com/za/app/mzansi-innovation-hub/id6743310890",
|
||||
);
|
||||
},
|
||||
),
|
||||
SpeedDialChild(
|
||||
child: Icon(
|
||||
Icons.store,
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
),
|
||||
label: "Huawei",
|
||||
labelBackgroundColor: MihColors.getGreenColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
labelStyle: TextStyle(
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
backgroundColor: MihColors.getGreenColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
onTap: () {
|
||||
shareMIHLink(
|
||||
context,
|
||||
"Check out the MIH app on the App Gallery",
|
||||
"https://appgallery.huawei.com/app/C113315335?pkgName=za.co.mzansiinnovationhub.mih",
|
||||
);
|
||||
},
|
||||
),
|
||||
SpeedDialChild(
|
||||
child: Icon(
|
||||
Icons.vpn_lock,
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
),
|
||||
label: "Web",
|
||||
labelBackgroundColor: MihColors.getGreenColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
labelStyle: TextStyle(
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
backgroundColor: MihColors.getGreenColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
onTap: () {
|
||||
shareMIHLink(
|
||||
context,
|
||||
"Check out the MIH app on the Web",
|
||||
"https://app.mzansi-innovation-hub.co.za/",
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
import 'package:mzansi_innovation_hub/main.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_button.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_single_child_scroll.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_tool_body.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.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 StatefulWidget {
|
||||
const MihPrivacyPolicy({super.key});
|
||||
|
||||
@override
|
||||
State<MihPrivacyPolicy> createState() => _MihPrivacyPolicyState();
|
||||
}
|
||||
|
||||
class _MihPrivacyPolicyState extends State<MihPrivacyPolicy> {
|
||||
bool englishOn = true;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MihPackageToolBody(
|
||||
borderOn: false,
|
||||
innerHorizontalPadding: 10,
|
||||
bodyItem: getBody(context),
|
||||
);
|
||||
}
|
||||
|
||||
Widget getBody(BuildContext context) {
|
||||
List<Widget> children = [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
MihButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
englishOn = !englishOn;
|
||||
});
|
||||
},
|
||||
buttonColor: MihColors.getGreenColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
elevation: 10,
|
||||
child: Text(
|
||||
englishOn ? "Simplified Chinese" : "English",
|
||||
style: TextStyle(
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
];
|
||||
children
|
||||
.addAll(PolicyAndTermsText().getPrivacyPolicyText(context, englishOn));
|
||||
return MihSingleChildScroll(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: children,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
import 'package:mzansi_innovation_hub/main.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_button.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_single_child_scroll.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_tool_body.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.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 StatefulWidget {
|
||||
const MIHTermsOfService({super.key});
|
||||
|
||||
@override
|
||||
State<MIHTermsOfService> createState() => _MIHTermsOfServiceState();
|
||||
}
|
||||
|
||||
class _MIHTermsOfServiceState extends State<MIHTermsOfService> {
|
||||
bool englishOn = true;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MihPackageToolBody(
|
||||
borderOn: false,
|
||||
innerHorizontalPadding: 10,
|
||||
bodyItem: getBody(context),
|
||||
);
|
||||
}
|
||||
|
||||
Widget getBody(BuildContext context) {
|
||||
List<Widget> children = [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
MihButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
englishOn = !englishOn;
|
||||
});
|
||||
},
|
||||
buttonColor: MihColors.getGreenColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
elevation: 10,
|
||||
child: Text(
|
||||
englishOn ? "Simplified Chinese" : "English",
|
||||
style: TextStyle(
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
];
|
||||
children
|
||||
.addAll(PolicyAndTermsText().getTermsOfServiceText(context, englishOn));
|
||||
return MihSingleChildScroll(
|
||||
child: Column(
|
||||
children: children,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user