family screen add fixes & remove & switch & widgets

dev_aamir
aamir-csol 2 weeks ago
parent 6f01f92dd0
commit 987fe73128

@ -129,6 +129,7 @@ class SizeUtils {
}
log("longerSide: $longerSide");
log("shorterSide: $shorterSide");
log("isTablet: $isTablet");
}
}

@ -315,7 +315,7 @@ class Utils {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: isSmallWidget ? 0.h : 48.h),
Lottie.asset(AppAnimations.noData, repeat: false, reverse: false, frameRate: FrameRate(60), width: width.h, height: height.h, fit: BoxFit.fill),
Lottie.asset(AppAnimations.noData, repeat: false, reverse: false, frameRate: FrameRate(60), width: width, height: height, fit: BoxFit.cover),
SizedBox(height: 16.h),
(noDataText ?? LocaleKeys.noDataAvailable.tr())
.toText16(weight: FontWeight.w500, color: AppColors.greyTextColor, isCenter: true)

@ -87,10 +87,10 @@ class LoginScreenState extends State<LoginScreen> {
isAllowLeadingIcon: true,
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 10.h),
leadingIcon: AppAssets.student_card,
errorMessage: "Please enter a valid national ID or file number",
errorMessage: "Please enter a valid national ID or file number".needTranslation,
hasError: false,
),
SizedBox(height: 16.h), // Adjusted to sizer unit (approx 16px)
SizedBox(height: 16.h),
CustomButton(
height: 50.h,
text: LocaleKeys.login.tr(),
@ -109,17 +109,12 @@ class LoginScreenState extends State<LoginScreen> {
}
},
),
SizedBox(height: 10.h), // Adjusted to sizer unit (approx 14px)
SizedBox(height: 10.h),
Center(
child: RichText(
textAlign: TextAlign.center,
text: TextSpan(
style: context.dynamicTextStyle(
color: Colors.black,
fontSize: 14.f, // Adjusted to sizer unit
height: 26 / 16, // This height is a ratio, may need re-evaluation
fontWeight: FontWeight.w500,
),
style: context.dynamicTextStyle(color: Colors.black, fontSize: 14.f, height: 26 / 16, fontWeight: FontWeight.w500),
children: <TextSpan>[
TextSpan(text: LocaleKeys.dontHaveAccount.tr(), style: context.dynamicTextStyle()),
TextSpan(text: " "),
@ -139,9 +134,9 @@ class LoginScreenState extends State<LoginScreen> {
),
],
),
).withVerticalPadding(2), // Adjusted to sizer unit
).withVerticalPadding(2.h),
),
SizedBox(height: 20.h), // Adjusted to sizer unit (approx 14px)
SizedBox(height: 20.h),
],
),
),

@ -25,14 +25,14 @@ class QuickLoginState extends State<QuickLogin> {
Widget build(BuildContext context) {
NavigationService navigationService = getIt.get<NavigationService>();
return Container(
decoration: const BoxDecoration(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(24),
topRight: Radius.circular(24),
topLeft: Radius.circular(24.r),
topRight: Radius.circular(24.r),
),
),
padding: const EdgeInsets.all(24),
padding: EdgeInsets.all(24.w),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
@ -50,7 +50,7 @@ class QuickLoginState extends State<QuickLogin> {
child: Utils.buildSvgWithAssets(icon: AppAssets.cross_circle)),
],
),
Utils.showLottie(context: context, assetPath: AppAnimations.checkmark, width: 120, height: 120, repeat: true),
Utils.showLottie(context: context, assetPath: AppAnimations.checkmark, width: 120.w, height: 120.h, repeat: true),
LocaleKeys.allSet.tr().toText16(textAlign: TextAlign.center, weight: FontWeight.w500)
// Text(
// ' TranslationBase.of(context).allSet',
@ -67,7 +67,7 @@ class QuickLoginState extends State<QuickLogin> {
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset(AppAssets.lockIcon, height: 100),
Image.asset(AppAssets.lockIcon, height: 100.h),
SizedBox(height: 10.h),
LocaleKeys.enableQuickLogin.tr().toText26(isBold: true),
// Text(
@ -89,7 +89,7 @@ class QuickLoginState extends State<QuickLogin> {
// height: 1.5,
// ),
//),
const SizedBox(height: 24),
SizedBox(height: 24.h),
// Buttons
Row(
mainAxisAlignment: MainAxisAlignment.end,
@ -121,9 +121,7 @@ class QuickLoginState extends State<QuickLogin> {
},
backgroundColor: Color(0xffFEE9EA),
borderColor: Color(0xffFEE9EA),
textColor: Colors.red,
// icon: "assets/images/svg/apple-finder.svg",
)),
textColor: Colors.red)),
],
),
],

