Compare commits

..

No commits in common. '86fcb055162691ba36cd3d8d5697f72646618b3e' and 'fc3377c17b3a260862073dcfabf6de8c3474ccc6' have entirely different histories.

@ -210,8 +210,8 @@ class ApiClientImp implements ApiClient {
body['TokenID'] = "@dm!n"; body['TokenID'] = "@dm!n";
} }
// body['TokenID'] = "@dm!n"; body['TokenID'] = "@dm!n";
// body['PatientID'] = 4772993; // body['PatientID'] = 3648831;
// body['PatientID'] = 89754444; // body['PatientID'] = 89754444;
// body['PatientTypeID'] = 1; // body['PatientTypeID'] = 1;
// body['PatientOutSA'] = 0; // body['PatientOutSA'] = 0;

@ -4,14 +4,12 @@ import 'dart:io';
import 'dart:math' as dartMath; import 'dart:math' as dartMath;
import 'dart:typed_data'; import 'dart:typed_data';
import 'package:clarity_flutter/clarity_flutter.dart';
import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:crypto/crypto.dart' as crypto; import 'package:crypto/crypto.dart' as crypto;
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:fluttertoast/fluttertoast.dart'; import 'package:fluttertoast/fluttertoast.dart';
import 'package:get_it/get_it.dart';
import 'package:google_api_availability/google_api_availability.dart'; import 'package:google_api_availability/google_api_availability.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/app_state.dart';

@ -94,29 +94,27 @@ class LoginScreenState extends State<LoginScreen> {
LocaleKeys.welcomeToDrSulaiman.tr(context: context).toText32(isBold: true, color: AppColors.textColor ), LocaleKeys.welcomeToDrSulaiman.tr(context: context).toText32(isBold: true, color: AppColors.textColor ),
SizedBox(height: 32.h), SizedBox(height: 32.h),
Localizations.override(context: context, locale: Locale('en', 'US'), child: Container()), // Force English locale for this widget Localizations.override(context: context, locale: Locale('en', 'US'), child: Container()), // Force English locale for this widget
ClarityUnmask( TextInputWidget(
child: TextInputWidget( labelText: LocaleKeys.nationalIdFileNumber.tr(context: context),
labelText: LocaleKeys.nationalIdFileNumber.tr(context: context), hintText: "xxxxxxxxx",
hintText: "xxxxxxxxx", controller: authVm.nationalIdController,
controller: authVm.nationalIdController, focusNode: _nationalIdFocusNode,
focusNode: _nationalIdFocusNode, keyboardType: TextInputType.number,
keyboardType: TextInputType.number, isEnable: true,
isEnable: true, prefix: null,
prefix: null, autoFocus: true,
autoFocus: true, isAllowRadius: true,
isAllowRadius: true, isBorderAllowed: false,
isBorderAllowed: false, isAllowLeadingIcon: true,
isAllowLeadingIcon: true, padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 10.h),
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 10.h), leadingIcon: AppAssets.student_card,
leadingIcon: AppAssets.student_card, errorMessage: authVm.nationalIdError,
errorMessage: authVm.nationalIdError, hasError: authVm.nationalIdError != null,
hasError: authVm.nationalIdError != null, fontFamily: "Poppins",
fontFamily: "Poppins", onChange: (value) {
onChange: (value) { // Clear error when user starts typing
// Clear error when user starts typing authVm.clearNationalIdError();
authVm.clearNationalIdError(); },
},
),
), ),
SizedBox(height: 16.h), SizedBox(height: 16.h),
CustomButton( CustomButton(
@ -207,67 +205,65 @@ class LoginScreenState extends State<LoginScreen> {
child: SingleChildScrollView( child: SingleChildScrollView(
child: Consumer<AuthenticationViewModel>( child: Consumer<AuthenticationViewModel>(
builder: (context, authVm, child) { builder: (context, authVm, child) {
return ClarityUnmask( return GenericBottomSheet(
child: GenericBottomSheet( countryCode: authVm.selectedCountrySignup.countryCode,
countryCode: authVm.selectedCountrySignup.countryCode, initialPhoneNumber: "",
initialPhoneNumber: "", textController: phoneNumberController,
textController: phoneNumberController, isEnableCountryDropdown: true,
isEnableCountryDropdown: true, onCountryChange: (country) {
onCountryChange: (country) { authVm.onCountryChange(country);
authVm.onCountryChange(country); // Clear error when country changes
// Clear error when country changes authVm.clearPhoneNumberError();
authVm.clearPhoneNumberError(); },
}, onChange: (value) {
onChange: (value) { authVm.onPhoneNumberChange(value);
authVm.onPhoneNumberChange(value); // Clear error when user starts typing
// Clear error when user starts typing authVm.clearPhoneNumberError();
authVm.clearPhoneNumberError(); },
}, phoneNumberError: authVm.phoneNumberError,
phoneNumberError: authVm.phoneNumberError, buttons: [
buttons: [ if (authVm.selectedCountrySignup != CountryEnum.others)
if (authVm.selectedCountrySignup != CountryEnum.others)
Padding(
padding: EdgeInsets.only(bottom: 10.h),
child: CustomButton(
text: LocaleKeys.sendOTPSMS.tr(context: context),
onPressed: () async {
validatePhoneAndProceed(OTPTypeEnum.sms);
},
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedBorderColor,
textColor: Colors.white,
iconColor: Colors.white,
icon: AppAssets.message,
),
),
if (authVm.selectedCountrySignup != CountryEnum.others)
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 8.h),
child: LocaleKeys.oR.tr(context: context).toText16(color: AppColors.textColor),
),
],
),
Padding( Padding(
padding: EdgeInsets.only(bottom: 10.h, top: 10.h), padding: EdgeInsets.only(bottom: 10.h),
child: CustomButton( child: CustomButton(
text: LocaleKeys.sendOTPWHATSAPP.tr(context: context), text: LocaleKeys.sendOTPSMS.tr(context: context),
onPressed: () async { onPressed: () async {
validatePhoneAndProceed(OTPTypeEnum.whatsapp); validatePhoneAndProceed(OTPTypeEnum.sms);
}, },
backgroundColor: AppColors.whiteColor, backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.textColor, borderColor: AppColors.primaryRedBorderColor,
textColor: AppColors.textColor, textColor: Colors.white,
icon: AppAssets.whatsapp, iconColor: Colors.white,
iconColor: null, icon: AppAssets.message,
applyThemeColor: false,
), ),
), ),
], if (authVm.selectedCountrySignup != CountryEnum.others)
), Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 8.h),
child: LocaleKeys.oR.tr(context: context).toText16(color: AppColors.textColor),
),
],
),
Padding(
padding: EdgeInsets.only(bottom: 10.h, top: 10.h),
child: CustomButton(
text: LocaleKeys.sendOTPWHATSAPP.tr(context: context),
onPressed: () async {
validatePhoneAndProceed(OTPTypeEnum.whatsapp);
},
backgroundColor: AppColors.whiteColor,
borderColor: AppColors.textColor,
textColor: AppColors.textColor,
icon: AppAssets.whatsapp,
iconColor: null,
applyThemeColor: false,
),
),
],
); );
}, },
), ),

