Add Floating Menu on Mzansi Wallet & About MIH
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_inputs_and_buttons/mih_button.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_single_child_scroll.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_single_child_scroll.dart';
|
||||||
@@ -6,9 +7,11 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih-
|
|||||||
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';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_floating_menu.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.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 'package:share_plus/share_plus.dart';
|
||||||
|
|
||||||
class MihInfo extends StatefulWidget {
|
class MihInfo extends StatefulWidget {
|
||||||
const MihInfo({super.key});
|
const MihInfo({super.key});
|
||||||
@@ -581,6 +584,13 @@ class _MihInfoState extends State<MihInfo> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void shareMIHLink(BuildContext context, String message, String link) {
|
||||||
|
String shareText = "$message: $link";
|
||||||
|
Share.share(
|
||||||
|
shareText,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihAppToolBody(
|
return MihAppToolBody(
|
||||||
@@ -590,112 +600,196 @@ class _MihInfoState extends State<MihInfo> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget getBody() {
|
Widget getBody() {
|
||||||
return MihSingleChildScroll(
|
return Stack(
|
||||||
child: Column(
|
children: [
|
||||||
children: [
|
MihSingleChildScroll(
|
||||||
SizedBox(
|
child: Column(
|
||||||
width: 165,
|
children: [
|
||||||
child: FittedBox(
|
SizedBox(
|
||||||
child: Icon(
|
width: 165,
|
||||||
MihIcons.mihLogo,
|
child: FittedBox(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
child: Icon(
|
||||||
|
MihIcons.mihLogo,
|
||||||
|
color:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(
|
||||||
),
|
height: 10,
|
||||||
const SizedBox(
|
),
|
||||||
height: 10,
|
const Text(
|
||||||
),
|
"Mzansi Innovation Hub",
|
||||||
const Text(
|
style: TextStyle(
|
||||||
"Mzansi Innovation Hub",
|
fontWeight: FontWeight.bold,
|
||||||
style: TextStyle(
|
fontSize: 30,
|
||||||
fontWeight: FontWeight.bold,
|
),
|
||||||
fontSize: 30,
|
),
|
||||||
),
|
const Padding(
|
||||||
),
|
padding: EdgeInsets.symmetric(vertical: 10.0),
|
||||||
const Padding(
|
child: Divider(),
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.0),
|
),
|
||||||
child: Divider(),
|
// const SizedBox(
|
||||||
),
|
// height: 10,
|
||||||
// const SizedBox(
|
// ),
|
||||||
// height: 10,
|
Wrap(
|
||||||
// ),
|
alignment: WrapAlignment.start,
|
||||||
Wrap(
|
crossAxisAlignment: WrapCrossAlignment.start,
|
||||||
alignment: WrapAlignment.start,
|
spacing: 10,
|
||||||
crossAxisAlignment: WrapCrossAlignment.start,
|
runSpacing: 10,
|
||||||
spacing: 10,
|
children: [
|
||||||
runSpacing: 10,
|
ourVision(),
|
||||||
children: [
|
ourMission(),
|
||||||
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: getInstallButtonText(),
|
||||||
|
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(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(
|
),
|
||||||
height: 10,
|
Positioned(
|
||||||
),
|
right: 0,
|
||||||
Wrap(
|
bottom: 0,
|
||||||
alignment: WrapAlignment.start,
|
child: MihFloatingMenu(
|
||||||
crossAxisAlignment: WrapCrossAlignment.start,
|
icon: Icons.share,
|
||||||
spacing: 10,
|
|
||||||
runSpacing: 10,
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
width: 300,
|
|
||||||
height: 50,
|
|
||||||
child: MIHButton(
|
|
||||||
onTap: () {
|
|
||||||
installMihTrigger();
|
|
||||||
},
|
|
||||||
buttonText: getInstallButtonText(),
|
|
||||||
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: [
|
children: [
|
||||||
founderTitle(),
|
SpeedDialChild(
|
||||||
founderBio(),
|
child: Icon(
|
||||||
|
Icons.vpn_lock,
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
),
|
||||||
|
label: "MIH - Web",
|
||||||
|
labelBackgroundColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
|
labelStyle: TextStyle(
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
backgroundColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
|
onTap: () {
|
||||||
|
shareMIHLink(
|
||||||
|
context,
|
||||||
|
"Check out the MIH app on the Web",
|
||||||
|
"https://app.mzansi-innovation-hub.co.za/",
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
SpeedDialChild(
|
||||||
|
child: Icon(
|
||||||
|
Icons.apple,
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
),
|
||||||
|
label: "MIH - iOS",
|
||||||
|
labelBackgroundColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
|
labelStyle: TextStyle(
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
backgroundColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
|
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.android,
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
),
|
||||||
|
label: "MIH - Android",
|
||||||
|
labelBackgroundColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
|
labelStyle: TextStyle(
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
backgroundColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
|
onTap: () {
|
||||||
|
shareMIHLink(
|
||||||
|
context,
|
||||||
|
"Check out the MIH app on the Play Store",
|
||||||
|
"https://play.google.com/store/apps/details?id=za.co.mzansiinnovationhub.mih",
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const Padding(
|
)
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.0),
|
],
|
||||||
child: Divider(),
|
|
||||||
),
|
|
||||||
mihSocials(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -320,25 +320,30 @@ class _MihCardsState extends State<MihCards> {
|
|||||||
Positioned(
|
Positioned(
|
||||||
right: 0,
|
right: 0,
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
child: MihFloatingMenu(children: [
|
child: MihFloatingMenu(
|
||||||
SpeedDialChild(
|
animatedIcon: AnimatedIcons.menu_close,
|
||||||
child: Icon(
|
children: [
|
||||||
Icons.add,
|
SpeedDialChild(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
child: Icon(
|
||||||
),
|
Icons.add,
|
||||||
label: "Add",
|
color:
|
||||||
labelBackgroundColor:
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
),
|
||||||
labelStyle: TextStyle(
|
label: "Add Card",
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
labelBackgroundColor:
|
||||||
),
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
backgroundColor:
|
labelStyle: TextStyle(
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
color:
|
||||||
onTap: () {
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
addCardWindow(context);
|
fontWeight: FontWeight.bold,
|
||||||
},
|
),
|
||||||
)
|
backgroundColor:
|
||||||
]),
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
|
onTap: () {
|
||||||
|
addCardWindow(context);
|
||||||
|
},
|
||||||
|
)
|
||||||
|
]),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user