@ -78,8 +78,7 @@ class _RegisterNew extends State<RegisterNew> {
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Utils.showLottie(
context: context, assetPath: 'assets/animations/lottie/register.json', width: 200.h, height: 200.h, fit: BoxFit.cover, repeat: true),
Utils.showLottie(context: context, assetPath: 'assets/animations/lottie/register.json', width: 200.w, height: 200.h, fit: BoxFit.cover, repeat: true),
SizedBox(height: 16.h),
LocaleKeys.prepareToElevate.tr().toText32(isBold: true),
SizedBox(height: 24.h),
@ -113,7 +112,7 @@ class _RegisterNew extends State<RegisterNew> {
Divider(height: 1),
TextInputWidget(
labelText: LocaleKeys.dob.tr(),
hintText: "11 July, 1994",
hintText: "11 July, 1994".needTranslation,
controller: authVm.dobController,
focusNode: _dobFocusNode,
isEnable: true,
@ -240,7 +239,7 @@ class _RegisterNew extends State<RegisterNew> {
),
),
),
SizedBox(height: 30),
SizedBox(height: 30.h),
],
),
),

@ -69,7 +69,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
height: double.infinity,
child: SingleChildScrollView(
reverse: false,
padding: EdgeInsets.only(left: 24.h, right: 24.h, top: 0.h),
padding: EdgeInsets.only(left: 24.w, right: 24.w, top: 0.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
@ -98,7 +98,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
leadingIcon: AppAssets.user_circle,
labelColor: AppColors.textColor,
).paddingSymmetrical(0.h, 16.h),
Divider(height: 1, color: AppColors.greyColor),
Divider(height: 1.h, color: AppColors.greyColor),
TextInputWidget(
labelText: LocaleKeys.nationalIdNumber.tr(),
hintText: authVM!.isUserFromUAE() ? appState.getUserRegistrationPayload.patientIdentificationId.toString() : (appState.getNHICUserData.idNumber ?? ""),
@ -130,7 +130,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
hasSelectionCustomIcon: true,
isAllowRadius: false,
labelColor: AppColors.textColor,
padding: const EdgeInsets.only(top: 8, bottom: 8, left: 0, right: 0),
padding: EdgeInsets.only(top: 8.h, bottom: 8.h, left: 0, right: 0),
selectionCustomIcon: AppAssets.arrow_down,
leadingIcon: AppAssets.user_full,
).withVerticalPadding(8);
@ -167,7 +167,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
hasSelectionCustomIcon: true,
isAllowRadius: false,
labelColor: AppColors.textColor,
padding: const EdgeInsets.only(top: 8, bottom: 8, left: 0, right: 0),
padding: EdgeInsets.only(top: 8.h, bottom: 8.h, left: 0, right: 0),
selectionCustomIcon: AppAssets.arrow_down,
leadingIcon: AppAssets.smart_phone,
).withVerticalPadding(8);
@ -188,7 +188,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
leadingIcon: AppAssets.smart_phone,
onChange: (value) {})
.paddingSymmetrical(0.h, 16.h),
Divider(height: 1, color: AppColors.greyColor),
Divider(height: 1.h, color: AppColors.greyColor),
authVM!.isUserFromUAE()
? Selector<AuthenticationViewModel, ({List<NationalityCountries>? countriesList, NationalityCountries? selectedCountry, bool isArabic})>(
selector: (context, authViewModel) {
@ -217,10 +217,10 @@ class _RegisterNew extends State<RegisterNewStep2> {
hasSelectionCustomIcon: true,
labelColor: AppColors.textColor,
isAllowRadius: false,
padding: const EdgeInsets.only(top: 8, bottom: 8, left: 0, right: 0),
padding: EdgeInsets.only(top: 8.h, bottom: 8.h, left: 0, right: 0),
selectionCustomIcon: AppAssets.arrow_down,
leadingIcon: AppAssets.globe,
).withVerticalPadding(8);
).withVerticalPadding(8.h);
},
)
: TextInputWidget(
@ -256,7 +256,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
leadingIcon: AppAssets.call)
.paddingSymmetrical(0.h, 16.h),
Divider(
height: 1,
height: 1.h,
color: AppColors.greyColor,
),
TextInputWidget(
@ -292,9 +292,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
iconColor: AppColors.primaryRedColor,
),
),
SizedBox(
width: 16,
),
SizedBox(width: 16.w),
Expanded(
child: CustomButton(
backgroundColor: AppColors.primaryRedColor,

@ -235,8 +235,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
iconColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor,
textColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor,
iconSize: 12.w,
backgroundColor:
insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor.withOpacity(0.1) : AppColors.successColor.withOpacity(0.1),
backgroundColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor.withOpacity(0.1) : AppColors.successColor.withOpacity(0.1),
labelPadding: EdgeInsetsDirectional.only(start: 4.w, end: 8.w),
);
}),
@ -517,11 +516,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
Transform.flip(
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
width: 15.w,
height: 15.h,
fit: BoxFit.contain,
iconColor: AppColors.textColor)),
icon: AppAssets.forward_arrow_icon_small, width: 15.w, height: 15.h, fit: BoxFit.contain, iconColor: AppColors.textColor)),
],
).onPress(() {
prescriptionVM.setPrescriptionsDetailsLoading();
@ -597,8 +592,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
context,
noDataText: "You don't have any prescriptions yet.".needTranslation,
isSmallWidget: true,
width: 62.w,
height: 62.h,
width: 30.w,
height: 30.h,
),
).paddingSymmetrical(24.w, 0.h);
}),
@ -811,8 +806,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
insuranceViewModel.setIsInsuranceUpdateDetailsLoading(true);
insuranceViewModel.getPatientInsuranceDetailsForUpdate(
appState.getAuthenticatedUser()!.patientId.toString(), appState.getAuthenticatedUser()!.patientIdentificationNo.toString());
showCommonBottomSheetWithoutHeight(context,
child: PatientInsuranceCardUpdateCard(), callBackFunc: () {}, title: "", isCloseButtonVisible: false, isFullScreen: false);
showCommonBottomSheetWithoutHeight(context, child: PatientInsuranceCardUpdateCard(), callBackFunc: () {}, title: "", isCloseButtonVisible: false, isFullScreen: false);
},
backgroundColor: AppColors.bgGreenColor.withOpacity(0.20),
borderColor: AppColors.bgGreenColor.withOpacity(0.0),

