stabaliose fingerprint code

This commit is contained in:
2024-11-01 11:58:01 +02:00
parent 1d1f8f7767
commit 8adfed3359
5 changed files with 37 additions and 82 deletions

View File

@@ -1,8 +1,10 @@
import 'package:flutter/material.dart';
//import 'package:fpjs_pro_plugin/error.dart';
import 'package:patient_manager/mih_env/env.dart';
import 'package:patient_manager/mih_router/routeGenerator.dart';
import 'package:patient_manager/mih_theme/mih_theme.dart';
import 'package:no_screenshot/no_screenshot.dart';
//import 'package:fpjs_pro_plugin/fpjs_pro_plugin.dart';
class MzanziInnovationHub extends StatefulWidget {
const MzanziInnovationHub({
@@ -48,6 +50,30 @@ class _MzanziInnovationHubState extends State<MzanziInnovationHub> {
});
}
// void doInit() async {
// print(
// "FpjsProPlugin.initFpjs Token: ${AppEnviroment.fingerPrintPluginKey}");
// await FpjsProPlugin.initFpjs(
// AppEnviroment.fingerPrintPluginKey, // insert your actual API key here
// endpoint: "https://mzansi-innovation-hub.co.za",
// scriptUrlPattern:
// 'https://mzansi-innovation-hub.co.za/web/v<version>/<apiKey>/loader_v<loaderVersion>.js',
// );
// identify();
// }
// void identify() async {
// try {
// var visitorId = await FpjsProPlugin.getVisitorId() ?? 'Unknown';
// print(visitorId);
// // use the visitor id
// } on FingerprintProError catch (e) {
// print("Error on Init: $e");
// // process an error somehow
// // check lib/error.dart to get more info about error types
// }
// }
@override
void initState() {
_themeMode = ThemeMode.dark;
@@ -58,6 +84,7 @@ class _MzanziInnovationHubState extends State<MzanziInnovationHub> {
}
theme.mode = "Dark";
super.initState();
//doInit();
}
@override

View File

@@ -4,6 +4,7 @@ enum Enviroment { dev, prod }
abstract class AppEnviroment {
static late String baseApiUrl;
static late String baseFileUrl;
static late String fingerPrintPluginKey;
static late Enviroment _enviroment;
static Enviroment get enviroment => _enviroment;
static setupEnv(Enviroment env) {
@@ -13,12 +14,14 @@ abstract class AppEnviroment {
{
baseApiUrl = "http://localhost:8080";
baseFileUrl = "http://localhost:9000";
//fingerPrintPluginKey = 'h5X7a5j14iUZCobI1ZeX';
break;
}
case Enviroment.prod:
{
baseApiUrl = "https://api.mzansi-innovation-hub.co.za";
baseFileUrl = "https://minio.mzansi-innovation-hub.co.za";
//fingerPrintPluginKey = 'h5X7a5j14iUZCobI1ZeX';
break;
}
}

View File

@@ -8,12 +8,10 @@ import Foundation
import app_links
import device_info_plus
import geolocator_apple
import google_sign_in_ios
import no_screenshot
import path_provider_foundation
import printing
import shared_preferences_foundation
import sign_in_with_apple
import syncfusion_pdfviewer_macos
import url_launcher_macos
@@ -21,12 +19,10 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AppLinksMacosPlugin.register(with: registry.registrar(forPlugin: "AppLinksMacosPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin"))
FLTGoogleSignInPlugin.register(with: registry.registrar(forPlugin: "FLTGoogleSignInPlugin"))
NoScreenshotPlugin.register(with: registry.registrar(forPlugin: "NoScreenshotPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
PrintingPlugin.register(with: registry.registrar(forPlugin: "PrintingPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SignInWithApplePlugin.register(with: registry.registrar(forPlugin: "SignInWithApplePlugin"))
SyncfusionFlutterPdfViewerPlugin.register(with: registry.registrar(forPlugin: "SyncfusionFlutterPdfViewerPlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
}

View File

@@ -504,14 +504,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.2"
google_identity_services_web:
dependency: transitive
description:
name: google_identity_services_web
sha256: "5be191523702ba8d7a01ca97c17fca096822ccf246b0a9f11923a6ded06199b6"
url: "https://pub.dev"
source: hosted
version: "0.3.1+4"
google_nav_bar:
dependency: "direct main"
description:
@@ -520,46 +512,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.0.6"
google_sign_in:
dependency: transitive
description:
name: google_sign_in
sha256: "0b8787cb9c1a68ad398e8010e8c8766bfa33556d2ab97c439fb4137756d7308f"
url: "https://pub.dev"
source: hosted
version: "6.2.1"
google_sign_in_android:
dependency: transitive
description:
name: google_sign_in_android
sha256: "5a47ebec9af97daf0822e800e4f101c3340b5ebc3f6898cf860c1a71b53cf077"
url: "https://pub.dev"
source: hosted
version: "6.1.28"
google_sign_in_ios:
dependency: transitive
description:
name: google_sign_in_ios
sha256: a058c9880be456f21e2e8571c1126eaacd570bdc5b6c6d9d15aea4bdf22ca9fe
url: "https://pub.dev"
source: hosted
version: "5.7.6"
google_sign_in_platform_interface:
dependency: transitive
description:
name: google_sign_in_platform_interface
sha256: "1f6e5787d7a120cc0359ddf315c92309069171306242e181c09472d1b00a2971"
url: "https://pub.dev"
source: hosted
version: "2.4.5"
google_sign_in_web:
dependency: transitive
description:
name: google_sign_in_web
sha256: "042805a21127a85b0dc46bba98a37926f17d2439720e8a459d27045d8ef68055"
url: "https://pub.dev"
source: hosted
version: "0.12.4+2"
gotrue:
dependency: transitive
description:
@@ -644,10 +596,10 @@ packages:
dependency: transitive
description:
name: js
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf
url: "https://pub.dev"
source: hosted
version: "0.6.7"
version: "0.7.1"
json_annotation:
dependency: transitive
description:
@@ -1032,30 +984,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.0"
sign_in_with_apple:
dependency: transitive
description:
name: sign_in_with_apple
sha256: "0975c23b9f8b30a80e27d5659a75993a093d4cb5f4eb7d23a9ccc586fea634e0"
url: "https://pub.dev"
source: hosted
version: "5.0.0"
sign_in_with_apple_platform_interface:
dependency: transitive
description:
name: sign_in_with_apple_platform_interface
sha256: c2ef2ce6273fce0c61acd7e9ff5be7181e33d7aa2b66508b39418b786cca2119
url: "https://pub.dev"
source: hosted
version: "1.1.0"
sign_in_with_apple_web:
dependency: transitive
description:
name: sign_in_with_apple_web
sha256: "44b66528f576e77847c14999d5e881e17e7223b7b0625a185417829e5306f47a"
url: "https://pub.dev"
source: hosted
version: "1.0.1"
sky_engine:
dependency: transitive
description: flutter
@@ -1137,10 +1065,10 @@ packages:
dependency: "direct main"
description:
name: supabase_auth_ui
sha256: d8bdfbe957b3028780c3074574b790588c48a4a75d895e95d63404ebf7686653
sha256: "9c12964ee213a0b6d5f26d4e7d5818a57df6a7060a7cf8a16bb54c4e5f46c666"
url: "https://pub.dev"
source: hosted
version: "0.4.4"
version: "0.4.1"
supabase_flutter:
dependency: "direct main"
description:

View File

@@ -29,6 +29,7 @@
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
<!-- Splash screen -->
<style id="splash-screen-style" defer>
html {
@@ -259,8 +260,8 @@
</body>
<!-- File Picker & PDF viewer -->
<script id="pdfjs-lib" src="//cdnjs.cloudflare.com/ajax/libs/pdf.js/3.2.146/pdf.min.js" defer></script>
<script id="pdfjs-worker" type="text/javascript"
src="//cdnjs.cloudflare.com/ajax/libs/pdf.js/3.2.146/pdf.worker.min.js" defer></script>
<script id="pdfjs-worker" type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/pdf.js/3.2.146/pdf.worker.min.js"
defer></script>
<!--------------------->
</html>