few changes

faiz_dev_tools_imp
FaizHashmi 4 weeks ago
parent 6183a4790f
commit 1ea3f5cc8b

@ -2050,5 +2050,45 @@
"liveCareTermsConditions46": "13-3\tإذا تبين أن أي بند أو جزء من أي بند من هذه الشروط والأحكام باطل أو غير قابل للإنفاذ أو غير صالح، فسيتم فصله عن هذه الشروط والأحكام، تاركاً باقي الشروط سارية المفعول بكامل الأثر والنفاذ، بشرط ألا يغير فصل ذلك البند من الطبيعة الأساسية لهذه الشروط والأحكام.",
"liveCareTermsHeading16": "14.\tالشكاوى",
"liveCareTermsConditions47": "خدمات الرعاية الصحية عن بُعد الخاصة بنا سوف تكون لتخصصات طبية محددة أو لمواعيد المتابعة أو إعادة صرف الدواء. ",
"liveCareTermsConditions48": "إذا كانت لديك أي شكاوى أو مخاوف بشأن التطبيق و/أو موقع الويب أو خدماتنا أو كيفية تعاملنا مع معلوماتك الشخصية، فيرجى التواصل معنا على: EServices.HMG@drsulaimanalhabib.com أو الاتصال على الرقم: 9553 525 011"
"liveCareTermsConditions48": "إذا كانت لديك أي شكاوى أو مخاوف بشأن التطبيق و/أو موقع الويب أو خدماتنا أو كيفية تعاملنا مع معلوماتك الشخصية، فيرجى التواصل معنا على: EServices.HMG@drsulaimanalhabib.com أو الاتصال على الرقم: 9553 525 011",
"apiLogs": "سجل طلبات API",
"environmentConfig": "إعدادات البيئة",
"searchByUrl": "البحث عبر الرابط",
"clearAll": "مسح الكل",
"exportAll": "تصدير الكل",
"showingLogs": "عرض {shown} من {total} سجل",
"noApiLogsYet": "لا توجد سجلات API بعد",
"noLogsMatch": "لا توجد سجلات مطابقة للبحث",
"apiCallsWillAppear": "ستظهر طلبات API هنا",
"clearAllLogs": "مسح جميع السجلات",
"clearLogsConfirm": "هل أنت متأكد من مسح جميع السجلات؟",
"allLogsCleared": "تم مسح جميع السجلات",
"allLogsCopied": "تم نسخ جميع السجلات",
"response": "الاستجابة",
"headers": "الترويسات",
"copyAsText": "نسخ كنص",
"copiedAsText": "تم النسخ كنص",
"copyAsCurl": "نسخ كأمر cURL",
"copiedAsCurl": "تم النسخ كأمر cURL",
"copyJson": "نسخ JSON",
"responseJsonCopied": "تم نسخ JSON للاستجابة",
"currentEnvironment": "البيئة الحالية",
"production": "الإنتاج",
"selectEnvironment": "اختيار البيئة",
"environmentDetails": "تفاصيل البيئة",
"baseUrl": "الرابط الأساسي",
"rcUrl": "رابط RC",
"pharmacyApi": "واجهة برمجة الصيدلية",
"payfortMode": "وضع PayFort",
"sandbox": "الاختبار",
"applePayMerchant": "معرّف تاجر Apple Pay",
"important": "مهم",
"envChangeWarning": "تتطلب تغييرات البيئة إعادة تشغيل التطبيق وقد تؤثر على سلوك واجهات البرمجة.",
"resetToDefault": "إعادة إلى الافتراضي",
"saveAndRestart": "حفظ وإعادة التشغيل",
"resetEnvironment": "إعادة ضبط البيئة",
"resetEnvConfirm": "هل أنت متأكد من إعادة إعدادات البيئة إلى الافتراضي؟",
"envResetSuccess": "تمت إعادة ضبط البيئة بنجاح",
"envUpdateSuccess": "تم تحديث البيئة بنجاح",
"envUpdateFailed": "فشل تحديث البيئة"
}