@ -141,10 +141,10 @@ class _FamilyCardsState extends State<FamilyCards> {
physics: NeverScrollableScrollPhysics(),
itemCount: widget.profiles.length,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
crossAxisCount: isTablet ? 3 : 2,
crossAxisSpacing: 10.h,
mainAxisSpacing: 10.h,
childAspectRatio: widget.isShowDetails ? 0.56.h : 0.65.h,
childAspectRatio: widget.isShowDetails ? 0.56 : 0.65,
),
padding: EdgeInsets.only(bottom: 20.h),
itemBuilder: (context, index) {
@ -153,8 +153,8 @@ class _FamilyCardsState extends State<FamilyCards> {
final isParentUser = appState.getAuthenticatedUser()?.isParentUser ?? false;
final canSwitch = isParentUser || (!isParentUser && profile.responseId == appState.getSuperUserID);
return Container(
padding: EdgeInsets.symmetric(vertical: 15.h, horizontal: 15.h),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24),
padding: EdgeInsets.symmetric(vertical: 15.h, horizontal: 15.w),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r),
child: Opacity(
opacity: isActive || profile.status == FamilyFileEnum.pending.toInt || !canSwitch ? 0.4 : 1.0, // Fade all content if active
child: Stack(

Loading…
Cancel
Save