Enable android dev and prod

This commit is contained in:
2024-12-06 10:17:25 +02:00
parent 443eff9ed1
commit e67f1932fc
38 changed files with 57 additions and 43 deletions

View File

@@ -22,8 +22,14 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0' flutterVersionName = '1.0'
} }
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android { android {
namespace "com.example.patient_manager" namespace "za.co.mzansiinnovationhub.mih"
compileSdkVersion flutter.compileSdkVersion compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion ndkVersion flutter.ndkVersion
compileSdkVersion 34 compileSdkVersion 34
@@ -43,20 +49,30 @@ android {
defaultConfig { defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). // 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. // 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. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion minSdkVersion 24 //flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion targetSdkVersion 34 //flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
versionName flutterVersionName versionName flutterVersionName
} }
signingConfigs {
release {
keyAlias = keystoreProperties['keyAlias']
keyPassword = keystoreProperties['keyPassword']
storeFile = keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword = keystoreProperties['storePassword']
}
}
buildTypes { buildTypes {
release { release {
// TODO: Add your own signing config for the release build. // TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works. // 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 '../..' source '../..'
} }
dependencies {} dependencies {
implementation("com.google.android.material:material:<version>")
}

View File

@@ -1,4 +1,4 @@
package com.example.patient_manager package za.co.mzansiinnovationhub.mih
import io.flutter.embedding.android.FlutterActivity import io.flutter.embedding.android.FlutterActivity

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -23,7 +23,7 @@ pluginManagement {
plugins { plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0" 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" include ":app"

View File

@@ -1,11 +1,11 @@
# flutter pub run flutter_launcher_icons # flutter pub run flutter_launcher_icons
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" android: "launcher_icon"
# image_path_android: "assets/icon/icon.png" # image_path_android: "assets/icon/icon.png"
min_sdk_android: 21 # android min sdk min:16, default 21 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_foreground: "assets/icon/foreground.png"
# adaptive_icon_monochrome: "assets/icon/monochrome.png" # adaptive_icon_monochrome: "assets/icon/monochrome.png"

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -13,8 +13,8 @@ abstract class AppEnviroment {
switch (env) { switch (env) {
case Enviroment.dev: case Enviroment.dev:
{ {
baseApiUrl = "http://localhost:8080"; //"http://10.0.2.2:8080"; baseApiUrl = "http://10.0.2.2:8080"; //"http://localhost:8080";
baseFileUrl = "http://localhost:9000"; //"http://10.0.2.2:9000"; baseFileUrl = "http://10.0.2.2:9000"; //"http://localhost:9000";
whatsappAccessToken = whatsappAccessToken =
"EAAPINXuNFdYBOzBjTcvZA2iPXEHbHRF9uNXyP3ihkPRUcBqKNru5g9NKRRKkFaiaITEzO3BMo6CjdUmlDH4qYTW2mzDrZB4Q21ZCEZBgECZCu27vfaOXJZCYQLNxwoXkrZBRYv8ZAP37f69r3z9JxLQxdxn9gwqA3oNZAlBBRapJQzxOr6pZBTdI3bbjbu17ZBIwRcF4JCqPDCNLEZCI3bmHwEd2i2niNMYZD"; "EAAPINXuNFdYBOzBjTcvZA2iPXEHbHRF9uNXyP3ihkPRUcBqKNru5g9NKRRKkFaiaITEzO3BMo6CjdUmlDH4qYTW2mzDrZB4Q21ZCEZBgECZCu27vfaOXJZCYQLNxwoXkrZBRYv8ZAP37f69r3z9JxLQxdxn9gwqA3oNZAlBBRapJQzxOr6pZBTdI3bbjbu17ZBIwRcF4JCqPDCNLEZCI3bmHwEd2i2niNMYZD";
//fingerPrintPluginKey = 'h5X7a5j14iUZCobI1ZeX'; //fingerPrintPluginKey = 'h5X7a5j14iUZCobI1ZeX';

View File

@@ -1,4 +1,5 @@
import 'dart:async'; import 'dart:async';
import 'dart:convert';
// import 'dart:convert'; // import 'dart:convert';
import 'package:flutter/material.dart'; 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/screens/web.dart';
// import 'package:simple_barcode_scanner/simple_barcode_scanner.dart'; // import 'package:simple_barcode_scanner/simple_barcode_scanner.dart';
import '../../main.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 "package:universal_html/html.dart" as html;
import '../../mih_apis/mih_location_api.dart'; import '../../mih_apis/mih_location_api.dart';
@@ -949,27 +950,30 @@ class _MIHHomeState extends State<MIHHome> {
} }
Future<void> refreshNotifications() async { Future<void> refreshNotifications() async {
html.window.location.reload(); if (MzanziInnovationHub.of(context)!.theme.getPlatform() == "Web") {
// var responseNotification = await http.get(Uri.parse( html.window.location.reload();
// "$baseAPI/notifications/${widget.signedInUser.app_id}?amount=$amount")); } else {
// List<MIHNotification> notifi; var responseNotification = await http.get(Uri.parse(
// if (responseNotification.statusCode == 200) { "$baseAPI/notifications/${widget.signedInUser.app_id}?amount=$amount"));
// String body = responseNotification.body; List<MIHNotification> notifi;
// // var decodedData = jsonDecode(body); if (responseNotification.statusCode == 200) {
// // MIHNotification notifications = MIHNotification.fromJson(decodedData); String body = responseNotification.body;
// var decodedData = jsonDecode(body);
// MIHNotification notifications = MIHNotification.fromJson(decodedData);
// Iterable l = jsonDecode(body); Iterable l = jsonDecode(body);
// //print("Here2"); //print("Here2");
// List<MIHNotification> notifications = List<MIHNotification>.from( List<MIHNotification> notifications = List<MIHNotification>.from(
// l.map((model) => MIHNotification.fromJson(model))); l.map((model) => MIHNotification.fromJson(model)));
// notifi = notifications; notifi = notifications;
// } else { } else {
// notifi = []; notifi = [];
// } }
// setState(() { setState(() {
// notifiList = notifi; notifiList = notifi;
// }); });
// notificationPopUp(); notificationPopUp();
}
} }
void notificationPopUp() { void notificationPopUp() {

View File

@@ -387,14 +387,6 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" 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: flutter_launcher_icons:
dependency: "direct main" dependency: "direct main"
description: description:

View File

@@ -63,7 +63,7 @@ dependencies:
simple_barcode_scanner: ^0.2.5 simple_barcode_scanner: ^0.2.5
mobile_scanner: ^6.0.2 mobile_scanner: ^6.0.2
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
dev_dependencies: dev_dependencies:

View File

@@ -123,7 +123,7 @@ async def pull_File_from_user(app_id: str, folder: str, file_name: str, env: str
if(env == "Dev"): if(env == "Dev"):
return { return {
# 10.0.2.2 # 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: else:
return { return {