Navigate to youtube for4 beginners guide and playstore for install mih

This commit is contained in:
2025-01-28 10:18:38 +02:00
parent 214fd555fc
commit 237421d8a4

View File

@@ -8,8 +8,9 @@ import '../../mih_components/mih_layout/mih_layout_builder.dart';
import '../../mih_components/mih_layout/mih_tile.dart'; import '../../mih_components/mih_layout/mih_tile.dart';
import '../../main.dart'; import '../../main.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import "package:universal_html/js.dart" as js; // import "package:universal_html/js.dart" as js;
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
// import 'dart:io' show Platform;
// import 'dart:html' as html; // import 'dart:html' as html;
class MIHAbout extends StatefulWidget { class MIHAbout extends StatefulWidget {
@@ -118,7 +119,7 @@ class _MIHAboutState extends State<MIHAbout> {
height: 50, height: 50,
child: MIHButton( child: MIHButton(
onTap: () { onTap: () {
js.context.callMethod("presentAddToHome"); installMihTrigger();
}, },
buttonText: "Install MIH", buttonText: "Install MIH",
buttonColor: buttonColor:
@@ -132,9 +133,11 @@ class _MIHAboutState extends State<MIHAbout> {
height: 50, height: 50,
child: MIHButton( child: MIHButton(
onTap: () { onTap: () {
// html.window.open( launchSocialUrl(
// 'https://www.youtube.com/playlist?list=PLuT35kJIui0H5kXjxNOZlHoOPZbQLr4qh', Uri.parse(
// 'new tab'); "https://www.youtube.com/playlist?list=PLuT35kJIui0H5kXjxNOZlHoOPZbQLr4qh",
),
);
}, },
buttonText: "MIH Beginners Guide", buttonText: "MIH Beginners Guide",
buttonColor: buttonColor:
@@ -171,6 +174,26 @@ class _MIHAboutState extends State<MIHAbout> {
); );
} }
void installMihTrigger() {
launchSocialUrl(
Uri.parse(
"https://play.google.com/store/apps/details?id=za.co.mzansiinnovationhub.mih",
),
);
// if (Platform.isAndroid) {
// launchSocialUrl(
// Uri.parse(
// "https://play.google.com/store/apps/details?id=za.co.mzansiinnovationhub.mih",
// ),
// );
// } else if (Platform.isIOS) {
// //Show Dialog
// } else {
// //Web
// // js.context.callMethod("presentAddToHome");
// }
}
Widget founderBio() { Widget founderBio() {
String bio = ""; String bio = "";
bio += "BSc Comnputer Science & Information Systems\n"; bio += "BSc Comnputer Science & Information Systems\n";