@ -1317,7 +1317,7 @@
"selectedServices": "Selected Services",
"createNewRequest": "New Request",
"youHaveNoPendingRequests": "You have no pending requests",
"noInsuranceinsurance2DataFound": "No insurance data found...",
"noInsuranceDataFound": "No insurance data found...",
"noInsuranceUpdateRequest": "No insurance update requests found.",
"policyNumberInsurancePage": "Policy: {number}",
"insuranceExpired": "Insurance Expired",
@ -2040,7 +2040,47 @@
"liveCareTermsConditions46": "13.3 If any clause or part of any clause of these Terms & Conditions is found to be void, unenforceable or invalid, then it will be severed from these Terms & Conditions, leaving the remainder in full force and effect, provided that the severance has not altered the basic nature of these Terms & Conditions. ",
"liveCareTermsHeading16": "14. COMPLAINTS",
"liveCareTermsConditions47": "Our Telehealth Services will be for specific medical specialties or follow-up or medication refill appointments.",
"liveCareTermsConditions48": "If you have any complaints or concerns about the Application and or the Website, Our Services, or how we handle your personal information please contact us on: EServices.HMG@drsulaimanalhabib.com or call 011 525 9553"
"liveCareTermsConditions48": "If you have any complaints or concerns about the Application and or the Website, Our Services, or how we handle your personal information please contact us on: EServices.HMG@drsulaimanalhabib.com or call 011 525 9553",
"apiLogs": "API Logs",
"environmentConfig": "Environment Config",
"searchByUrl": "Search by URL",
"clearAll": "Clear All",
"exportAll": "Export All",
"showingLogs": "Showing {shown} of {total} logs",
"noApiLogsYet": "No API logs yet",
"noLogsMatch": "No logs match your search",
"apiCallsWillAppear": "API calls will appear here",
"clearAllLogs": "Clear All Logs",
"clearLogsConfirm": "Are you sure you want to clear all logs?",
"allLogsCleared": "All logs cleared",
"allLogsCopied": "All logs copied",
"response": "Response",
"headers": "Headers",
"copyAsText": "Copy as Text",
"copiedAsText": "Copied as text",
"copyAsCurl": "Copy as cURL",
"copiedAsCurl": "Copied as cURL",
"copyJson": "Copy JSON",
"responseJsonCopied": "Response JSON copied",
"currentEnvironment": "Current Environment",
"production": "Production",
"selectEnvironment": "Select Environment",
"environmentDetails": "Environment Details",
"baseUrl": "Base URL",
"rcUrl": "RC URL",
"pharmacyApi": "Pharmacy API",
"payfortMode": "PayFort Mode",
"sandbox": "Sandbox",
"applePayMerchant": "Apple Pay Merchant",
"important": "Important",
"envChangeWarning": "Environment changes require app restart and may affect API behavior.",
"resetToDefault": "Reset to Default",
"saveAndRestart": "Save and Restart",
"resetEnvironment": "Reset Environment",
"resetEnvConfirm": "Are you sure you want to reset environment settings to default?",
"envResetSuccess": "Environment reset successfully",
"envUpdateSuccess": "Environment updated successfully",
"envUpdateFailed": "Failed to update environment"
}

@ -20,7 +20,5 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>13.0</string>
</dict>
</plist>

