@@ -39,4 +39,22 @@
|
|||||||
android:name="flutterEmbedding"
|
android:name="flutterEmbedding"
|
||||||
android:value="2" />
|
android:value="2" />
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
<!-- Provide required visibility configuration for API level 30 and above -->
|
||||||
|
<queries>
|
||||||
|
<!-- If your app checks for SMS support -->
|
||||||
|
<intent>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
<data android:scheme="sms" />
|
||||||
|
</intent>
|
||||||
|
<!-- If your app checks for call support -->
|
||||||
|
<intent>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
<data android:scheme="tel" />
|
||||||
|
</intent>
|
||||||
|
<!-- If your application checks for inAppBrowserView launch mode support -->
|
||||||
|
<intent>
|
||||||
|
<action android:name="android.support.customtabs.action.CustomTabsService" />
|
||||||
|
</intent>
|
||||||
|
</queries>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>LSApplicationQueriesSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>sms</string>
|
||||||
|
<string>tel</string>
|
||||||
|
</array>
|
||||||
<key>NSCameraUsageDescription</key>
|
<key>NSCameraUsageDescription</key>
|
||||||
<string>Camera permission is required for barcode scanning.</string>
|
<string>Camera permission is required for barcode scanning.</string>
|
||||||
<key>NSLocationWhenInUseUsageDescription</key>
|
<key>NSLocationWhenInUseUsageDescription</key>
|
||||||
|
|||||||
@@ -194,7 +194,8 @@ class _MIHNotificationDrawerState extends State<MIHNotificationDrawer> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Drawer(
|
return SafeArea(
|
||||||
|
child: Drawer(
|
||||||
//backgroundColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
//backgroundColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
@@ -212,8 +213,9 @@ class _MIHNotificationDrawerState extends State<MIHNotificationDrawer> {
|
|||||||
child: Text(
|
child: Text(
|
||||||
"Notifications",
|
"Notifications",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color:
|
color: MzanziInnovationHub.of(context)!
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
.theme
|
||||||
|
.primaryColor(),
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
),
|
),
|
||||||
@@ -240,6 +242,7 @@ class _MIHNotificationDrawerState extends State<MIHNotificationDrawer> {
|
|||||||
// ),
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
));
|
)),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ 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 'dart:html' as html;
|
// import 'dart:html' as html;
|
||||||
|
|
||||||
class MIHAbout extends StatefulWidget {
|
class MIHAbout extends StatefulWidget {
|
||||||
@@ -20,6 +21,20 @@ class MIHAbout extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _MIHAboutState extends State<MIHAbout> {
|
class _MIHAboutState extends State<MIHAbout> {
|
||||||
|
final Uri _tiktokUrl =
|
||||||
|
Uri.parse('https://www.tiktok.com/@mzansi.innovation.hub');
|
||||||
|
final Uri _instagramUrl =
|
||||||
|
Uri.parse('https://www.instagram.com/mzansi.innovation.hub');
|
||||||
|
final Uri _whatsappUrl =
|
||||||
|
Uri.parse('https://whatsapp.com/channel/0029Vax3INCIyPtMn8KgeM2F');
|
||||||
|
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() {
|
MIHAction getActionButton() {
|
||||||
return MIHAction(
|
return MIHAction(
|
||||||
icon: const Icon(Icons.arrow_back),
|
icon: const Icon(Icons.arrow_back),
|
||||||
@@ -317,7 +332,7 @@ class _MIHAboutState extends State<MIHAbout> {
|
|||||||
// //bottom: height / 5,
|
// //bottom: height / 5,
|
||||||
// top: 20,
|
// top: 20,
|
||||||
),
|
),
|
||||||
// physics: ,
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
// shrinkWrap: true,
|
// shrinkWrap: true,
|
||||||
itemCount: getSocialsList().length,
|
itemCount: getSocialsList().length,
|
||||||
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
||||||
@@ -335,8 +350,7 @@ class _MIHAboutState extends State<MIHAbout> {
|
|||||||
List<Widget> socials = [];
|
List<Widget> socials = [];
|
||||||
socials.add(MIHTile(
|
socials.add(MIHTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// html.window
|
launchSocialUrl(_tiktokUrl);
|
||||||
// .open('https://www.tiktok.com/@mzansi.innovation.hub', 'new tab');
|
|
||||||
},
|
},
|
||||||
tileName: "TikTok",
|
tileName: "TikTok",
|
||||||
tileIcon: Center(
|
tileIcon: Center(
|
||||||
@@ -352,8 +366,7 @@ class _MIHAboutState extends State<MIHAbout> {
|
|||||||
//==================================================================
|
//==================================================================
|
||||||
socials.add(MIHTile(
|
socials.add(MIHTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// html.window
|
launchSocialUrl(_instagramUrl);
|
||||||
// .open('https://www.instagram.com/mzansi.innovation.hub', 'new tab');
|
|
||||||
},
|
},
|
||||||
tileName: "Instagram",
|
tileName: "Instagram",
|
||||||
tileIcon: Center(
|
tileIcon: Center(
|
||||||
@@ -369,8 +382,7 @@ class _MIHAboutState extends State<MIHAbout> {
|
|||||||
//==================================================================
|
//==================================================================
|
||||||
socials.add(MIHTile(
|
socials.add(MIHTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// html.window.open(
|
launchSocialUrl(_whatsappUrl);
|
||||||
// 'https://whatsapp.com/channel/0029Vax3INCIyPtMn8KgeM2F', 'new tab');
|
|
||||||
},
|
},
|
||||||
tileName: "Whatsapp",
|
tileName: "Whatsapp",
|
||||||
tileIcon: Center(
|
tileIcon: Center(
|
||||||
@@ -386,8 +398,7 @@ class _MIHAboutState extends State<MIHAbout> {
|
|||||||
//==================================================================
|
//==================================================================
|
||||||
socials.add(MIHTile(
|
socials.add(MIHTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// html.window
|
launchSocialUrl(_youtubeUrl);
|
||||||
// .open('https://www.youtube.com/@mzansiinnovationhub', 'new tab');
|
|
||||||
},
|
},
|
||||||
tileName: "YouTube",
|
tileName: "YouTube",
|
||||||
tileIcon: Center(
|
tileIcon: Center(
|
||||||
@@ -403,7 +414,7 @@ class _MIHAboutState extends State<MIHAbout> {
|
|||||||
//==================================================================
|
//==================================================================
|
||||||
socials.add(MIHTile(
|
socials.add(MIHTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// html.window.open('https://x.com/mzansi_inno_hub', 'new tab');
|
launchSocialUrl(_xUrl);
|
||||||
},
|
},
|
||||||
tileName: "X",
|
tileName: "X",
|
||||||
tileIcon: Center(
|
tileIcon: Center(
|
||||||
@@ -419,9 +430,7 @@ class _MIHAboutState extends State<MIHAbout> {
|
|||||||
//==================================================================
|
//==================================================================
|
||||||
socials.add(MIHTile(
|
socials.add(MIHTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// html.window.open(
|
launchSocialUrl(_linkedinUrl);
|
||||||
// 'https://www.linkedin.com/company/mzansi-innovation-hub/',
|
|
||||||
// 'new tab');
|
|
||||||
},
|
},
|
||||||
tileName: "LinkedIn",
|
tileName: "LinkedIn",
|
||||||
tileIcon: Center(
|
tileIcon: Center(
|
||||||
@@ -437,9 +446,7 @@ class _MIHAboutState extends State<MIHAbout> {
|
|||||||
//==================================================================
|
//==================================================================
|
||||||
socials.add(MIHTile(
|
socials.add(MIHTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// html.window.open(
|
launchSocialUrl(_facebookUrl);
|
||||||
// 'https://www.facebook.com/profile.php?id=61565345762136',
|
|
||||||
// 'new tab');
|
|
||||||
},
|
},
|
||||||
tileName: "FaceBook",
|
tileName: "FaceBook",
|
||||||
tileIcon: Center(
|
tileIcon: Center(
|
||||||
@@ -456,6 +463,12 @@ class _MIHAboutState extends State<MIHAbout> {
|
|||||||
return socials;
|
return socials;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> launchSocialUrl(Uri linkUrl) async {
|
||||||
|
if (!await launchUrl(linkUrl)) {
|
||||||
|
throw Exception('Could not launch $linkUrl');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
|
|||||||
@@ -103,10 +103,13 @@ class _BuildFileViewState extends State<BuildFileView> {
|
|||||||
iconSize: 35,
|
iconSize: 35,
|
||||||
padding: const EdgeInsets.all(0),
|
padding: const EdgeInsets.all(0),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
if (MzanziInnovationHub.of(context)!.theme.getPlatform() ==
|
||||||
|
"Web") {
|
||||||
html.window.open(
|
html.window.open(
|
||||||
widget.link,
|
widget.link,
|
||||||
// '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
// '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
||||||
'download');
|
'download');
|
||||||
|
} else {}
|
||||||
},
|
},
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.download,
|
Icons.download,
|
||||||
@@ -164,10 +167,17 @@ class _BuildFileViewState extends State<BuildFileView> {
|
|||||||
iconSize: 35,
|
iconSize: 35,
|
||||||
padding: const EdgeInsets.all(0),
|
padding: const EdgeInsets.all(0),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
if (MzanziInnovationHub.of(context)!.theme.getPlatform() ==
|
||||||
|
"Web") {
|
||||||
html.window.open(
|
html.window.open(
|
||||||
widget.link,
|
widget.link,
|
||||||
// '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
// '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
||||||
'download');
|
'download');
|
||||||
|
} else {}
|
||||||
|
// html.window.open(
|
||||||
|
// widget.link,
|
||||||
|
// // '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
||||||
|
// 'download');
|
||||||
},
|
},
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.download,
|
Icons.download,
|
||||||
|
|||||||
@@ -210,10 +210,12 @@ class _FullScreenFileViewerState extends State<FullScreenFileViewer> {
|
|||||||
iconSize: 30,
|
iconSize: 30,
|
||||||
padding: const EdgeInsets.all(0),
|
padding: const EdgeInsets.all(0),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
if (MzanziInnovationHub.of(context)!.theme.getPlatform() == "Web") {
|
||||||
html.window.open(
|
html.window.open(
|
||||||
widget.arguments.link,
|
widget.arguments.link,
|
||||||
// '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
// '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
||||||
'download');
|
'download');
|
||||||
|
} else {}
|
||||||
},
|
},
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.download,
|
Icons.download,
|
||||||
|
|||||||
@@ -1203,7 +1203,7 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.2"
|
version: "2.2.2"
|
||||||
url_launcher:
|
url_launcher:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: url_launcher
|
name: url_launcher
|
||||||
sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603"
|
sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603"
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 1.0.0+1
|
version: 1.0.0+2
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.2.4 <4.0.0'
|
sdk: '>=3.2.4 <4.0.0'
|
||||||
@@ -65,6 +65,7 @@ dependencies:
|
|||||||
flutter_launcher_icons: ^0.13.1
|
flutter_launcher_icons: ^0.13.1
|
||||||
# flutter_barcode_scanner: ^2.0.0
|
# flutter_barcode_scanner: ^2.0.0
|
||||||
barcode_widget: ^2.0.4
|
barcode_widget: ^2.0.4
|
||||||
|
url_launcher: ^6.3.1
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
Reference in New Issue
Block a user