Enable android dev and prod
@@ -22,8 +22,14 @@ if (flutterVersionName == null) {
|
||||
flutterVersionName = '1.0'
|
||||
}
|
||||
|
||||
def keystoreProperties = new Properties()
|
||||
def keystorePropertiesFile = rootProject.file('key.properties')
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||
}
|
||||
|
||||
android {
|
||||
namespace "com.example.patient_manager"
|
||||
namespace "za.co.mzansiinnovationhub.mih"
|
||||
compileSdkVersion flutter.compileSdkVersion
|
||||
ndkVersion flutter.ndkVersion
|
||||
compileSdkVersion 34
|
||||
@@ -43,20 +49,30 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "com.example.patient_manager"
|
||||
applicationId "za.co.mzansiinnovationhub.mih"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||
minSdkVersion flutter.minSdkVersion
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
minSdkVersion 24 //flutter.minSdkVersion
|
||||
targetSdkVersion 34 //flutter.targetSdkVersion
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
keyAlias = keystoreProperties['keyAlias']
|
||||
keyPassword = keystoreProperties['keyPassword']
|
||||
storeFile = keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
|
||||
storePassword = keystoreProperties['storePassword']
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig signingConfigs.debug
|
||||
// signingConfig signingConfigs.debug
|
||||
signingConfig = signingConfigs.release
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -65,4 +81,6 @@ flutter {
|
||||
source '../..'
|
||||
}
|
||||
|
||||
dependencies {}
|
||||
dependencies {
|
||||
implementation("com.google.android.material:material:<version>")
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.example.patient_manager
|
||||
package za.co.mzansiinnovationhub.mih
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 14 KiB |
@@ -23,7 +23,7 @@ pluginManagement {
|
||||
|
||||
plugins {
|
||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||
id "com.android.application" version "7.3.0" apply false
|
||||
id "com.android.application" version "7.4.2" apply false
|
||||
}
|
||||
|
||||
include ":app"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# flutter pub run flutter_launcher_icons
|
||||
flutter_launcher_icons:
|
||||
image_path: "images/app_icon/mih_app_icon.png"
|
||||
image_path: "images/app_icon/App_Icon_2.png"
|
||||
|
||||
android: "launcher_icon"
|
||||
# image_path_android: "assets/icon/icon.png"
|
||||
min_sdk_android: 21 # android min sdk min:16, default 21
|
||||
# adaptive_icon_background: "assets/icon/background.png"
|
||||
adaptive_icon_background: "#3A4454"
|
||||
# adaptive_icon_foreground: "assets/icon/foreground.png"
|
||||
# adaptive_icon_monochrome: "assets/icon/monochrome.png"
|
||||
|
||||
|
||||
BIN
Frontend/images/app_icon/App_Icon.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
Frontend/images/app_icon/App_Icon_2.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
Frontend/images/app_icon/circle_logo.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 12 KiB |
@@ -13,8 +13,8 @@ abstract class AppEnviroment {
|
||||
switch (env) {
|
||||
case Enviroment.dev:
|
||||
{
|
||||
baseApiUrl = "http://localhost:8080"; //"http://10.0.2.2:8080";
|
||||
baseFileUrl = "http://localhost:9000"; //"http://10.0.2.2:9000";
|
||||
baseApiUrl = "http://10.0.2.2:8080"; //"http://localhost:8080";
|
||||
baseFileUrl = "http://10.0.2.2:9000"; //"http://localhost:9000";
|
||||
whatsappAccessToken =
|
||||
"EAAPINXuNFdYBOzBjTcvZA2iPXEHbHRF9uNXyP3ihkPRUcBqKNru5g9NKRRKkFaiaITEzO3BMo6CjdUmlDH4qYTW2mzDrZB4Q21ZCEZBgECZCu27vfaOXJZCYQLNxwoXkrZBRYv8ZAP37f69r3z9JxLQxdxn9gwqA3oNZAlBBRapJQzxOr6pZBTdI3bbjbu17ZBIwRcF4JCqPDCNLEZCI3bmHwEd2i2niNMYZD";
|
||||
//fingerPrintPluginKey = 'h5X7a5j14iUZCobI1ZeX';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
// import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -10,7 +11,7 @@ import 'package:mobile_scanner/mobile_scanner.dart';
|
||||
// import 'package:simple_barcode_scanner/screens/web.dart';
|
||||
// import 'package:simple_barcode_scanner/simple_barcode_scanner.dart';
|
||||
import '../../main.dart';
|
||||
// import 'package:supertokens_flutter/http.dart' as http;
|
||||
import 'package:supertokens_flutter/http.dart' as http;
|
||||
import "package:universal_html/html.dart" as html;
|
||||
|
||||
import '../../mih_apis/mih_location_api.dart';
|
||||
@@ -949,27 +950,30 @@ class _MIHHomeState extends State<MIHHome> {
|
||||
}
|
||||
|
||||
Future<void> refreshNotifications() async {
|
||||
html.window.location.reload();
|
||||
// var responseNotification = await http.get(Uri.parse(
|
||||
// "$baseAPI/notifications/${widget.signedInUser.app_id}?amount=$amount"));
|
||||
// List<MIHNotification> notifi;
|
||||
// if (responseNotification.statusCode == 200) {
|
||||
// String body = responseNotification.body;
|
||||
// // var decodedData = jsonDecode(body);
|
||||
// // MIHNotification notifications = MIHNotification.fromJson(decodedData);
|
||||
if (MzanziInnovationHub.of(context)!.theme.getPlatform() == "Web") {
|
||||
html.window.location.reload();
|
||||
} else {
|
||||
var responseNotification = await http.get(Uri.parse(
|
||||
"$baseAPI/notifications/${widget.signedInUser.app_id}?amount=$amount"));
|
||||
List<MIHNotification> notifi;
|
||||
if (responseNotification.statusCode == 200) {
|
||||
String body = responseNotification.body;
|
||||
// var decodedData = jsonDecode(body);
|
||||
// MIHNotification notifications = MIHNotification.fromJson(decodedData);
|
||||
|
||||
// Iterable l = jsonDecode(body);
|
||||
// //print("Here2");
|
||||
// List<MIHNotification> notifications = List<MIHNotification>.from(
|
||||
// l.map((model) => MIHNotification.fromJson(model)));
|
||||
// notifi = notifications;
|
||||
// } else {
|
||||
// notifi = [];
|
||||
// }
|
||||
// setState(() {
|
||||
// notifiList = notifi;
|
||||
// });
|
||||
// notificationPopUp();
|
||||
Iterable l = jsonDecode(body);
|
||||
//print("Here2");
|
||||
List<MIHNotification> notifications = List<MIHNotification>.from(
|
||||
l.map((model) => MIHNotification.fromJson(model)));
|
||||
notifi = notifications;
|
||||
} else {
|
||||
notifi = [];
|
||||
}
|
||||
setState(() {
|
||||
notifiList = notifi;
|
||||
});
|
||||
notificationPopUp();
|
||||
}
|
||||
}
|
||||
|
||||
void notificationPopUp() {
|
||||
|
||||
@@ -387,14 +387,6 @@ packages:
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_barcode_scanner:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_barcode_scanner
|
||||
sha256: a4ba37daf9933f451a5e812c753ddd045d6354e4a3280342d895b07fecaab3fa
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
flutter_launcher_icons:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
||||
@@ -63,7 +63,7 @@ dependencies:
|
||||
simple_barcode_scanner: ^0.2.5
|
||||
mobile_scanner: ^6.0.2
|
||||
flutter_launcher_icons: ^0.13.1
|
||||
flutter_barcode_scanner: ^2.0.0
|
||||
# flutter_barcode_scanner: ^2.0.0
|
||||
barcode_widget: ^2.0.4
|
||||
|
||||
dev_dependencies:
|
||||
|
||||
@@ -123,7 +123,7 @@ async def pull_File_from_user(app_id: str, folder: str, file_name: str, env: str
|
||||
if(env == "Dev"):
|
||||
return {
|
||||
# 10.0.2.2
|
||||
"minioURL": f"http://localhost:9000/mih/{app_id}/{folder}/{file_name}",
|
||||
"minioURL": f"http://10.0.2.2:9000/mih/{app_id}/{folder}/{file_name}",#"http://localhost:9000/mih/{app_id}/{folder}/{file_name}",
|
||||
}
|
||||
else:
|
||||
return {
|
||||
|
||||