diff --git a/android/app/build.gradle b/android/app/build.gradle index 4a9605d9..5136988a 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -222,8 +222,9 @@ dependencies { implementation 'com.google.android.material:material:1.9.0' implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.22' androidTestImplementation "androidx.test:core:1.4.0" - implementation 'com.airbnb.android:lottie:5.2.0' - implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.22' +// implementation 'com.airbnb.android:lottie:5.2.0' +// implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.22' + implementation 'com.whatsapp.otp:whatsapp-otp-android-sdk:0.1.0' implementation 'com.whatsapp.otp:whatsapp-otp-android-sdk:0.1.0' diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 2856e8f1..e216dae5 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,51 +1,82 @@ + - - - - - - - - - - - - - - - - + FlutterApplication and put your custom class here. + --> + + + + + + + + + + + + + - - - - + + - + - - + + - + - + - - + + + + @@ -53,106 +84,146 @@ - - - - - + + - - - - - - - + + + + + + + + + + + + android:icon="@mipmap/ic_launcher_local" + android:label="Dr. Alhabib" + android:screenOrientation="sensorPortrait" + android:showOnLockScreen="true" + android:usesCleartextTraffic="true" + tools:replace="android:extractNativeLibs,android:label"> + + + + + + + - - + to determine the Window background behind the Flutter UI. + --> - + Flutter's first frame. + --> + + + - + + + + + + + + - - - - - - - - - - - + + - - + + - + - + - - + - - - + + + - + @@ -168,26 +239,17 @@ - - - - - - - + + + - - - - - - - - - + \ No newline at end of file diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/MainActivity.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/MainActivity.kt index df41e342..c874ea4d 100644 --- a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/MainActivity.kt +++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/MainActivity.kt @@ -1,4 +1,5 @@ package com.ejada.hmg +import android.app.PendingIntent import android.content.Intent import android.content.pm.PackageManager import android.os.Build @@ -7,10 +8,14 @@ import android.view.WindowManager import androidx.annotation.NonNull; import androidx.annotation.RequiresApi import com.cloud.diplomaticquarterapp.PenguinInPlatformBridge +import com.cloud.diplomaticquarterapp.whatsapp.AppSignatureRetriever import com.ejada.hmg.utils.* import io.flutter.embedding.android.FlutterFragmentActivity import io.flutter.embedding.engine.FlutterEngine import io.flutter.plugins.GeneratedPluginRegistrant +import com.cloud.diplomaticquarterapp.whatsapp.WhatsApp +import com.cloud.diplomaticquarterapp.whatsapp.WhatsAppOtpPlatformBridge + class MainActivity: FlutterFragmentActivity() { @RequiresApi(Build.VERSION_CODES.O) @@ -22,8 +27,9 @@ class MainActivity: FlutterFragmentActivity() { PlatformBridge(flutterEngine, this).create() OpenTokPlatformBridge(flutterEngine, this).create() PenguinInPlatformBridge(flutterEngine, this).create() - -// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + WhatsAppOtpPlatformBridge(flutterEngine, this).invoke() + AppSignatureRetriever().logSignatures(this) +// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {x // val mChannel = NotificationChannel("video_call_noti", "video call", NotificationManager.IMPORTANCE_HIGH) // val soundUri = Uri.parse("android.resource://" + getApplicationContext() // .getPackageName() + "/" + R.raw.alert) diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/whatsapp/AppSignatureRetriever.java b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/whatsapp/AppSignatureRetriever.java new file mode 100644 index 00000000..83e6e917 --- /dev/null +++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/whatsapp/AppSignatureRetriever.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package com.cloud.diplomaticquarterapp.whatsapp; + +import static java.sql.DriverManager.println; + +import android.content.Context; +import android.content.ContextWrapper; +import android.content.pm.PackageManager; +import android.content.pm.Signature; +import android.util.Base64; +import java.nio.charset.StandardCharsets; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.Arrays; +import java.util.Collection; +import java.util.stream.Collectors; + +public class AppSignatureRetriever { + + private static final String HASH_TYPE = "SHA-256"; + public static final int NUM_HASHED_BYTES = 9; + public static final int NUM_BASE64_CHAR = 11; + + + public void logSignatures(Context context) { + Collection appSignatures = getAppSignatures(context); + appSignatures.forEach(signature -> println("Signature: " + signature)); + } + + /** + * Get all the app signatures for the current package. + * + * @return signatures for current app + */ + public Collection getAppSignatures(Context context) { + try { + // Get all package signatures for the current package + String packageName = context.getPackageName(); + println("Package name: " + packageName); + PackageManager packageManager = context.getPackageManager(); + Signature[] signatures = packageManager.getPackageInfo(packageName, + PackageManager.GET_SIGNATURES).signatures; + + // For each signature create a compatible hash + Collection appCodes = Arrays.stream(signatures) + .map(signature -> hash(packageName, signature.toCharsString())) + .collect(Collectors.toList()); + return appCodes; + } catch (PackageManager.NameNotFoundException e) { + println("Unable to find package to obtain hash."); + throw new RuntimeException("Unable to find package to obtain hash.", e); + } + + } + + private String hash(String packageName, String signature) { + String appInfo = packageName + " " + signature; + try { + MessageDigest messageDigest = MessageDigest.getInstance(HASH_TYPE); + messageDigest.update(appInfo.getBytes(StandardCharsets.UTF_8)); + byte[] hashSignature = messageDigest.digest(); + + // truncated into NUM_HASHED_BYTES + hashSignature = Arrays.copyOfRange(hashSignature, 0, NUM_HASHED_BYTES); + // encode into Base64 + String base64Hash = Base64.encodeToString(hashSignature, Base64.NO_PADDING | Base64.NO_WRAP); + base64Hash = base64Hash.substring(0, NUM_BASE64_CHAR); + + println(String.format("pkg: %s -- hash: %s", packageName, base64Hash)); + return base64Hash; + } catch (NoSuchAlgorithmException e) { + throw new RuntimeException("Unable to generate hash for application", e); + } + } +} diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/whatsapp/WhatsApp.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/whatsapp/WhatsApp.kt index 6d16745d..73452e6f 100644 --- a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/whatsapp/WhatsApp.kt +++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/whatsapp/WhatsApp.kt @@ -14,7 +14,11 @@ object WhatsApp { intent, // call your function to validate {code -> validateOTP(code) }, - {_,_->}) + {error,exception-> + println("the error is ${error.name}") + println("the exception stacktrace is ${exception.message}") + println("the exception is cause ${exception.cause}") + }) fun performHandShake(context : WeakReference) = whatsAppOtpHandler.sendOtpIntentToWhatsApp(context.get()!!) diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/whatsapp/WhatsAppCodeActivity.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/whatsapp/WhatsAppCodeActivity.kt new file mode 100644 index 00000000..8e86ec97 --- /dev/null +++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/whatsapp/WhatsAppCodeActivity.kt @@ -0,0 +1,17 @@ +package com.ejada.hmg +import android.app.PendingIntent +import android.content.Intent +import android.os.Bundle +import com.cloud.diplomaticquarterapp.whatsapp.WhatsApp +import com.cloud.diplomaticquarterapp.whatsapp.WhatsAppOtpPlatformBridge +import io.flutter.embedding.android.FlutterFragmentActivity + +class WhatsAppCodeActivity : FlutterFragmentActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + WhatsApp.handleOTP(intent){code -> + WhatsAppOtpPlatformBridge.result?.success(code); + finish() + } + } +} \ No newline at end of file diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/whatsapp/WhatsAppOtpPlatformBridge.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/whatsapp/WhatsAppOtpPlatformBridge.kt new file mode 100644 index 00000000..a03584ae --- /dev/null +++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/whatsapp/WhatsAppOtpPlatformBridge.kt @@ -0,0 +1,52 @@ +package com.cloud.diplomaticquarterapp.whatsapp + +import android.os.Build +import android.util.Log +import androidx.annotation.RequiresApi +import com.cloud.diplomaticquarterapp.penguin.PenguinView +import com.ejada.hmg.MainActivity +import io.flutter.embedding.engine.FlutterEngine +import io.flutter.plugin.common.MethodCall +import io.flutter.plugin.common.MethodChannel +import java.lang.ref.WeakReference + +class WhatsAppOtpPlatformBridge( + private var flutterEngine: FlutterEngine, + private var mainActivity: MainActivity +) { + + + private lateinit var channel: MethodChannel + + companion object { + private const val CHANNEL = "whats_app_otp" + var result: MethodChannel.Result? = null + } + + fun invoke() { + channel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL) + channel.setMethodCallHandler { call: MethodCall, result: MethodChannel.Result -> + when (call.method) { + "isWhatsAppInstalled" -> { + val isAppInstalled = + WhatsApp.isWhatsAppInstalled(WeakReference(mainActivity)) + result.success(isAppInstalled) + } + + "performHandShake" -> { + WhatsApp.performHandShake(WeakReference(mainActivity)) + } + + + "startListening" -> { + WhatsAppOtpPlatformBridge.result = result + } + + else -> { + result.notImplemented() + } + + } + } + } +} \ No newline at end of file diff --git a/android/app/src/main/res/layout/activity_whats_app_code.xml b/android/app/src/main/res/layout/activity_whats_app_code.xml new file mode 100644 index 00000000..95bd5d8b --- /dev/null +++ b/android/app/src/main/res/layout/activity_whats_app_code.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_local.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_local.png index 348b5116..3effaa49 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher_local.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_local.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_local.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_local.png index 410b1b1e..a14702e4 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher_local.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_local.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_local.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_local.png index bb9943af..41d6ecdf 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_local.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_local.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_local.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_local.png index 0b9d9359..59c05fd3 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_local.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_local.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_local.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_local.png index aaa9808d..d15b9a41 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_local.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_local.png differ diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index 1093435a..6c4ac3df 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -1,23 +1,23 @@ - HMG Patient App + HMG Patient App - + Unknown error: the Geofence service is not available now. - + Geofence service is not available now. Go to Settings>Location>Mode and choose High accuracy. - + Your app has registered too many geofences. - + You have provided too many PendingIntents to the addGeofences() call. - + App do not have permission to access location service. - + Geofence requests happened too frequently. - sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg + sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg diff --git a/assets/images/new/facial-recognition.svg b/assets/images/new/facial-recognition.svg new file mode 100644 index 00000000..ff2069ab --- /dev/null +++ b/assets/images/new/facial-recognition.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/images/new/vida_logo.png b/assets/images/new/vida_logo.png new file mode 100644 index 00000000..4ac19787 Binary files /dev/null and b/assets/images/new/vida_logo.png differ diff --git a/ios/Podfile b/ios/Podfile index 20d442dc..dec2c9fd 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -28,7 +28,6 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe flutter_ios_podfile_setup target 'Runner' do -# use_frameworks! use_frameworks! :linkage => :static use_modular_headers! diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 2c0073ff..1e22d14a 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -600,7 +600,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.5.991; + MARKETING_VERSION = 4.5.998; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -751,7 +751,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.5.991; + MARKETING_VERSION = 4.5.998; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -794,7 +794,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.5.991; + MARKETING_VERSION = 4.5.998; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/lib/config/config.dart b/lib/config/config.dart index 1c7cd0eb..15ce7aff 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -697,10 +697,10 @@ var GET_PATIENT_OCCUPATION_LIST = 'Services/Authentication.svc/REST/GetPatientOc //PAYFORT var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails"; var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse"; -var payFortEnvironment = FortEnvironment.production; -var applePayMerchantId = "merchant.com.hmgwebservices"; -// var payFortEnvironment = FortEnvironment.test; -// var applePayMerchantId = "merchant.com.hmgwebservices.uat"; +// var payFortEnvironment = FortEnvironment.production; +// var applePayMerchantId = "merchant.com.hmgwebservices"; +var payFortEnvironment = FortEnvironment.test; +var applePayMerchantId = "merchant.com.hmgwebservices.uat"; class AppGlobal { static var context; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 60db6024..8a15c641 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -2,23 +2,23 @@ // Used for Native through Platform Method Channel // --------- - -- - - - - - - - - ---------------- const Map platformLocalizedValues = { - "errorConnectingHmgNetwork": {"en": "Sorry you are not connecting to HMG network", "ar": "نعتذر لست متصل في شكبة مستشفى د.سليمان الحبيب"}, - "successConnectingHmgNetwork": {"en": "You connected to HMG network successfully, you can access the app", "ar": "تم التصال بشبكة د.سليمان الحبيب بنجاح, تستطيع الان استخدام تطبيق الحبيب"}, + "errorConnectingHmgNetwork": {"en": "Sorry you are not connecting to network", "ar": "نعتذر لست متصل في شكبة مستشفى د.سليمان الحبيب"}, + "successConnectingHmgNetwork": {"en": "You connected to network successfully, you can access the app", "ar": "تم التصال بشبكة د.سليمان الحبيب بنجاح, تستطيع الان استخدام تطبيق الحبيب"}, "failedConnectingHmgNetwork": { - "en": "Sorry the connection to HMG network had been failed, make sure you are in range of HMG network", + "en": "Sorry the connection to network had been failed, make sure you are in range of network", "ar": "نعتذر لقد فشل الاتصال بشبكة د.سليمان الحبيب, تاكد من وجودك داخل نطاق الشبكة" }, - "alreadyConnectedHmgNetwork": {"en": " You already connected to HMG network to access Alhabib app", "ar": "انت متصل مسبقاً بالشبكة تستطيع استخدام تطبيق الحبيب"}, + "alreadyConnectedHmgNetwork": {"en": " You already connected to network to access Alhabib app", "ar": "انت متصل مسبقاً بالشبكة تستطيع استخدام تطبيق الحبيب"}, "somethingWentWrong": {"en": "Sorry something went wrong please try again later", "ar": "نعتذر لخدمتكم يرجى المحاولة لاحقا"}, "enablingWifi": {"en": "Enabling wifi...", "ar": "Enabling wifi..."}, - "connectedHmgNetworkWithInternet": {"en": "Successfully connected to the HMG network to access internet", "ar": "Successfully connected to the HMG network to access internet"}, + "connectedHmgNetworkWithInternet": {"en": "Successfully connected to the network to access internet", "ar": "Successfully connected to the HMG network to access internet"}, "connectedToHmgNetworkWithNoInternet": { - "en": "Successfully connected to the HMG network but it have no internet access", - "ar": "Successfully connected to the HMG network but it have no internet access" + "en": "Successfully connected to the network but it have no internet access", + "ar": "Successfully connected to the network but it have no internet access" }, "notConnectedToHmgNetworkSecurityIssue": { - "en": "We are not able to connect you to HMG network due to security reasons", - "ar": "We are not able to connect you to HMG network due to security reasons" + "en": "We are not able to connect you to network due to security reasons", + "ar": "We are not able to connect you to network due to security reasons" } }; @@ -123,9 +123,9 @@ const Map localizedValues = { "welcome": {"en": "Welcome", "ar": "مرحبا بكم"}, "welcome-to": {"en": "Welcome to", "ar": "مرحبا بك في"}, "patient-app": {"en": "Patient App", "ar": "تطبيق المراجعين"}, - "welcome_text": {"en": "Dr. Sulaiman Al Habib Mobile Application", "ar": "الدكتور سليمان الحبيب لتطبيقات الهاتف"}, - "dr-sulaiman-text": {"en": "Dr. Sulaiman Al Habib", "ar": "د. سليمان الحبيب"}, - 'welcome_text2': {'en': 'Have you previously visited the hospitals or medical centers of Dr. Sulaiman Al Habib?', 'ar': 'هل قمت مسبقا بزيارة مستشفيات او مراكز الدكتور سليمان الحبيب الطبية ؟'}, + "welcome_text": {"en": "Vida Mobile Application", "ar":"تطبيق فيدا للموبايل"}, + "dr-sulaiman-text": {"en": "Vida Mobile Application", "ar": "تطبيق فيدا للموبايل"}, + 'welcome_text2': {'en': 'Have you previously visited the hospitals or medical centers?', 'ar': "هل سبق لك زيارة المستشفيات أو المراكز الطبية؟"}, 'yes': {'en': 'Yes', 'ar': 'نعم'}, 'no': {'en': 'No', 'ar': 'لا'}, "logintyperadio": {"en": " Choose from the below options to login to your medical file.", "ar": " اختر احدى الخيارات أدناه لتسجيل الدخول إلى ملفك الطبي "}, @@ -279,7 +279,7 @@ const Map localizedValues = { "OnlinePaymentService": {"en": "Online Payment Service", 'ar': 'خدمة الدفع الإلكتروني'}, "OffersAndPackages": {"en": "Online transfer request", 'ar': 'طلب التحويل الالكتروني'}, "ComprehensiveMedicalCheckup": {"en": "Comprehensive Medical Check-up", 'ar': 'فحص طبي شامل'}, - "HMGService": {"en": "HMG Service", 'ar': 'الخدمات الإلكترونية'}, + "HMGService": {"en": "Our Service", 'ar': 'الخدمات الإلكترونية'}, "ViewAllHabibMedicalService": {"en": "View All Habib Medical Service", 'ar': 'عرض خدمات الحبيب الطبية'}, "viewAll": {"en": "View All", 'ar': 'عرض الكل'}, "view": {"en": "View", 'ar': 'عرض'}, @@ -298,13 +298,13 @@ const Map localizedValues = { "logs": {"en": "Logs", "ar": "السجلات"}, "textToSpeech": {"en": "How May I Help You?", "ar": "كيف يمكنني مساعدتك؟"}, "locationDialogMessage": { - "en": "Allow the HMG app to access your location will assist you in showing the hospitals according to the nearest to you.", + "en": "Allow the app to access your location will assist you in showing the hospitals according to the nearest to you.", "ar": "السماح لتطبيق مجموعة الحبيب الطبية بالوصول إلى موقعك سيساعدك في إظهار المستشفيات وفقًا للأقرب إليك." }, "user-view-requester": {"en": "User Wants to View Your Medical File", "ar": "أشخاص يرغبون في الاطلاع على ملفك الطبي"}, "user-view": {"en": "User Can View Your Medical File", "ar": "أشخاص مصرح لهم الاطلاع على ملفك الطبي"}, "parking": {"en": "Parking", "ar": "مواقف"}, - "alhabiServices": {"en": "HMG Service", "ar": "خدمات الحبيب"}, + "alhabiServices": {"en": "Our Service", "ar": "خدمات الحبيب"}, "parkingTitle": { "en": "Car service, car service, service to save parking information, return to it later, 1- By clicking on (Read the code), save the parking data. 2- By clicking on the button (view my car park), it shows you the car’s location in Google Maps. 3- Read another position by pressing the Clear Position Data button.", @@ -824,7 +824,7 @@ const Map localizedValues = { "Feedback": {"en": "Feedback", "ar": "رأيك يهمنا"}, "LiveChat": {"en": "Live Chat", "ar": "محادثة مباشرة"}, "Service": {"en": "Service", "ar": "خدمة"}, - "HMGServiceLabel": {"en": "HMG Service", 'ar': 'خدمات الحبيب'}, + "HMGServiceLabel": {"en": "Our Service", 'ar': 'خدمات الحبيب'}, "HealthWeatherIndicators": {"en": "Health Weather Indicators", 'ar': ' مؤشرات الطقس الصحية '}, "HealthTipsBasedOnCurrentWeather": {"en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية بناءاً على الطقس الحالي '}, "MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "}, @@ -889,12 +889,12 @@ const Map localizedValues = { "blood-instruction": {"en": "Enter the required information, in order to register for Blood Donation Service", "ar": "ادخل المعلومات المطلوبة للتسجيل بخدمة التبرع بالدم"}, "view-terms": {"en": "To view the terms and conditions", "ar": "عرض الشروط والأحكام"}, "wantConnectHmgNetwork": { - "en": "Dear customer there is no internet access, do you want to connect with HMG network to use our app, make sure you are in range of HMG network", + "en": "Dear customer there is no internet access, do you want to connect with network to use our app, make sure you are in range of network", "ar": "عزيز العميل لا يوجد اتصال بالإنترنت, هل تريد الاتصال بشبكة مستشفى د. سليمان الحبيب لاستخدام التطبيق. يجب عليك ان تكون في نطاق شبكة المستشفى" }, - "failedToAccessHmgServices": {"en": "Connected with HMG Network,\n\nBut failed to access HMG services", "ar": "Connected with HMG Network,\n\nBut failed to access HMG services"}, + "failedToAccessHmgServices": {"en": "Connected with Network,\n\nBut failed to access services", "ar": "Connected with Network,\n\nBut failed to access services"}, "offerAndPackages": {"en": "Offers and Packages", "ar": "العروض والباقات"}, - "offerAndPackagesDetails": {"en": "This service allows you to view all HMG Offers:", "ar": "This service allows you to view all HMG Offers:"}, + "offerAndPackagesDetails": {"en": "This service allows you to view all Offers:", "ar": "This service allows you to view all Offers:"}, "InvoiceNo": {"en": "Invoice No", "ar": "رقم الفاتورة"}, "InvoiceDate": {"en": "Invoice Date", "ar": "تاريخ الفاتورة"}, "SpecialResult": {"en": " Special Result", "ar": "نتيجة خاصة"}, @@ -1008,7 +1008,7 @@ const Map localizedValues = { "waterTracker": {"en": "Water Tracker", "ar": "حساب كمية الماء"}, "h2o": {"en": "H2O", "ar": "استهلاك"}, "v-tour": {"en": "Virtual Tour", "ar": "جولة إفتراضية"}, - "hmg-news": {"en": "HMG News", "ar": "أخبار المجموعة"}, + "hmg-news": {"en": " News", "ar": "أخبار المجموعة"}, "blood-d": {"en": "Blood Donation", "ar": "تبرع بالدم"}, "symptomCheckerTitle": {"en": "Symptom Checker", "ar": "مدقق الأعراض"}, "latest-news": {"en": "Latest News", "ar": "أحدث الأخبار"}, @@ -1335,9 +1335,9 @@ const Map localizedValues = { "please_select_gender": {"en": "Please select gender", "ar": "يرجى تحديد الجنس"}, "covid-info": { "en": - "Dr. Sulaiman Al Habib hospitals are conducting a test for the emerging corona virus and issuing travel certificates 24/7 in a short time and with high accuracy. Those wishing to benefit from this service can visit one of Dr. Sulaiman Al Habib branches to conduct a corona test within few minutes, and obtain the result within several hours. Corona Virus Covid 19 testing service with PCR technology to detect the virus according to the highest international standards and with the latest high-precision RT-PCR devices (American GeneXpert and others), That is approved by the Food and Drug Authority as well as by the Saudi Center for Infectious Diseases Prevention.", + "Hospitals are conducting a test for the emerging corona virus and issuing travel certificates 24/7 in a short time and with high accuracy. Those wishing to benefit from this service can visit one of branches to conduct a corona test within few minutes, and obtain the result within several hours. Corona Virus Covid 19 testing service with PCR technology to detect the virus according to the highest international standards and with the latest high-precision RT-PCR devices (American GeneXpert and others), That is approved by the Food and Drug Authority as well as by the Saudi Center for Infectious Diseases Prevention.", "ar": - "تجري مستشفيات د. سليمان الحبيب فحص فيروس كورونا المستجد وتصدر شهادات السفر على مدار الساعة، طوال أيام الأسبوع، وبسرعة ودقة عالية. يمكن للراغبين في الاستفادة من هذه الخدمة زيارة أحد فروع مستشفيات د. سليمان الحبيب وإجراء فحص كورونا خلال بضع دقائق والحصول على النتائج خلال عدة ساعات خدمة فحص فيروس كورونا Covid 19 بتقنية PCR للكشف عن الفيروس وفقاً لأعلى المعايير العالمية وبأحدث أجهزة RT-PCR عالية الدقة (GeneXpert الأمريكي وغيره)، وهي طرق معتمدة من قبل هيئة الغذاء والدواء وكذلك من قبل المركز السعودي للوقاية من الأمراض المُعدية" + "تقوم المستشفيات بإجراء فحص فيروس كورونا المستجد وإصدار شهادات السفر على مدار الساعة وطوال أيام الأسبوع في وقت قصير وبدقة عالية، ويمكن للراغبين في الاستفادة من هذه الخدمة زيارة أحد الفروع لإجراء فحص كورونا خلال دقائق معدودة، والحصول على النتيجة خلال عدة ساعات. خدمة فحص فيروس كورونا كوفيد 19 بتقنية PCR للكشف عن الفيروس وفق أعلى المعايير العالمية وبأحدث أجهزة RT-PCR عالية الدقة (جينيكسبرت الأمريكية وغيرها)، المعتمدة من هيئة الغذاء والدواء وكذلك من المركز السعودي للوقاية من الأمراض المعدية." }, "select-appo": {"en": "Kindly select one of the available appointments from below:", "ar": " يرجى اختيار أحد المواعيد المتاحة مما يلي:"}, "covid-alert-header": {"en": "Pay With-in 15 mins to confirm the appointment", "ar": "الرجاء اتمام عملية الدفع خلال 15 دقيقه لتاكيد الموعد"}, @@ -1425,9 +1425,9 @@ const Map localizedValues = { "type": {"en": "Type", "ar": "اكتب"}, "info-ereferral": { "en": - "This service allows you to submit a Referral request from any health care providers either inside or outside the kingdom of Saudi Arabia to any of HMG Hospitals, by filling some of the patient's data and attaching the medical reports, moreover you can track the request status (Under process, Accepted or Rejected)", + "This service allows you to submit a Referral request from any health care providers either inside or outside the kingdom of Saudi Arabia to any of Hospitals, by filling some of the patient's data and attaching the medical reports, moreover you can track the request status (Under process, Accepted or Rejected)", "ar": - "تتيح لك هذه الخدمة إرسال طلب إحالة من أي من مقدمي الرعاية الصحية سواء داخل المملكة العربية السعودية أو خارجها إلى أي من مستشفيات HMG ، عن طريق ملء بعض بيانات المراجع وإرفاق التقارير الطبية ، علاوة على ذلك يمكنك تتبع حالة الطلب (قيد المعالجة ، مقبول أو مرفوض)" + "تتيح لك هذه الخدمة إرسال طلب إحالة من أي من مقدمي الرعاية الصحية سواء داخل المملكة العربية السعودية أو خارجها إلى أي من مستشفيات ، عن طريق ملء بعض بيانات المراجع وإرفاق التقارير الطبية ، علاوة على ذلك يمكنك تتبع حالة الطلب (قيد المعالجة ، مقبول أو مرفوض)" }, "er-consultation": { "en": "This service allows you to make an online virtual consultation via video call directly with the doctor from anywhere at any time.", @@ -1805,7 +1805,7 @@ const Map localizedValues = { "connectSubtitle": {"en": "With us", "ar": "معنا"}, "covidConsent": { "en": - "Covid-19 Test feature allows you to book an appointment for the Covid-19 Lab test within HMG branches, where a swab sample will be collected & processed. Once the result has been processed, we shall notify you via SMS on your registered mobile number & the test result will also be available in the Lab Results section of this app. Please note that this result is only available to you & not publicly available to anyone else.", + "Covid-19 Test feature allows you to book an appointment for the Covid-19 Lab test within branches, where a swab sample will be collected & processed. Once the result has been processed, we shall notify you via SMS on your registered mobile number & the test result will also be available in the Lab Results section of this app. Please note that this result is only available to you & not publicly available to anyone else.", "ar": "تتيح لك ميزة اختبار كوفيد19 حجز موعد في احد فروع مجموعة الحبيب الطبية ، حيث سيتم اخذ عينة المسحة ومعالجتها. بمجرد معالجة النتيجة ، سنخطرك عبر رسالة نصية قصيرة على رقم هاتفك المحمول المسجل وستكون نتيجة الاختبار متاحة أيضًا على التطبيق في قسم نتائج المختبر. يرجى ملاحظة أن هذه النتيجة متاحة لك فقط وليست متاحة للجمهور او اي شخص آخر. الرجاء الموافقة للتأكيد والمتابعة." }, @@ -1824,7 +1824,7 @@ const Map localizedValues = { }, "locationPermissionDialog": { "en": - "Dr. Al Habib app collects location data to show the nearest HMG hospitals and ER Locations and provides health care services to your location and Health weather indicators service and the medication delivery.", + "Dr. Al Habib app collects location data to show the nearest hospitals and ER Locations and provides health care services to your location and Health weather indicators service and the medication delivery.", "ar": "يحتاج تطبيق دكتور الحبيب إلى صلاحية الوصول الى الموقع لإظهار أقرب مستشفيات المجموعة، مواقع الطوارئ، تقديم خدمات الرعاية الصحية إلى موقعك، خدمة مؤشرات الطقس الصحية وكذلك خدمة توصيل الأدوية." }, "calendarPermission": { @@ -1836,7 +1836,7 @@ const Map localizedValues = { "ar": "يحتاج تطبيق دكتور الحبيب إلى صلاحية الوصول الى الصوت لتفعيل خدمة الأوامر الصوتية." }, "wifiPermission": { - "en": "Dr. Al Habib app needs to access WiFi state permission to connect to the HMG WiFi network from within the app when you visit the hospital.", + "en": "Dr. Al Habib app needs to access WiFi state permission to connect to the WiFi network from within the app when you visit the hospital.", "ar": "يحتاج تطبيق دكتور الحبيب إلى الوصول إلى الواي فاي للاتصال بشبكة الواي فاي في المجموعة عند زيارة المستشفى." }, "physicalActivityPermission": { @@ -1891,11 +1891,11 @@ const Map localizedValues = { "pharmaLiveCare": {"en": "Pharma LiveCare", "ar": "لايف كير الصيدلية"}, "pharmaLiveCare1": {"en": "What is Pharma LiveCare?", "ar": "ما هولايف كير الصيدلية؟"}, "pharmaLiveCareDesc1": { - "en": "Pharma LiveCare allows you to get consultation from your doctor virtually being in HMG Pharmacy booth.", + "en": "Pharma LiveCare allows you to get consultation from your doctor virtually being in Pharmacy booth.", "ar": "تتيح لك خدمة لايف كير الصيدلية الحصول على استشارة من طبيبك المتواجد فعليًا في كشك صيدلية د.سليمان الحبيب." }, "wherePharmaLiveCare": {"en": "Where can i find Pharma LiveCare?", "ar": "أين يمكنني أن أجد لايف كير الصيدلية؟"}, - "pharmaLiveCareDesc2": {"en": "You can find the booth in HMG Pharmacies.", "ar": "يمكنك العثور على الكشك في صيدليات مستشفى د.سليمان الحبيب."}, + "pharmaLiveCareDesc2": {"en": "You can find the booth in Pharmacies.", "ar": "يمكنك العثور على الكشك في صيدليات مستشفى د.سليمان الحبيب."}, "howPharmaLiveCare": {"en": "How can i use Pharma LiveCare?", "ar": "كيف يمكنني استخدام لايف كير الصيدلية؟"}, "pharmaLiveCareDesc3": { "en": "Following the below steps you can easily benefit from the virtual consultation service:", @@ -2049,7 +2049,7 @@ const Map localizedValues = { "communicationConsent": {"en": "COMMUNICATION VIA EMAIL, TEXT MESSAGES AND PHONE CALLS: ", "ar": "الاتصال عبر البريد الإلكتروني والرسائل النصية والمكالمات الهاتفية: "}, "generalConsent3": { "en": - "I understand that the contact number or Email that I have provided on registration will be used for communication by the Hospital. I hereby agree to be notified by the Hospital through SMS, Email, phone calls or any other method, for appointments notifications, special promotions, new features or products, current HMG's medical services, and of any services introduced by the Hospital or any third party in the future or any modifications made to the services offered by the Hospital. And these messages may be submitted as evidence where the Hospital has the right to use at any time whatsoever and as it sees fit. I understand the risks of communicating by email and text messages, in particular the privacy risks. I understand that the Hospital cannot guarantee the security and confidentiality of email or text communication. The Hospital will not be responsible for messages that are not received or delivered due to technical failure, or for disclosure of confidential information unless caused by intentional misconduct.", + "I understand that the contact number or Email that I have provided on registration will be used for communication by the Hospital. I hereby agree to be notified by the Hospital through SMS, Email, phone calls or any other method, for appointments notifications, special promotions, new features or products, current medical services, and of any services introduced by the Hospital or any third party in the future or any modifications made to the services offered by the Hospital. And these messages may be submitted as evidence where the Hospital has the right to use at any time whatsoever and as it sees fit. I understand the risks of communicating by email and text messages, in particular the privacy risks. I understand that the Hospital cannot guarantee the security and confidentiality of email or text communication. The Hospital will not be responsible for messages that are not received or delivered due to technical failure, or for disclosure of confidential information unless caused by intentional misconduct.", "ar": "المستشفى أدرك بأن رقم الجوال الهاتف أو البريد الإلكتروني الذي قدمته في نموذج التسجيل سيستخدم كوسيلة اتصال بيني وبين | وأقر بموافقتي على قيام المستشفى بإخطاري عن طريق رسائل البريد أو الرسائل القصيرة أو البريد الإلكتروني أو المكالمات الهاتفية أو أي طريقة أخرى بالمواعيد والعروض الترويجية أو المميزات والمنتجات الخاصة بالمستشفى أو) خاصة بأي طرف خارجي) وبأي خدمات طبية تقدمها المجموعة أو قد يطرحها المستشفى في المستقبل أو أي تعديلات قد تطرأ على الخدمات المقدمة من قبل المستشفى. وتعتبر هذه الرسائل دليل إثبات يحق للمستشفى استخدامه في اي وقت يشاء. أفهم مخاطر التواصل عبر البريد الإلكتروني والرسائل النصية خاصة مخاطر الخصوصية وأدرك أن المستشفى لا يمكنه ضمان أمن وسرية البريد الإلكتروني أو الرسائل النصية ولن يكون المستشفى مسؤول عن الرسائل التي لم يتم استلامها أو تسليمها بسبب الفشل التقني أو الكشف عن المعلومات السرية ما لم يكن سببها سوء سلوك متعمد." }, @@ -2140,6 +2140,7 @@ const Map localizedValues = { "download": {"en": "Download", "ar": "تحميل"}, "share": {"en": "Share", "ar": "يشارك"}, + "byFace":{"en": "By Face", "ar": "حسب الوجه"} "stress": {"en": "Stress", "ar": "ضغط"}, "cvd": {"en": "Cardiovascular Disease (CVD) Risk", "ar": "مخاطر أمراض القلب والأوعية الدموية (CVD)"}, "generalWellness": {"en": "General Wellness", "ar": "العافية العامة"}, diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart index 420f08f1..d5eb13fb 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart @@ -68,10 +68,10 @@ class _AllHabibMedicalSevicePage2State extends State hmgServices.add(new HmgServices(0, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin)); hmgServices.add(new HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); - hmgServices.add(new HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); - hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); + // hmgServices.add(new HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); + // hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); - hmgServices.add(new HmgServices(5, TranslationBase.of(context).pharmacyTitle, TranslationBase.of(context).pharmacySubtitle, "assets/images/new/Pharmacy.svg", isLogin)); + // hmgServices.add(new HmgServices(5, TranslationBase.of(context).pharmacyTitle, TranslationBase.of(context).pharmacySubtitle, "assets/images/new/Pharmacy.svg", isLogin)); hmgServices.add(new HmgServices(6, TranslationBase.of(context).medicalFileTitle2, TranslationBase.of(context).medicalFileSubtitle, "assets/images/new/medical file.svg", isLogin)); hmgServices.add(new HmgServices(7, TranslationBase.of(context).familyTitle, TranslationBase.of(context).familySubtitle, "assets/images/new/my family.svg", isLogin)); diff --git a/lib/pages/appUpdatePage/app_update_page.dart b/lib/pages/appUpdatePage/app_update_page.dart index d9ecb3df..538eeb2b 100644 --- a/lib/pages/appUpdatePage/app_update_page.dart +++ b/lib/pages/appUpdatePage/app_update_page.dart @@ -43,7 +43,7 @@ class _AppUpdatePageState extends State { ), Container( margin: EdgeInsets.only(top: 5.0, bottom: 5.0), - child: SvgPicture.asset("assets/images/new-design/HMG_logo.svg", fit: BoxFit.fill), + child: Image.asset("assets/images/new/vida_logo.png", fit: BoxFit.fill), ), Container( margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart index d01554ea..aed34535 100644 --- a/lib/pages/landing/fragments/home_page_fragment2.dart +++ b/lib/pages/landing/fragments/home_page_fragment2.dart @@ -55,15 +55,16 @@ class _HomePageFragment2State extends State { hmgServices.add(HmgServices(0, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin)); hmgServices.add(HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); + hmgServices.add(HmgServices(1, TranslationBase.of(context).vitalSign, TranslationBase.of(context).byFace, "assets/images/new/facial-recognition.svg", isLogin)); projectViewModel.isIndoorNavigationEnabled ? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin, isLocked: !projectViewModel.havePrivilege(107))) : hmgServices.add(HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); - hmgServices.add( - HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin, isLocked: !projectViewModel.havePrivilege(108))); - hmgServices.add(HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); + // hmgServices.add( + // HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin, isLocked: !projectViewModel.havePrivilege(108))); + // hmgServices.add(HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); hmgServices.add(HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); hmgServices.add(HmgServices(5, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin)); hmgServices.add(HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin)); @@ -231,19 +232,19 @@ class _HomePageFragment2State extends State { height: 1, color: Color(0xFFC7C7C7), ), - Container( - width: double.infinity, - height: MediaQuery.of(context).size.width * 0.3, - padding: EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14), - color: Colors.white, - child: Row( - children: [ - offersButton(), - mWidth(10), - hmgButton(), - ], - ), - ), + // Container( + // width: double.infinity, + // height: MediaQuery.of(context).size.width * 0.3, + // padding: EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14), + // color: Colors.white, + // child: Row( + // children: [ + // // offersButton(), + // mWidth(10), + // // hmgButton(), + // ], + // ), + // ), Divider( height: 1, color: Color(0xFFC7C7C7), @@ -376,263 +377,263 @@ class _HomePageFragment2State extends State { ); } - Widget offersButton() { - final bypassPrivilageCheck = false; - return Expanded( - flex: 1, - child: InkWell( - onTap: () { - // Navigator.of(context).push(MaterialPageRoute(builder: (context) => ErOptions(isAppbar: true))); - Navigator.push(context, FadePage(page: ErOptions(isAppbar: true))); - }, - child: Stack( - children: [ - Container( - width: double.infinity, - height: double.infinity, - clipBehavior: Clip.antiAlias, - decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor), - child: Stack( - children: [ - Container( - width: double.infinity, - height: double.infinity, - // color: Color(0xFF2B353E), - decoration: containerRadius(CustomColors.accentColor, 20), - ), - Container( - width: double.infinity, - height: double.infinity, - clipBehavior: Clip.antiAlias, - decoration: projectViewModel.isArabic - ? containerBottomRightRadiusWithGradientForAr(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor) - : containerBottomRightRadiusWithGradient(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor), - child: Stack( - children: [ - SvgPicture.asset( - "assets/images/new/strips.svg", - width: double.infinity, - height: double.infinity, - fit: BoxFit.cover, - ), - ], - ), - ), - projectViewModel.isArabic - ? Positioned( - left: 20, - top: 12, - child: Opacity( - opacity: 0.5, - child: SvgPicture.asset( - "assets/images/new/emergency_services_back.svg", - height: MediaQuery.of(context).size.width * 0.14, - ), - ), - ) - : Positioned( - right: 20, - top: 12, - child: Opacity( - opacity: 0.5, - child: SvgPicture.asset( - "assets/images/new/emergency_services_back.svg", - height: MediaQuery.of(context).size.width * 0.14, - ), - ), - ), - Container( - width: double.infinity, - height: double.infinity, - padding: EdgeInsets.all(SizeConfig.widthMultiplier! * 3.4), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - child: SvgPicture.asset( - "assets/images/new/emergency_services.svg", - height: MediaQuery.of(context).size.width * 0.08, - ), - ), - mFlex(1), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - TranslationBase.of(context).emergencyServices, - style: TextStyle( - color: Colors.black, - fontSize: 14, - fontWeight: FontWeight.bold, - letterSpacing: -0.45, - height: 1, - ), - ), - projectViewModel.isArabic ? mHeight(5) : Container(), - Text( - TranslationBase.of(context).emergencyServicesSubtitle, - style: TextStyle( - color: Colors.black, - fontSize: 9, - fontWeight: FontWeight.w600, - letterSpacing: -0.27, - height: projectViewModel.isArabic ? 0.2 : 1, - ), - ), - ], - ), - ], - ), - ), - ], - ), - ), - // projectViewModel.havePrivilege(82) || bypassPrivilageCheck - // ? Container() - // : Container( - // width: double.infinity, - // height: double.infinity, - // clipBehavior: Clip.antiAlias, - // decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor.withOpacity(0.7), darkColor: CustomColors.lightGreyColor.withOpacity(0.7)), - // child: Icon( - // Icons.lock_outline, - // size: 40, - // ), - // ) - ], - ), - ), - ); - } - - Widget hmgButton() { - return Expanded( - flex: 1, - child: InkWell( - onTap: () { - if (projectViewModel.havePrivilege(100)) widget.onPharmacyClick!(); - }, - child: Stack(children: [ - Container( - width: double.infinity, - height: double.infinity, - clipBehavior: Clip.antiAlias, - decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor), - child: Stack( - children: [ - Container( - width: double.infinity, - height: double.infinity, - // color: Color(0xFF2B353E), - decoration: containerRadius(Color(0xFF359846), 20), - ), - Container( - width: double.infinity, - height: double.infinity, - clipBehavior: Clip.antiAlias, - decoration: projectViewModel.isArabic - ? containerBottomRightRadiusWithGradientForAr(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor) - : containerBottomRightRadiusWithGradient(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor), - child: Stack( - children: [ - SvgPicture.asset( - "assets/images/new/strips.svg", - width: double.infinity, - height: double.infinity, - fit: BoxFit.cover, - ), - ], - ), - ), - projectViewModel.isArabic - ? Positioned( - left: 20, - top: 12, - child: Opacity( - opacity: 0.25, - child: SvgPicture.asset( - "assets/images/new/Pharmacy.svg", - height: MediaQuery.of(context).size.width * 0.15, - ), - ), - ) - : Positioned( - right: 20, - top: 12, - child: Opacity( - opacity: 0.25, - child: SvgPicture.asset( - "assets/images/new/Pharmacy.svg", - height: MediaQuery.of(context).size.width * 0.15, - ), - ), - ), - Container( - width: double.infinity, - height: double.infinity, - padding: EdgeInsets.all(SizeConfig.widthMultiplier! * 3.4), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - child: SvgPicture.asset( - "assets/images/new/Pharmacy.svg", - height: MediaQuery.of(context).size.width * 0.08, - ), - ), - mFlex(1), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - TranslationBase.of(context).onlinePharmacy, - style: TextStyle( - color: Colors.black, - fontSize: 14, - fontWeight: FontWeight.bold, - letterSpacing: -0.45, - height: 1, - ), - ), - projectViewModel.isArabic ? mHeight(5) : Container(), - Text( - TranslationBase.of(context).ecommerceSolution, - style: TextStyle( - color: Colors.black, - fontSize: 9, - fontWeight: FontWeight.w600, - letterSpacing: -0.27, - height: projectViewModel.isArabic ? 0.2 : 1, - ), - ), - ], - ), - ], - ), - ), - ], - ), - ), - projectViewModel.havePrivilege(100) - ? Container() - : Container( - width: double.infinity, - height: double.infinity, - clipBehavior: Clip.antiAlias, - decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor.withOpacity(0.7), darkColor: CustomColors.lightGreyColor.withOpacity(0.7)), - child: Icon( - Icons.lock_outline, - size: 40, - ), - ) - ]), - ), - ); - } + // Widget offersButton() { + // final bypassPrivilageCheck = false; + // return Expanded( + // flex: 1, + // child: InkWell( + // onTap: () { + // // Navigator.of(context).push(MaterialPageRoute(builder: (context) => ErOptions(isAppbar: true))); + // Navigator.push(context, FadePage(page: ErOptions(isAppbar: true))); + // }, + // child: Stack( + // children: [ + // Container( + // width: double.infinity, + // height: double.infinity, + // clipBehavior: Clip.antiAlias, + // decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor), + // child: Stack( + // children: [ + // Container( + // width: double.infinity, + // height: double.infinity, + // // color: Color(0xFF2B353E), + // decoration: containerRadius(CustomColors.accentColor, 20), + // ), + // Container( + // width: double.infinity, + // height: double.infinity, + // clipBehavior: Clip.antiAlias, + // decoration: projectViewModel.isArabic + // ? containerBottomRightRadiusWithGradientForAr(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor) + // : containerBottomRightRadiusWithGradient(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor), + // child: Stack( + // children: [ + // SvgPicture.asset( + // "assets/images/new/strips.svg", + // width: double.infinity, + // height: double.infinity, + // fit: BoxFit.cover, + // ), + // ], + // ), + // ), + // projectViewModel.isArabic + // ? Positioned( + // left: 20, + // top: 12, + // child: Opacity( + // opacity: 0.5, + // child: SvgPicture.asset( + // "assets/images/new/emergency_services_back.svg", + // height: MediaQuery.of(context).size.width * 0.14, + // ), + // ), + // ) + // : Positioned( + // right: 20, + // top: 12, + // child: Opacity( + // opacity: 0.5, + // child: SvgPicture.asset( + // "assets/images/new/emergency_services_back.svg", + // height: MediaQuery.of(context).size.width * 0.14, + // ), + // ), + // ), + // Container( + // width: double.infinity, + // height: double.infinity, + // padding: EdgeInsets.all(SizeConfig.widthMultiplier! * 3.4), + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // Container( + // child: SvgPicture.asset( + // "assets/images/new/emergency_services.svg", + // height: MediaQuery.of(context).size.width * 0.08, + // ), + // ), + // mFlex(1), + // Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // Text( + // TranslationBase.of(context).emergencyServices, + // style: TextStyle( + // color: Colors.black, + // fontSize: 14, + // fontWeight: FontWeight.bold, + // letterSpacing: -0.45, + // height: 1, + // ), + // ), + // projectViewModel.isArabic ? mHeight(5) : Container(), + // Text( + // TranslationBase.of(context).emergencyServicesSubtitle, + // style: TextStyle( + // color: Colors.black, + // fontSize: 9, + // fontWeight: FontWeight.w600, + // letterSpacing: -0.27, + // height: projectViewModel.isArabic ? 0.2 : 1, + // ), + // ), + // ], + // ), + // ], + // ), + // ), + // ], + // ), + // ), + // // projectViewModel.havePrivilege(82) || bypassPrivilageCheck + // // ? Container() + // // : Container( + // // width: double.infinity, + // // height: double.infinity, + // // clipBehavior: Clip.antiAlias, + // // decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor.withOpacity(0.7), darkColor: CustomColors.lightGreyColor.withOpacity(0.7)), + // // child: Icon( + // // Icons.lock_outline, + // // size: 40, + // // ), + // // ) + // ], + // ), + // ), + // ); + // } + // + // Widget hmgButton() { + // return Expanded( + // flex: 1, + // child: InkWell( + // onTap: () { + // if (projectViewModel.havePrivilege(100)) widget.onPharmacyClick!(); + // }, + // child: Stack(children: [ + // Container( + // width: double.infinity, + // height: double.infinity, + // clipBehavior: Clip.antiAlias, + // decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor), + // child: Stack( + // children: [ + // Container( + // width: double.infinity, + // height: double.infinity, + // // color: Color(0xFF2B353E), + // decoration: containerRadius(Color(0xFF359846), 20), + // ), + // Container( + // width: double.infinity, + // height: double.infinity, + // clipBehavior: Clip.antiAlias, + // decoration: projectViewModel.isArabic + // ? containerBottomRightRadiusWithGradientForAr(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor) + // : containerBottomRightRadiusWithGradient(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor), + // child: Stack( + // children: [ + // SvgPicture.asset( + // "assets/images/new/strips.svg", + // width: double.infinity, + // height: double.infinity, + // fit: BoxFit.cover, + // ), + // ], + // ), + // ), + // projectViewModel.isArabic + // ? Positioned( + // left: 20, + // top: 12, + // child: Opacity( + // opacity: 0.25, + // child: SvgPicture.asset( + // "assets/images/new/Pharmacy.svg", + // height: MediaQuery.of(context).size.width * 0.15, + // ), + // ), + // ) + // : Positioned( + // right: 20, + // top: 12, + // child: Opacity( + // opacity: 0.25, + // child: SvgPicture.asset( + // "assets/images/new/Pharmacy.svg", + // height: MediaQuery.of(context).size.width * 0.15, + // ), + // ), + // ), + // Container( + // width: double.infinity, + // height: double.infinity, + // padding: EdgeInsets.all(SizeConfig.widthMultiplier! * 3.4), + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // Container( + // child: SvgPicture.asset( + // "assets/images/new/Pharmacy.svg", + // height: MediaQuery.of(context).size.width * 0.08, + // ), + // ), + // mFlex(1), + // Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // Text( + // TranslationBase.of(context).onlinePharmacy, + // style: TextStyle( + // color: Colors.black, + // fontSize: 14, + // fontWeight: FontWeight.bold, + // letterSpacing: -0.45, + // height: 1, + // ), + // ), + // projectViewModel.isArabic ? mHeight(5) : Container(), + // Text( + // TranslationBase.of(context).ecommerceSolution, + // style: TextStyle( + // color: Colors.black, + // fontSize: 9, + // fontWeight: FontWeight.w600, + // letterSpacing: -0.27, + // height: projectViewModel.isArabic ? 0.2 : 1, + // ), + // ), + // ], + // ), + // ], + // ), + // ), + // ], + // ), + // ), + // projectViewModel.havePrivilege(100) + // ? Container() + // : Container( + // width: double.infinity, + // height: double.infinity, + // clipBehavior: Clip.antiAlias, + // decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor.withOpacity(0.7), darkColor: CustomColors.lightGreyColor.withOpacity(0.7)), + // child: Icon( + // Icons.lock_outline, + // size: 40, + // ), + // ) + // ]), + // ), + // ); + // } Widget getInpatientButton() { return Container( diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index cf31f6f4..12aecc23 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -526,13 +526,13 @@ class _HomePageState extends State { SizedBox( height: 20, ), - Texts( - TranslationBase.of(context).onlinePharmacy, - textAlign: TextAlign.center, - color: Colors.white, - fontWeight: FontWeight.w700, - fontSize: SizeConfig.textMultiplier! * 1.55, - ) + // Texts( + // TranslationBase.of(context).onlinePharmacy, + // textAlign: TextAlign.center, + // color: Colors.white, + // fontWeight: FontWeight.w700, + // fontSize: SizeConfig.textMultiplier! * 1.55, + // ) ], ), ), diff --git a/lib/pages/livecare/live_care_payment_page.dart b/lib/pages/livecare/live_care_payment_page.dart index ccec389b..028f5bd7 100644 --- a/lib/pages/livecare/live_care_payment_page.dart +++ b/lib/pages/livecare/live_care_payment_page.dart @@ -230,36 +230,6 @@ class _LiveCarePatmentPageState extends State { ), ), mHeight(32.0), - AutoSizeText( - TranslationBase.of(context).selectedCallType, - maxLines: 1, - minFontSize: 12, - style: TextStyle( - fontSize: SizeConfig.textMultiplier! * 2.0, - fontWeight: FontWeight.w600, - letterSpacing: -0.39, - height: 0.8, - ), - ), - mHeight(12.0), - Row( - children: [ - SvgPicture.asset( - getCallTypeImagePath(), - width: 18, - height: 18, - ), - mWidth(10), - Text( - getCallTypeText(), - style: TextStyle( - fontSize: 14.0, - letterSpacing: -0.4, - fontWeight: FontWeight.w600, - ), - ), - ], - ), Container( margin: EdgeInsets.only(top: 16.0), child: Row( @@ -300,6 +270,36 @@ class _LiveCarePatmentPageState extends State { ], ), ), + AutoSizeText( + TranslationBase.of(context).selectedCallType, + maxLines: 1, + minFontSize: 12, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 2.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.39, + height: 0.8, + ), + ), + mHeight(12.0), + Row( + children: [ + SvgPicture.asset( + getCallTypeImagePath(), + width: 18, + height: 18, + ), + mWidth(10), + Text( + getCallTypeText(), + style: TextStyle( + fontSize: 14.0, + letterSpacing: -0.4, + fontWeight: FontWeight.w600, + ), + ), + ], + ), mFlex(1), Text( TranslationBase.of(context).upComingPayOption, diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index b43d9823..28bbf41f 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -30,6 +30,7 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/whatsapp_method_channel.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; @@ -241,7 +242,7 @@ class _ConfirmLogin extends State { else Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ Image.asset( - 'assets/images/habib-logo.png', + 'assets/images/new/vida_logo.png', height: 90, width: 90, ), @@ -344,7 +345,18 @@ class _ConfirmLogin extends State { sharedPref.setInt(LAST_LOGIN, this.selectedOption); //this.cs.sharedService.setStorage(this.selectedOption, AuthenticationService.LAST_LOGIN); } - loginWithSMS(type) { + loginWithSMS(type) async { + if (type == 4) { + var channel = WhatsappMethodChannel(); + // var whatsappStatus = await channel.isWhatsAppInstalled(); + // if(whatsappStatus) { + // print("whatapp is installed"); + channel.handleHandShake(); + // }else{ + // print("whatapp is not installed"); + // } + } + //if (!el.disabled) { if (this.user != null && this.registerd_data == null) { this.checkUserAuthentication(type); diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index beb047f5..832e0a1e 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -362,12 +362,12 @@ class _Login extends State { projectViewModel.setPrivilege(privilegeList: result); result = CheckActivationCode.fromJson(result); result.list.isFamily = false; - this.sharedPref.setString(BLOOD_TYPE, + await this.sharedPref.setString(BLOOD_TYPE, result.patientBloodType != null ? result.patientBloodType : ""); - this.sharedPref.setObject(USER_PROFILE, result.list); - this.sharedPref.setObject(MAIN_USER, result.list); - this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID); - this.sharedPref.setString(TOKEN, result.authenticationTokenID); + await this.sharedPref.setObject(USER_PROFILE, result.list); + await this.sharedPref.setObject(MAIN_USER, result.list); + await this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID); + await this.sharedPref.setString(TOKEN, result.authenticationTokenID); await authenticatedUserObject.getUser(getUser: true); authenticatedUserObject.isLogin = true; appointmentRateViewModel.isLogin = true; diff --git a/lib/pages/login/welcome.dart b/lib/pages/login/welcome.dart index 8b9e282f..d56eb4d9 100644 --- a/lib/pages/login/welcome.dart +++ b/lib/pages/login/welcome.dart @@ -44,8 +44,8 @@ class _WelcomeLogin extends State { SizedBox(height: 12), Row( children: [ - SvgPicture.asset( - "assets/images/new/hmg_icon.svg", + Image.asset( + "assets/images/new/vida_logo.png", height: 62, width: 62, ), diff --git a/lib/services/payfort_services/payfort_service.dart b/lib/services/payfort_services/payfort_service.dart index 5dedd006..79d2c364 100644 --- a/lib/services/payfort_services/payfort_service.dart +++ b/lib/services/payfort_services/payfort_service.dart @@ -172,7 +172,7 @@ class PayfortService extends BaseService { customerName: customerName!, customerEmail: customerEmail!, // orderDescription: orderDescription!, - orderDescription: "Dr. Sulaiman Al Habib Hospital", + orderDescription: "Vida Mobile App", sdkToken: sdkTokenResponse?.sdkToken ?? '', merchantReference: merchantReference!, currency: currency, diff --git a/lib/splashPage.dart b/lib/splashPage.dart index c0ff2eb2..9e66f793 100644 --- a/lib/splashPage.dart +++ b/lib/splashPage.dart @@ -100,9 +100,9 @@ class _SplashScreenState extends State { Padding( padding: EdgeInsets.symmetric(horizontal: 53), child: Image.asset( - 'assets/images/new/hmg_logo.png', + 'assets/images/new/vida_logo.png', fit: BoxFit.fitWidth, - width: MediaQuery.of(context).size.width, + width:120, ), ), Align( @@ -110,18 +110,18 @@ class _SplashScreenState extends State { child: Column( mainAxisSize: MainAxisSize.min, children: [ - Text( - TranslationBase.of(context).poweredBy, - style: TextStyle(fontSize: 14, fontWeight: FontWeight.w400, color: Color(0xff333C45), letterSpacing: -0.56, height: 16 / 14), - ), + // Text( + // TranslationBase.of(context).poweredBy, + // style: TextStyle(fontSize: 14, fontWeight: FontWeight.w400, color: Color(0xff333C45), letterSpacing: -0.56, height: 16 / 14), + // ), SizedBox( height: 5, ), - SvgPicture.asset( - 'assets/images/new/cloud_logo.svg', - width: 40, - height: 40, - ), + // SvgPicture.asset( + // 'assets/images/new/cloud_logo.svg', + // width: 40, + // height: 40, + // ), SizedBox( height: 7, ), diff --git a/lib/uitl/app_toast.dart b/lib/uitl/app_toast.dart index bbeebe5d..e7e716f2 100644 --- a/lib/uitl/app_toast.dart +++ b/lib/uitl/app_toast.dart @@ -70,9 +70,10 @@ class AppToast { child: toast, gravity: ToastGravity.TOP, toastDuration: Duration(seconds: timeInSeconds), - positionedToastBuilder: (context, child) { - return Positioned(top: 50, left: 10, right: 10, child: child); - }); + // positionedToastBuilder: (context, child) { + // return Positioned(top: 50, left: 10, right: 10, child: child); + // } + ); // Fluttertoast.showToast(msg: message, toastLength: toastLength, gravity: toastGravity, timeInSecForIosWeb: timeInSeconds, backgroundColor: Colors.red, textColor: textColor, fontSize: fontSize); } diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 1c56d66b..200054be 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -3060,6 +3060,7 @@ class TranslationBase { String get generalWellness => localizedValues["generalWellness"][locale.languageCode]; String get cvd => localizedValues["cvd"][locale.languageCode]; + String get byFace => localizedValues["byFace"][locale.languageCode]; String getValue(String name) { switch (name) { case 'normal': diff --git a/lib/uitl/whatsapp_method_channel.dart b/lib/uitl/whatsapp_method_channel.dart index 20d26159..068e123e 100644 --- a/lib/uitl/whatsapp_method_channel.dart +++ b/lib/uitl/whatsapp_method_channel.dart @@ -24,9 +24,11 @@ class WhatsappMethodChannel { Future startListening() async { try{ - return await _channel.invokeMethod("startListening"); + String code = await _channel.invokeMethod("startListening"); + print("the code in flutter is ${code}"); + return code; }catch(e){ return ""; } } -} +} \ No newline at end of file diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart index f82047a5..59515e75 100644 --- a/lib/widgets/drawer/app_drawer_widget.dart +++ b/lib/widgets/drawer/app_drawer_widget.dart @@ -119,10 +119,10 @@ class _AppDrawerState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - SvgPicture.asset( - "assets/images/new/logo.svg", - height: 60, - width: 60, + Image.asset( + "assets/images/new/vida_logo.png", + height: 65, + width: 100, ), IconButton( icon: Icon(Icons.clear), @@ -508,27 +508,27 @@ class _AppDrawerState extends State { crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ - Text( - TranslationBase.of(context).poweredBy, - style: TextStyle( - color: Color(0xFF989898), - fontSize: 13, - letterSpacing: -0.54, - fontWeight: FontWeight.w600, - ), - ), + // Text( + // TranslationBase.of(context).poweredBy, + // style: TextStyle( + // color: Color(0xFF989898), + // fontSize: 13, + // letterSpacing: -0.54, + // fontWeight: FontWeight.w600, + // ), + // ), mWidth(2), - Text( - "Cloud Solutions", - style: TextStyle( - color: Color(0xff2E303A), - fontSize: 13, - letterSpacing: -0.54, - fontWeight: FontWeight.w600, - ), - ), + // Text( + // "Cloud Solutions", + // style: TextStyle( + // color: Color(0xff2E303A), + // fontSize: 13, + // letterSpacing: -0.54, + // fontWeight: FontWeight.w600, + // ), + // ), mWidth(16), - SvgPicture.asset("assets/images/new/cloud_logo.svg"), + // SvgPicture.asset("assets/images/new/cloud_logo.svg"), ], ), ), diff --git a/lib/widgets/habib_logo_widget.dart b/lib/widgets/habib_logo_widget.dart index 84aaa076..0958901e 100644 --- a/lib/widgets/habib_logo_widget.dart +++ b/lib/widgets/habib_logo_widget.dart @@ -8,8 +8,8 @@ class HabibLogoWidget extends StatelessWidget { Widget build(BuildContext context) { return Row( children: [ - SvgPicture.asset( - "assets/images/new/hmg_icon.svg", + Image.asset( + "assets/images/new/vida_logo.png", height: 62, width: 62, ), diff --git a/lib/widgets/otp/sms-popup.dart b/lib/widgets/otp/sms-popup.dart index 0162ddbd..66bdb936 100644 --- a/lib/widgets/otp/sms-popup.dart +++ b/lib/widgets/otp/sms-popup.dart @@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/whatsapp_method_channel.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:provider/provider.dart'; @@ -102,9 +103,10 @@ class SMSOTP { child: StatefulBuilder(builder: (context, setState) { if (displayTime == '') { startTimer(setState); - - // startLister(); - if (Platform.isAndroid && type == 1) checkSignature(); + if (Platform.isAndroid ) { + if (type == 1) checkSignature(); + else if(type == 4) _listenWhatsAppCode(); + } } return Container( @@ -298,6 +300,15 @@ class SMSOTP { }); } + void _listenWhatsAppCode(){ + WhatsappMethodChannel().startListening().then((message) { + final intRegex = RegExp(r'\d+', multiLine: true); + var otp = SmsVerification.getCode(message, intRegex); + _pinPutController.text = otp; + onSuccess(otp); + }); + } + // startLister() { // var signature = checkSignature(); //