add App Store link for iOS users
This commit is contained in:
@@ -3,7 +3,6 @@ import 'package:mzansi_innovation_hub/mih_components/mih_inputs_and_buttons/mih_
|
|||||||
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_single_child_scroll.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_single_child_scroll.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_tile.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_tile.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih-app_tool_body.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih-app_tool_body.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_app_window.dart';
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
@@ -50,7 +49,12 @@ class _MihInfoState extends State<MihInfo> {
|
|||||||
);
|
);
|
||||||
} else if (isWebIos) {
|
} else if (isWebIos) {
|
||||||
//Show pop up for IOS
|
//Show pop up for IOS
|
||||||
_showIOSInstallationGuide();
|
// _showIOSInstallationGuide();
|
||||||
|
launchSocialUrl(
|
||||||
|
Uri.parse(
|
||||||
|
"https://apps.apple.com/za/app/mzansi-innovation-hub/id6743310890",
|
||||||
|
),
|
||||||
|
);
|
||||||
} else if (MzanziInnovationHub.of(context)!.theme.getPlatform() ==
|
} else if (MzanziInnovationHub.of(context)!.theme.getPlatform() ==
|
||||||
"Android") {
|
"Android") {
|
||||||
//Installed Android App
|
//Installed Android App
|
||||||
@@ -60,160 +64,166 @@ class _MihInfoState extends State<MihInfo> {
|
|||||||
"https://play.google.com/store/apps/details?id=za.co.mzansiinnovationhub.mih",
|
"https://play.google.com/store/apps/details?id=za.co.mzansiinnovationhub.mih",
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
} else if (MzanziInnovationHub.of(context)!.theme.getPlatform() == "iOS") {
|
||||||
|
launchSocialUrl(
|
||||||
|
Uri.parse(
|
||||||
|
"https://apps.apple.com/za/app/mzansi-innovation-hub/id6743310890",
|
||||||
|
),
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
//Web
|
//Web
|
||||||
js.context.callMethod("presentAddToHome");
|
js.context.callMethod("presentAddToHome");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _showIOSInstallationGuide() {
|
// void _showIOSInstallationGuide() {
|
||||||
double windowFontSize = 17.0;
|
// double windowFontSize = 17.0;
|
||||||
showDialog(
|
// showDialog(
|
||||||
context: context,
|
// context: context,
|
||||||
barrierDismissible: false,
|
// barrierDismissible: false,
|
||||||
builder: (context) {
|
// builder: (context) {
|
||||||
return MihAppWindow(
|
// return MihAppWindow(
|
||||||
fullscreen: false,
|
// fullscreen: false,
|
||||||
windowTitle: "MIH Installation Guide (iOS)",
|
// windowTitle: "MIH Installation Guide (iOS)",
|
||||||
windowTools: const [],
|
// windowTools: const [],
|
||||||
onWindowTapClose: () {
|
// onWindowTapClose: () {
|
||||||
Navigator.of(context).pop();
|
// Navigator.of(context).pop();
|
||||||
},
|
// },
|
||||||
windowBody: [
|
// windowBody: [
|
||||||
Align(
|
// Align(
|
||||||
alignment: Alignment.centerLeft,
|
// alignment: Alignment.centerLeft,
|
||||||
child: Text(
|
// child: Text(
|
||||||
"In order to install MIH on your iPhone, please follow the below steps:- ",
|
// "In order to install MIH on your iPhone, please follow the below steps:- ",
|
||||||
textAlign: TextAlign.left,
|
// textAlign: TextAlign.left,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color:
|
// color:
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
// MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
fontSize: windowFontSize,
|
// fontSize: windowFontSize,
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
const SizedBox(height: 10),
|
// const SizedBox(height: 10),
|
||||||
Align(
|
// Align(
|
||||||
alignment: Alignment.centerLeft,
|
// alignment: Alignment.centerLeft,
|
||||||
child: Text(
|
// child: Text(
|
||||||
"1. Launch MIH on Safari.",
|
// "1. Launch MIH on Safari.",
|
||||||
textAlign: TextAlign.left,
|
// textAlign: TextAlign.left,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color:
|
// color:
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
// MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
fontSize: windowFontSize,
|
// fontSize: windowFontSize,
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
const SizedBox(height: 10),
|
// const SizedBox(height: 10),
|
||||||
Align(
|
// Align(
|
||||||
alignment: Alignment.centerLeft,
|
// alignment: Alignment.centerLeft,
|
||||||
child: Text(
|
// child: Text(
|
||||||
"2. Tap the Share Button.",
|
// "2. Tap the Share Button.",
|
||||||
textAlign: TextAlign.left,
|
// textAlign: TextAlign.left,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color:
|
// color:
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
// MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
fontSize: windowFontSize,
|
// fontSize: windowFontSize,
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
const SizedBox(height: 10),
|
// const SizedBox(height: 10),
|
||||||
Align(
|
// Align(
|
||||||
alignment: Alignment.centerLeft,
|
// alignment: Alignment.centerLeft,
|
||||||
child: Text(
|
// child: Text(
|
||||||
"3. Scroll down and tap \"Add to Home Screen\".",
|
// "3. Scroll down and tap \"Add to Home Screen\".",
|
||||||
textAlign: TextAlign.left,
|
// textAlign: TextAlign.left,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color:
|
// color:
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
// MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
fontSize: windowFontSize,
|
// fontSize: windowFontSize,
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
const SizedBox(height: 10),
|
// const SizedBox(height: 10),
|
||||||
Align(
|
// Align(
|
||||||
alignment: Alignment.centerLeft,
|
// alignment: Alignment.centerLeft,
|
||||||
child: Text(
|
// child: Text(
|
||||||
"4. Choose a name for the shortcut (Optional).",
|
// "4. Choose a name for the shortcut (Optional).",
|
||||||
textAlign: TextAlign.left,
|
// textAlign: TextAlign.left,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color:
|
// color:
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
// MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
fontSize: windowFontSize,
|
// fontSize: windowFontSize,
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
const SizedBox(height: 10),
|
// const SizedBox(height: 10),
|
||||||
Align(
|
// Align(
|
||||||
alignment: Alignment.centerLeft,
|
// alignment: Alignment.centerLeft,
|
||||||
child: Text(
|
// child: Text(
|
||||||
"5. Tap \"Add\".",
|
// "5. Tap \"Add\".",
|
||||||
textAlign: TextAlign.left,
|
// textAlign: TextAlign.left,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color:
|
// color:
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
// MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
fontSize: windowFontSize,
|
// fontSize: windowFontSize,
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
const SizedBox(height: 10),
|
// const SizedBox(height: 10),
|
||||||
Align(
|
// Align(
|
||||||
alignment: Alignment.centerLeft,
|
// alignment: Alignment.centerLeft,
|
||||||
child: Text(
|
// child: Text(
|
||||||
"That's it! Now you can tap the MIH icon on your home screen to open it quickly.",
|
// "That's it! Now you can tap the MIH icon on your home screen to open it quickly.",
|
||||||
textAlign: TextAlign.left,
|
// textAlign: TextAlign.left,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color:
|
// color:
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
// MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
fontSize: windowFontSize,
|
// fontSize: windowFontSize,
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
const SizedBox(height: 10),
|
// const SizedBox(height: 10),
|
||||||
Align(
|
// Align(
|
||||||
alignment: Alignment.centerLeft,
|
// alignment: Alignment.centerLeft,
|
||||||
child: Text(
|
// child: Text(
|
||||||
"If you are still having trouble, please click on the button below to view a video guide.",
|
// "If you are still having trouble, please click on the button below to view a video guide.",
|
||||||
textAlign: TextAlign.left,
|
// textAlign: TextAlign.left,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
// color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
fontSize: windowFontSize,
|
// fontSize: windowFontSize,
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
const SizedBox(height: 15),
|
// const SizedBox(height: 15),
|
||||||
SizedBox(
|
// SizedBox(
|
||||||
width: 300,
|
// width: 300,
|
||||||
height: 50,
|
// height: 50,
|
||||||
child: MIHButton(
|
// child: MIHButton(
|
||||||
onTap: () {
|
// onTap: () {
|
||||||
launchSocialUrl(
|
// launchSocialUrl(
|
||||||
Uri.parse(
|
// Uri.parse(
|
||||||
"https://www.youtube.com/watch?v=KVK78IV28JY",
|
// "https://www.youtube.com/watch?v=KVK78IV28JY",
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
buttonText: "Video Guide",
|
// buttonText: "Video Guide",
|
||||||
buttonColor:
|
// buttonColor:
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
// MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
textColor:
|
// textColor:
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
// MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
Widget founderBio() {
|
Widget founderBio() {
|
||||||
String bio = "";
|
String bio = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user