@ -29,6 +29,7 @@
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@ -90,6 +91,7 @@
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
A83C76CFF9D3F92EDE3B22B4 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -97,6 +99,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
76B1D2512F91BF8000DBBD1B /* Penguin.xcframework in Frameworks */,
76B1D2552F91BF8000DBBD1B /* PenNavUI.xcframework in Frameworks */,
76B1D2532F91BF8000DBBD1B /* PenguinINRenderer.xcframework in Frameworks */,
@ -159,6 +162,7 @@
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
@ -230,6 +234,9 @@
productType = "com.apple.product-type.bundle.unit-test";
};
97C146ED1CF9000F007C117D /* Runner */ = {
packageProductDependencies = (
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
);
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
@ -256,6 +263,9 @@
/* Begin PBXProject section */
97C146E61CF9000F007C117D /* Project object */ = {
packageReferences = (
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
);
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
@ -798,6 +808,18 @@
defaultConfigurationName = Debug;
};
/* End XCConfigurationList section */
/* Begin XCLocalSwiftPackageReference section */
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
};
/* End XCLocalSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
isa = XCSwiftPackageProductDependency;
productName = FlutterGeneratedPluginSwiftPackage;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}

@ -5,6 +5,24 @@
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<PreActions>
<ExecutionAction
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Prepare Flutter Framework Script"
scriptText = "/bin/sh &quot;$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh&quot; prepare&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</EnvironmentBuildable>
</ActionContent>
</ExecutionAction>
</PreActions>
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"

@ -1,4 +1,4 @@
storePassword=HmGsa123
keyPassword=HmGsa123
keyAlias=hmg
storeFile=key
storeFile=key

@ -870,7 +870,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
// dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {});
} else if (apiResponse.messageStatus == 1) {
if (apiResponse.data['FreeTimeSlots'] == null || apiResponse.data['FreeTimeSlots'].isEmpty) {
onError!("No free slots available".tr());
onError!(LocaleKeys.noFreeSlot.tr());
return;
}
initialSlotDuration = apiResponse.data["InitialSlotDuration"];
@ -918,7 +918,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
// dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {});
} else if (apiResponse.messageStatus == 1) {
if (apiResponse.data['PatientER_DoctorFreeSlots'] == null || apiResponse.data['PatientER_DoctorFreeSlots'].isEmpty) {
onError!("No free slots available".tr());
onError!(LocaleKeys.noFreeSlot.tr());
return;
}
initialSlotDuration = apiResponse.data["InitialSlotDuration"];
@ -1098,7 +1098,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
}
} else if (apiResponse.messageStatus == 1) {
if (apiResponse.data == null || apiResponse.data!.isEmpty) {
onError!("No free slots available".tr());
onError!(LocaleKeys.noFreeSlot.tr());
return;
}
@ -1202,7 +1202,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
);
} else if (apiResponse.messageStatus == 1) {
if (apiResponse.data == null || apiResponse.data!.isEmpty) {
onError!("No free slots available".tr());
onError!(LocaleKeys.noFreeSlot.tr());
return;
}

@ -82,6 +82,24 @@ const List<AppEnvironmentPreset> kEnvironmentPresets = [
symptomsCheckerUsername: 'guest_user',
symptomsCheckerPassword: '123456',
),
AppEnvironmentPreset(
label: 'PreProd',
environmentType: AppEnvironmentTypeEnum.preProd,
baseUrl: 'https://webservices.hmg.com/',
rcBaseUrl: 'https://rc.hmg.com/',
hmgPharmacyApiBaseUrl: 'https://hmgpharmacyapi.hmg.com/',
tamaraUrl: 'https://epharmacy.hmg.com/tamara/Home/Checkout',
getTamaraInstallmentsUrl: 'https://epharmacy.hmg.com/tamara/Home/getinstallments',
getTamaraPaymentStatus: 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid=',
qlineUrl: 'https://qline.hmg.com/api/PatientCall/PatientInQueue_Detail',
chatUrl: 'https://chat.hmg.com/geneysChat/Index.aspx?RequestedId=',
serviceUrl: 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx',
payFortEnvironment: FortEnvironment.production,
payFortEnvironmentType: EnvironmentType.production,
applePayMerchantId: 'merchant.com.hmgwebservices',
symptomsCheckerUsername: 'mobile_user',
symptomsCheckerPassword: '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92',
),
AppEnvironmentPreset(
label: 'Dev',
environmentType: AppEnvironmentTypeEnum.dev,

File diff suppressed because it is too large Load Diff

@ -2,7 +2,7 @@
// ignore_for_file: constant_identifier_names
abstract class LocaleKeys {
abstract class LocaleKeys {
static const english = 'english';
static const arabic = 'arabic';
static const login = 'login';
@ -2032,5 +2032,45 @@ abstract class LocaleKeys {
static const liveCareTermsHeading16 = 'liveCareTermsHeading16';
static const liveCareTermsConditions47 = 'liveCareTermsConditions47';
static const liveCareTermsConditions48 = 'liveCareTermsConditions48';
static const apiLogs = 'apiLogs';
static const environmentConfig = 'environmentConfig';
static const searchByUrl = 'searchByUrl';
static const clearAll = 'clearAll';
static const exportAll = 'exportAll';
static const showingLogs = 'showingLogs';
static const noApiLogsYet = 'noApiLogsYet';
static const noLogsMatch = 'noLogsMatch';
static const apiCallsWillAppear = 'apiCallsWillAppear';
static const clearAllLogs = 'clearAllLogs';
static const clearLogsConfirm = 'clearLogsConfirm';
static const allLogsCleared = 'allLogsCleared';
static const allLogsCopied = 'allLogsCopied';
static const response = 'response';
static const headers = 'headers';
static const copyAsText = 'copyAsText';
static const copiedAsText = 'copiedAsText';
static const copyAsCurl = 'copyAsCurl';
static const copiedAsCurl = 'copiedAsCurl';
static const copyJson = 'copyJson';
static const responseJsonCopied = 'responseJsonCopied';
static const currentEnvironment = 'currentEnvironment';
static const production = 'production';
static const selectEnvironment = 'selectEnvironment';
static const environmentDetails = 'environmentDetails';
static const baseUrl = 'baseUrl';
static const rcUrl = 'rcUrl';
static const pharmacyApi = 'pharmacyApi';
static const payfortMode = 'payfortMode';
static const sandbox = 'sandbox';
static const applePayMerchant = 'applePayMerchant';
static const important = 'important';
static const envChangeWarning = 'envChangeWarning';
static const resetToDefault = 'resetToDefault';
static const saveAndRestart = 'saveAndRestart';
static const resetEnvironment = 'resetEnvironment';
static const resetEnvConfirm = 'resetEnvConfirm';
static const envResetSuccess = 'envResetSuccess';
static const envUpdateSuccess = 'envUpdateSuccess';
static const envUpdateFailed = 'envUpdateFailed';
}

@ -118,9 +118,9 @@ Future<void> callInitializations() async {
WidgetsFlutterBinding.ensureInitialized();
await EasyLocalization.ensureInitialized();
SafeDevice.init(
SafeDeviceConfig(mockLocationCheckEnabled: false), // disables mock location check on Android
);
// SafeDevice.init(
// SafeDeviceConfig(mockLocationCheckEnabled: false), // disables mock location check on Android
// );
try {
// Attempt to get the default app. If it exists, this avoids the error.
@ -138,9 +138,9 @@ Future<void> callInitializations() async {
await callAppStateInitializations();
// Initialize Security Service early to catch threats before app logic runs
if (kReleaseMode) {
await getIt.get<SecurityService>().initialize();
}
// if (kReleaseMode) {
// await getIt.get<SecurityService>().initialize();
// }
// Set up critical threat callback to navigate to unsafe device page
getIt.get<SecurityService>().setOnCriticalThreatCallback(() {

@ -67,385 +67,386 @@ class _EnvironmentConfigSheetState extends State<EnvironmentConfigSheet> {
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
color: AppColors.scaffoldBgColor,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(24.r),
topRight: Radius.circular(24.r),
return FractionallySizedBox(
heightFactor: 0.75,
alignment: Alignment.bottomCenter,
child: Container(
decoration: BoxDecoration(
color: AppColors.scaffoldBgColor,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(24.r),
topRight: Radius.circular(24.r),
),
),
),
child: SafeArea(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
// Handle bar
Container(
margin: EdgeInsets.only(top: 12.h, bottom: 8.h),
width: 40.w,
height: 4.h,
decoration: BoxDecoration(
color: AppColors.greyInfoTextColor.withValues(alpha: 0.3),
borderRadius: BorderRadius.circular(2.r),
child: SafeArea(
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
// Handle bar
Container(
margin: EdgeInsets.only(top: 12.h, bottom: 8.h),
width: 40.w,
height: 4.h,
decoration: BoxDecoration(
color: AppColors.greyInfoTextColor.withValues(alpha: 0.3),
borderRadius: BorderRadius.circular(2.r),
),
),
),
// Title
Padding(
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 16.h),
child: Row(
children: [
Expanded(
child: Text(
LocaleKeys.environmentConfig.tr(context: context),
style: TextStyle(fontSize: 20.f, fontWeight: FontWeight.bold),
// Title
Padding(
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 16.h),
child: Row(
children: [
Expanded(
child: Text(
LocaleKeys.environmentConfig.tr(context: context),
style: TextStyle(fontSize: 20.f, fontWeight: FontWeight.bold),
),
),
),
IconButton(
icon: Icon(Icons.close, color: AppColors.blackBgColor),
onPressed: () => Navigator.pop(context, false),
),
],
IconButton(
icon: Icon(Icons.close, color: AppColors.blackBgColor),
onPressed: () => Navigator.pop(context, false),
),
],
),
),
),
Divider(height: 1, color: AppColors.greyInfoTextColor.withValues(alpha: 0.2)),
Divider(height: 1, color: AppColors.greyInfoTextColor.withValues(alpha: 0.2)),
if (_isLoading)
Padding(
padding: EdgeInsets.all(40.h),
child: const CircularProgressIndicator(),
)
else
SingleChildScrollView(
padding: EdgeInsets.all(24.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Current Environment Info
Container(
padding: EdgeInsets.all(16.w),
decoration: BoxDecoration(
color: AppColors.infoColor.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(12.r),
border: Border.all(
color: AppColors.infoColor.withValues(alpha: 0.3),
Expanded(
child: _isLoading
? Center(
child: Padding(
padding: EdgeInsets.all(40.h),
child: const CircularProgressIndicator(),
),
),
child: Row(
children: [
Icon(Icons.info_outline, color: AppColors.infoColor, size: 24.w),
SizedBox(width: 12.w),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
LocaleKeys.currentEnvironment.tr(context: context),
style: TextStyle(fontSize: 14.f, fontWeight: FontWeight.bold, color: AppColors.infoColor),
)
: SingleChildScrollView(
padding: EdgeInsets.all(24.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Current Environment Info
Container(
padding: EdgeInsets.all(16.w),
decoration: BoxDecoration(
color: AppColors.infoColor.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(12.r),
border: Border.all(
color: AppColors.infoColor.withValues(alpha: 0.3),
),
SizedBox(height: 4.h),
Text(
_isCustomMode
? 'Custom'
: (_selectedPreset?.label ?? LocaleKeys.production.tr(context: context)),
style: TextStyle(fontSize: 12.f, color: AppColors.blackBgColor),
),
child: Row(
children: [
Icon(Icons.info_outline, color: AppColors.infoColor, size: 24.w),
SizedBox(width: 12.w),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
LocaleKeys.currentEnvironment.tr(context: context),
style: TextStyle(fontSize: 14.f, fontWeight: FontWeight.bold, color: AppColors.infoColor),
),
SizedBox(height: 4.h),
Text(
_isCustomMode ? 'Custom' : (_selectedPreset?.label ?? LocaleKeys.production.tr(context: context)),
style: TextStyle(fontSize: 12.f, color: AppColors.blackBgColor),
),
],
),
),
],
),
),
SizedBox(height: 24.h),
Text(LocaleKeys.selectEnvironment.tr(context: context), style: TextStyle(fontSize: 16.f, fontWeight: FontWeight.bold)),
SizedBox(height: 12.h),
// Environment Chips
Wrap(
spacing: 8.w,
runSpacing: 8.h,
children: [
// Preset environment chips
...kEnvironmentPresets.map((preset) {
final isSelected = !_isCustomMode && _selectedPreset?.label == preset.label;
return InkWell(
onTap: () {
setState(() {
_selectedPreset = preset;
_isCustomMode = false;
});
},
borderRadius: BorderRadius.circular(20.r),
child: Container(
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 10.h),
decoration: BoxDecoration(
color: isSelected ? AppColors.primaryRedColor : AppColors.whiteColor,
borderRadius: BorderRadius.circular(20.r),
border: Border.all(
color: isSelected ? AppColors.primaryRedColor : AppColors.greyInfoTextColor.withValues(alpha: 0.3),
),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
if (isSelected)
Icon(
Icons.check_circle,
size: 18.w,
color: Colors.white,
),
if (isSelected) SizedBox(width: 6.w),
Text(
preset.label,
style: TextStyle(
fontSize: 14.f,
color: isSelected ? Colors.white : AppColors.blackBgColor,
fontWeight: isSelected ? FontWeight.bold : FontWeight.normal,
),
),
],
),
),
);
}).toList(),
// Custom chip
InkWell(
onTap: () {
setState(() {
_isCustomMode = true;
_selectedPreset = null;
});
},
borderRadius: BorderRadius.circular(20.r),
child: Container(
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 10.h),
decoration: BoxDecoration(
color: _isCustomMode ? AppColors.infoColor : AppColors.whiteColor,
borderRadius: BorderRadius.circular(20.r),
border: Border.all(
color: _isCustomMode ? AppColors.infoColor : AppColors.greyInfoTextColor.withValues(alpha: 0.3),
),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
if (_isCustomMode)
Icon(
Icons.check_circle,
size: 18.w,
color: Colors.white,
),
if (_isCustomMode) SizedBox(width: 6.w),
Icon(
Icons.edit_outlined,
size: 16.w,
color: _isCustomMode ? Colors.white : AppColors.blackBgColor,
),
SizedBox(width: 4.w),
Text(
'Custom',
style: TextStyle(
fontSize: 14.f,
color: _isCustomMode ? Colors.white : AppColors.blackBgColor,
fontWeight: _isCustomMode ? FontWeight.bold : FontWeight.normal,
),
),
],
),
),
),
],
),
),
],
),
),
SizedBox(height: 24.h),
Text(LocaleKeys.selectEnvironment.tr(context: context), style: TextStyle(fontSize: 16.f, fontWeight: FontWeight.bold)),
SizedBox(height: 12.h),
// Environment Chips
Wrap(
spacing: 8.w,
runSpacing: 8.h,
children: [
// Preset environment chips
...kEnvironmentPresets.map((preset) {
final isSelected = !_isCustomMode && _selectedPreset?.label == preset.label;
return InkWell(
onTap: () {
setState(() {
_selectedPreset = preset;
_isCustomMode = false;
});
},
borderRadius: BorderRadius.circular(20.r),
child: Container(
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 10.h),
SizedBox(height: 24.h),
// Custom URL Input Fields
if (_isCustomMode) ...[
Text('Custom URLs', style: TextStyle(fontSize: 16.f, fontWeight: FontWeight.bold)),
SizedBox(height: 12.h),
// Base URL
TextField(
controller: _baseUrlController,
decoration: InputDecoration(
labelText: 'Base URL',
hintText: 'https://example.com/',
prefixIcon: Icon(Icons.link, size: 20.w),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12.r),
),
filled: true,
fillColor: AppColors.whiteColor,
),
style: TextStyle(fontSize: 14.f),
),
SizedBox(height: 12.h),
// RC Base URL
TextField(
controller: _rcBaseUrlController,
decoration: InputDecoration(
labelText: 'RC Base URL',
hintText: 'https://rc.example.com/',
prefixIcon: Icon(Icons.link, size: 20.w),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12.r),
),
filled: true,
fillColor: AppColors.whiteColor,
),
style: TextStyle(fontSize: 14.f),
),
SizedBox(height: 12.h),
// Payment URL
TextField(
controller: _paymentUrlController,
decoration: InputDecoration(
labelText: 'Payment URL',
hintText: 'https://example.com/payment/SendPayFortRequest.aspx',
prefixIcon: Icon(Icons.payment, size: 20.w),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12.r),
),
filled: true,
fillColor: AppColors.whiteColor,
),
style: TextStyle(fontSize: 14.f),
),
SizedBox(height: 24.h),
],
// Environment Details
if (_isCustomMode && _baseUrlController.text.isNotEmpty) ...[
Text(LocaleKeys.environmentDetails.tr(context: context), style: TextStyle(fontSize: 16.f, fontWeight: FontWeight.bold)),
SizedBox(height: 12.h),
Container(
padding: EdgeInsets.all(16.w),
decoration: BoxDecoration(
color: AppColors.whiteColor,
borderRadius: BorderRadius.circular(12.r),
border: Border.all(
color: AppColors.greyInfoTextColor.withValues(alpha: 0.2),
),
),
child: Column(
children: [
_buildDetailRow(LocaleKeys.baseUrl.tr(context: context), _baseUrlController.text),
Divider(height: 20.h),
_buildDetailRow(LocaleKeys.rcUrl.tr(context: context), _rcBaseUrlController.text),
Divider(height: 20.h),
_buildDetailRow('Payment URL', _paymentUrlController.text),
Divider(height: 20.h),
_buildDetailRow(LocaleKeys.payfortMode.tr(context: context), LocaleKeys.sandbox.tr(context: context)),
],
),
),
] else if (_selectedPreset != null) ...[
Text(LocaleKeys.environmentDetails.tr(context: context), style: TextStyle(fontSize: 16.f, fontWeight: FontWeight.bold)),
SizedBox(height: 12.h),
Container(
padding: EdgeInsets.all(16.w),
decoration: BoxDecoration(
color: AppColors.whiteColor,
borderRadius: BorderRadius.circular(12.r),
border: Border.all(
color: AppColors.greyInfoTextColor.withValues(alpha: 0.2),
),
),
child: Column(
children: [
_buildDetailRow(LocaleKeys.baseUrl.tr(context: context), _selectedPreset!.baseUrl),
Divider(height: 20.h),
_buildDetailRow(LocaleKeys.rcUrl.tr(context: context), _selectedPreset!.rcBaseUrl),
Divider(height: 20.h),
_buildDetailRow('Payment URL', _selectedPreset!.serviceUrl),
Divider(height: 20.h),
_buildDetailRow(LocaleKeys.payfortMode.tr(context: context),
_selectedPreset!.payFortEnvironment == FortEnvironment.production ? LocaleKeys.production.tr(context: context) : LocaleKeys.sandbox.tr(context: context)),
Divider(height: 20.h),
_buildDetailRow(LocaleKeys.applePayMerchant.tr(context: context), _selectedPreset!.applePayMerchantId),
],
),
),
],
SizedBox(height: 24.h),
// Warning
Container(
padding: EdgeInsets.all(16.w),
decoration: BoxDecoration(
color: isSelected ? AppColors.primaryRedColor : AppColors.whiteColor,
borderRadius: BorderRadius.circular(20.r),
color: AppColors.warningColor.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(12.r),
border: Border.all(
color: isSelected ? AppColors.primaryRedColor : AppColors.greyInfoTextColor.withValues(alpha: 0.3),
color: AppColors.warningColor.withValues(alpha: 0.3),
),
),
child: Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (isSelected)
Icon(
Icons.check_circle,
size: 18.w,
color: Colors.white,
),
if (isSelected) SizedBox(width: 6.w),
Text(
preset.label,
style: TextStyle(
fontSize: 14.f,
color: isSelected ? Colors.white : AppColors.blackBgColor,
fontWeight: isSelected ? FontWeight.bold : FontWeight.normal,
Icon(Icons.warning_amber_rounded, color: AppColors.warningColor, size: 24.w),
SizedBox(width: 12.w),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(LocaleKeys.important.tr(context: context), style: TextStyle(fontSize: 14.f, fontWeight: FontWeight.bold, color: AppColors.warningColor)),
SizedBox(height: 4.h),
Text(
LocaleKeys.envChangeWarning.tr(context: context),
style: TextStyle(fontSize: 12.f, color: AppColors.blackBgColor),
),
],
),
),
],
),
),
);
}).toList(),
// Custom chip
InkWell(
onTap: () {
setState(() {
_isCustomMode = true;
_selectedPreset = null;
});
},
borderRadius: BorderRadius.circular(20.r),
child: Container(
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 10.h),
decoration: BoxDecoration(
color: _isCustomMode ? AppColors.infoColor : AppColors.whiteColor,
borderRadius: BorderRadius.circular(20.r),
border: Border.all(
color: _isCustomMode ? AppColors.infoColor : AppColors.greyInfoTextColor.withValues(alpha: 0.3),
),
),
child: Row(
mainAxisSize: MainAxisSize.min,
SizedBox(height: 24.h),
// Action Buttons
Row(
children: [
if (_isCustomMode)
Icon(
Icons.check_circle,
size: 18.w,
color: Colors.white,
Expanded(
child: CustomButton(
height: 50.h,
text: LocaleKeys.resetToDefault.tr(context: context),
icon: AppAssets.cancel,
iconColor: AppColors.errorColor,
iconSize: 20.w,
textColor: AppColors.errorColor,
borderColor: AppColors.errorColor.withValues(alpha: 0.3),
backgroundColor: AppColors.errorColor.withValues(alpha: 0.1),
onPressed: () => _showResetConfirmation(),
),
if (_isCustomMode) SizedBox(width: 6.w),
Icon(
Icons.edit_outlined,
size: 16.w,
color: _isCustomMode ? Colors.white : AppColors.blackBgColor,
),
SizedBox(width: 4.w),
Text(
'Custom',
style: TextStyle(
fontSize: 14.f,
color: _isCustomMode ? Colors.white : AppColors.blackBgColor,
fontWeight: _isCustomMode ? FontWeight.bold : FontWeight.normal,
SizedBox(width: 12.w),
Expanded(
child: CustomButton(
height: 50.h,
text: LocaleKeys.saveAndRestart.tr(context: context),
icon: AppAssets.confirm,
iconSize: 20.w,
onPressed: (_selectedPreset != null || _isCustomMode) ? _saveAndRestart : null,
),
),
],
),
),
),
],
),
SizedBox(height: 24.h),
// Custom URL Input Fields
if (_isCustomMode) ...[
Text('Custom URLs', style: TextStyle(fontSize: 16.f, fontWeight: FontWeight.bold)),
SizedBox(height: 12.h),
// Base URL
TextField(
controller: _baseUrlController,
decoration: InputDecoration(
labelText: 'Base URL',
hintText: 'https://example.com/',
prefixIcon: Icon(Icons.link, size: 20.w),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12.r),
),
filled: true,
fillColor: AppColors.whiteColor,
),
style: TextStyle(fontSize: 14.f),
),
SizedBox(height: 12.h),
// RC Base URL
TextField(
controller: _rcBaseUrlController,
decoration: InputDecoration(
labelText: 'RC Base URL',
hintText: 'https://rc.example.com/',
prefixIcon: Icon(Icons.link, size: 20.w),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12.r),
),
filled: true,
fillColor: AppColors.whiteColor,
),
style: TextStyle(fontSize: 14.f),
),
SizedBox(height: 12.h),
// Payment URL
TextField(
controller: _paymentUrlController,
decoration: InputDecoration(
labelText: 'Payment URL',
hintText: 'https://example.com/payment/SendPayFortRequest.aspx',
prefixIcon: Icon(Icons.payment, size: 20.w),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12.r),
),
filled: true,
fillColor: AppColors.whiteColor,
),
style: TextStyle(fontSize: 14.f),
),
SizedBox(height: 24.h),
],
// Environment Details
if (_isCustomMode && _baseUrlController.text.isNotEmpty) ...[
Text(LocaleKeys.environmentDetails.tr(context: context), style: TextStyle(fontSize: 16.f, fontWeight: FontWeight.bold)),
SizedBox(height: 12.h),
Container(
padding: EdgeInsets.all(16.w),
decoration: BoxDecoration(
color: AppColors.whiteColor,
borderRadius: BorderRadius.circular(12.r),
border: Border.all(
color: AppColors.greyInfoTextColor.withValues(alpha: 0.2),
),
),
child: Column(
children: [
_buildDetailRow(LocaleKeys.baseUrl.tr(context: context), _baseUrlController.text),
Divider(height: 20.h),
_buildDetailRow(LocaleKeys.rcUrl.tr(context: context), _rcBaseUrlController.text),
Divider(height: 20.h),
_buildDetailRow('Payment URL', _paymentUrlController.text),
Divider(height: 20.h),
_buildDetailRow(LocaleKeys.payfortMode.tr(context: context), LocaleKeys.sandbox.tr(context: context)),
],
),
),
] else if (_selectedPreset != null) ...[
Text(LocaleKeys.environmentDetails.tr(context: context), style: TextStyle(fontSize: 16.f, fontWeight: FontWeight.bold)),
SizedBox(height: 12.h),
Container(
padding: EdgeInsets.all(16.w),
decoration: BoxDecoration(
color: AppColors.whiteColor,
borderRadius: BorderRadius.circular(12.r),
border: Border.all(
color: AppColors.greyInfoTextColor.withValues(alpha: 0.2),
),
),
child: Column(
children: [
_buildDetailRow(LocaleKeys.baseUrl.tr(context: context), _selectedPreset!.baseUrl),
Divider(height: 20.h),
_buildDetailRow(LocaleKeys.rcUrl.tr(context: context), _selectedPreset!.rcBaseUrl),
Divider(height: 20.h),
_buildDetailRow('Payment URL', _selectedPreset!.serviceUrl),
Divider(height: 20.h),
_buildDetailRow(
LocaleKeys.payfortMode.tr(context: context),
_selectedPreset!.payFortEnvironment == FortEnvironment.production
? LocaleKeys.production.tr(context: context)
: LocaleKeys.sandbox.tr(context: context)),
Divider(height: 20.h),
_buildDetailRow(LocaleKeys.applePayMerchant.tr(context: context), _selectedPreset!.applePayMerchantId),
],
),
),
],
SizedBox(height: 24.h),
// Warning
Container(
padding: EdgeInsets.all(16.w),
decoration: BoxDecoration(
color: AppColors.warningColor.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(12.r),
border: Border.all(
color: AppColors.warningColor.withValues(alpha: 0.3),
),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(Icons.warning_amber_rounded, color: AppColors.warningColor, size: 24.w),
SizedBox(width: 12.w),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(LocaleKeys.important.tr(context: context),
style: TextStyle(fontSize: 14.f, fontWeight: FontWeight.bold, color: AppColors.warningColor)),
SizedBox(height: 4.h),
Text(
LocaleKeys.envChangeWarning.tr(context: context),
style: TextStyle(fontSize: 12.f, color: AppColors.blackBgColor),
),
],
),
),
],
),
),
SizedBox(height: 24.h),
// Action Buttons
Row(
children: [
Expanded(
child: CustomButton(
height: 50.h,
text: LocaleKeys.resetToDefault.tr(context: context),
icon: AppAssets.cancel,
iconColor: AppColors.errorColor,
iconSize: 20.w,
textColor: AppColors.errorColor,
borderColor: AppColors.errorColor.withValues(alpha: 0.3),
backgroundColor: AppColors.errorColor.withValues(alpha: 0.1),
onPressed: () => _showResetConfirmation(),
),
),
SizedBox(width: 12.w),
Expanded(
child: CustomButton(
height: 50.h,
text: LocaleKeys.saveAndRestart.tr(context: context),
icon: AppAssets.confirm,
iconSize: 20.w,
onPressed: (_selectedPreset != null || _isCustomMode) ? _saveAndRestart : null,
),
),
],
),
],
),
),
],
],
),
),
),
);
@ -490,9 +491,7 @@ class _EnvironmentConfigSheetState extends State<EnvironmentConfigSheet> {
try {
if (_isCustomMode) {
// Validate custom URLs
if (_baseUrlController.text.trim().isEmpty ||
_rcBaseUrlController.text.trim().isEmpty ||
_paymentUrlController.text.trim().isEmpty) {
if (_baseUrlController.text.trim().isEmpty || _rcBaseUrlController.text.trim().isEmpty || _paymentUrlController.text.trim().isEmpty) {
Utils.showToast('Please enter all custom URLs');
return;
}

@ -578,10 +578,10 @@ class RrtMapScreen extends StatelessWidget {
child: Row(
children: [
hospitalAndPickUpItemContent(
title: "Select Hospital".tr(),
title: LocaleKeys.selectHospital.tr(),
subTitle: context
.read<EmergencyServicesViewModel>()
.getSelectedHospitalName() ?? "Select Hospital".tr(),
.getSelectedHospitalName() ?? LocaleKeys.selectHospital.tr(),
leadingIcon: AppAssets.hospital,
),
Utils.buildSvgWithAssets(

@ -797,10 +797,10 @@ packages:
dependency: "direct main"
description:
name: flutter_zoom_videosdk
sha256: "46a4dea664b1c969099328a499c198a1755adf9ac333dea28bea5187910b3bf9"
sha256: "87caad07b994f09b9d8c4b8054c0dff5659029abae38dd6ec223460c3f1bcb7d"
url: "https://pub.dev"
source: hosted
version: "2.1.10"
version: "2.5.10"
fluttertoast:
dependency: "direct main"
description:
@ -809,6 +809,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "8.2.14"
freerasp:
dependency: "direct main"
description:
name: freerasp
sha256: afba9e2ec1b578450701345230e87fda54e95c2f448154fbca55cf993f1ab2b3
url: "https://pub.dev"
source: hosted
version: "8.2.1"
fwfh_cached_network_image:
dependency: transitive
description:
@ -1657,6 +1665,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.28.0"
safe_device:
dependency: "direct main"
description:
name: safe_device
sha256: ad1b32a564484c710f6d52b5a526838c8a7d999c8ab2e14890ff55c06a018248
url: "https://pub.dev"
source: hosted
version: "1.4.1"
sanitize_html:
dependency: transitive
description:

Loading…
Cancel
Save