@ -63,13 +63,11 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
scheduleMicrotask(() { scheduleMicrotask(() {
payfortViewModel.initPayfortViewModel(); payfortViewModel.initPayfortViewModel();
myAppointmentsViewModel.getTamaraInstallmentsDetails().then((val) { myAppointmentsViewModel.getTamaraInstallmentsDetails().then((val) {
if (myAppointmentsViewModel.getTamaraInstallmentsDetailsResponseModel != null) { if (num.parse(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.total!) >= myAppointmentsViewModel.getTamaraInstallmentsDetailsResponseModel!.minLimit!.amount! &&
if (num.parse(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.total!) >= myAppointmentsViewModel.getTamaraInstallmentsDetailsResponseModel!.minLimit!.amount! && num.parse(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.total!) <= myAppointmentsViewModel.getTamaraInstallmentsDetailsResponseModel!.maxLimit!.amount!) {
num.parse(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.total!) <= myAppointmentsViewModel.getTamaraInstallmentsDetailsResponseModel!.maxLimit!.amount!) { setState(() {
setState(() { isShowTamara = true;
isShowTamara = true; });
});
}
} }
}); });
}); });

@ -145,8 +145,6 @@ class _LandingPageState extends State<LandingPage> {
} }
if (appState.isAuthenticated) { if (appState.isAuthenticated) {
Clarity.setCustomUserId(appState.getAuthenticatedUser()!.patientId.toString());
habibWalletVM.initHabibWalletProvider(); habibWalletVM.initHabibWalletProvider();
habibWalletVM.getPatientBalanceAmount(); habibWalletVM.getPatientBalanceAmount();
habibWalletVM.getLakumAccountInformation(); habibWalletVM.getLakumAccountInformation();

@ -1,6 +1,5 @@
import 'dart:ui' as ui; import 'dart:ui' as ui;
import 'package:clarity_flutter/clarity_flutter.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
@ -406,66 +405,64 @@ class TextInputWidget extends StatelessWidget {
child: Localizations.override( child: Localizations.override(
context: context, context: context,
locale: const Locale('en', 'US'), // Force English locale for TextField locale: const Locale('en', 'US'), // Force English locale for TextField
child: ClarityUnmask( child: TextField(
child: TextField( hintLocales: const [Locale('en', 'US')],
hintLocales: const [Locale('en', 'US')], enabled: isEnable,
enabled: isEnable, scrollPadding: EdgeInsets.zero,
scrollPadding: EdgeInsets.zero, keyboardType: isMultiline
keyboardType: isMultiline ? TextInputType.multiline
? TextInputType.multiline : (isWalletAmountInput! ? const TextInputType.numberWithOptions(decimal: true) : keyboardType),
: (isWalletAmountInput! ? const TextInputType.numberWithOptions(decimal: true) : keyboardType), controller: controller,
controller: controller, readOnly: isReadOnly,
readOnly: isReadOnly, textAlignVertical: TextAlignVertical.top,
textAlignVertical: TextAlignVertical.top, textAlign: isArabic ? TextAlign.right : TextAlign.left,
textAlign: isArabic ? TextAlign.right : TextAlign.left, textDirection: ui.TextDirection.ltr,
textDirection: ui.TextDirection.ltr, onChanged: onChange,
onChanged: onChange, focusNode: focusNode ?? _focusNode,
focusNode: focusNode ?? _focusNode, autofocus: autoFocus,
autofocus: autoFocus, textInputAction: TextInputAction.done,
textInputAction: TextInputAction.done, cursorHeight: isWalletAmountInput! ? 40.h : 20.h,
cursorHeight: isWalletAmountInput! ? 40.h : 20.h, maxLength: isWalletAmountInput! ? 7 : 100,
maxLength: isWalletAmountInput! ? 7 : 100, inputFormatters: isWalletAmountInput!
inputFormatters: isWalletAmountInput! ? [
? [ _ThousandSeparatorInputFormatter(),
_ThousandSeparatorInputFormatter(), ]
] : null,
: null, onTapOutside: (event) {
onTapOutside: (event) { FocusManager.instance.primaryFocus?.unfocus();
FocusManager.instance.primaryFocus?.unfocus(); },
}, onSubmitted: onSubmitted,
onSubmitted: onSubmitted, minLines: isMultiline ? minLines : 1,
minLines: isMultiline ? minLines : 1, maxLines: isMultiline ? maxLines : 1,
maxLines: isMultiline ? maxLines : 1, style: TextStyle(
style: TextStyle( fontSize: fontS,
fontSize: fontS, height: isMultiline ? 1.2 : (isWalletAmountInput! ? 1 / 4 : 0),
height: isMultiline ? 1.2 : (isWalletAmountInput! ? 1 / 4 : 0), fontWeight: FontWeight.w600,
color: AppColors.textColor,
letterSpacing: -1,
fontFamily: fontFamily,
locale: const Locale('en', 'US'), // Force English locale for text style
),
decoration: InputDecoration(
counterText: "",
isDense: true,
hintText: hintText,
hintStyle: TextStyle(
fontFamily: isArabic ? 'CairoArabic' : 'Poppins',
fontSize: 14.f,
height: 21 / 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: AppColors.textColor, color: hintColor != null ? AppColors.textColor : Color(0xff898A8D),
letterSpacing: -1, letterSpacing: -0.75,
fontFamily: fontFamily,
locale: const Locale('en', 'US'), // Force English locale for text style
),
decoration: InputDecoration(
counterText: "",
isDense: true,
hintText: hintText,
hintStyle: TextStyle(
fontFamily: isArabic ? 'CairoArabic' : 'Poppins',
fontSize: 14.f,
height: 21 / 16,
fontWeight: FontWeight.w600,
color: hintColor != null ? AppColors.textColor : Color(0xff898A8D),
letterSpacing: -0.75,
),
prefixIconConstraints: BoxConstraints(minWidth: 30.h),
prefixIcon: prefix == null ? null : "+${prefix!}".toText14(letterSpacing: -1, color: AppColors.textColor, isBold: true),
contentPadding: EdgeInsets.only(right: isArabic ? 10.w : 0),
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
// Show red border when field has error - but we handle this in the parent Container
// The parent Container in build() already shows red border based on hasError flag
), ),
prefixIconConstraints: BoxConstraints(minWidth: 30.h),
prefixIcon: prefix == null ? null : "+${prefix!}".toText14(letterSpacing: -1, color: AppColors.textColor, isBold: true),
contentPadding: EdgeInsets.only(right: isArabic ? 10.w : 0),
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
// Show red border when field has error - but we handle this in the parent Container
// The parent Container in build() already shows red border based on hasError flag
), ),
), ),
), ),

Loading…
Cancel
Save