|
|
|
@ -1,3 +1,5 @@
|
|
|
|
|
|
|
|
import 'dart:async';
|
|
|
|
|
|
|
|
|
|
|
|
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:hmg_patient_app_new/core/app_assets.dart';
|
|
|
|
import 'package:hmg_patient_app_new/core/app_assets.dart';
|
|
|
|
@ -16,11 +18,24 @@ import 'package:hmg_patient_app_new/widgets/input_widget.dart';
|
|
|
|
import 'package:hmg_patient_app_new/widgets/shimmer/movies_shimmer_widget.dart';
|
|
|
|
import 'package:hmg_patient_app_new/widgets/shimmer/movies_shimmer_widget.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class MedicalFilePage extends StatelessWidget {
|
|
|
|
class MedicalFilePage extends StatefulWidget {
|
|
|
|
MedicalFilePage({super.key});
|
|
|
|
MedicalFilePage({super.key});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
State<MedicalFilePage> createState() => _MedicalFilePageState();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
late InsuranceViewModel insuranceViewModel;
|
|
|
|
late InsuranceViewModel insuranceViewModel;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
void initState() {
|
|
|
|
|
|
|
|
scheduleMicrotask(() {
|
|
|
|
|
|
|
|
insuranceViewModel.initInsuranceProvider();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
super.initState();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
insuranceViewModel = Provider.of<InsuranceViewModel>(context);
|
|
|
|
insuranceViewModel = Provider.of<InsuranceViewModel>(context);
|
|
|
|
@ -30,180 +45,178 @@ class MedicalFilePage extends StatelessWidget {
|
|
|
|
title: const Text('Appointments'),
|
|
|
|
title: const Text('Appointments'),
|
|
|
|
backgroundColor: AppColors.bgScaffoldColor,
|
|
|
|
backgroundColor: AppColors.bgScaffoldColor,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
body: Padding(
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
padding: EdgeInsets.all(24.h),
|
|
|
|
child: Column(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
LocaleKeys.medicalFile.tr(context: context).toText22(isBold: true).paddingSymmetrical(24.h, 0.0),
|
|
|
|
children: [
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
LocaleKeys.medicalFile.tr(context: context).toText22(isBold: true),
|
|
|
|
TextInputWidget(
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
labelText: LocaleKeys.search.tr(context: context),
|
|
|
|
TextInputWidget(
|
|
|
|
hintText: "Type any record",
|
|
|
|
labelText: LocaleKeys.search.tr(context: context),
|
|
|
|
controller: TextEditingController(),
|
|
|
|
hintText: "Type any record",
|
|
|
|
keyboardType: TextInputType.number,
|
|
|
|
controller: TextEditingController(),
|
|
|
|
isEnable: true,
|
|
|
|
keyboardType: TextInputType.number,
|
|
|
|
prefix: null,
|
|
|
|
isEnable: true,
|
|
|
|
autoFocus: false,
|
|
|
|
prefix: null,
|
|
|
|
isBorderAllowed: false,
|
|
|
|
autoFocus: false,
|
|
|
|
isAllowLeadingIcon: true,
|
|
|
|
isBorderAllowed: false,
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 8.h),
|
|
|
|
isAllowLeadingIcon: true,
|
|
|
|
leadingIcon: AppAssets.student_card,
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 8.h),
|
|
|
|
).paddingSymmetrical(24.h, 0.0),
|
|
|
|
leadingIcon: AppAssets.student_card,
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
|
|
|
borderRadius: 24,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
child: Padding(
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.all(16.h),
|
|
|
|
width: double.infinity,
|
|
|
|
child: Column(
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
children: [
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
Row(
|
|
|
|
borderRadius: 24,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
),
|
|
|
|
children: [
|
|
|
|
child: Padding(
|
|
|
|
Image.asset(
|
|
|
|
padding: EdgeInsets.all(16.h),
|
|
|
|
AppAssets.male_img,
|
|
|
|
child: Column(
|
|
|
|
width: 56.h,
|
|
|
|
children: [
|
|
|
|
height: 56.h,
|
|
|
|
Row(
|
|
|
|
),
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
SizedBox(width: 8.h),
|
|
|
|
children: [
|
|
|
|
Column(
|
|
|
|
Image.asset(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
AppAssets.male_img,
|
|
|
|
children: [
|
|
|
|
width: 56.h,
|
|
|
|
"Haroon Amjad".toText18(isBold: true),
|
|
|
|
height: 56.h,
|
|
|
|
SizedBox(height: 4.h),
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
SizedBox(width: 8.h),
|
|
|
|
children: [
|
|
|
|
Column(
|
|
|
|
CustomButton(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
icon: AppAssets.file_icon,
|
|
|
|
children: [
|
|
|
|
iconColor: AppColors.blackColor,
|
|
|
|
"Haroon Amjad".toText18(isBold: true),
|
|
|
|
iconSize: 12.h,
|
|
|
|
SizedBox(height: 4.h),
|
|
|
|
text: "File no: 3628599",
|
|
|
|
Row(
|
|
|
|
onPressed: () {},
|
|
|
|
children: [
|
|
|
|
backgroundColor: AppColors.greyColor,
|
|
|
|
CustomButton(
|
|
|
|
borderColor: AppColors.greyColor,
|
|
|
|
icon: AppAssets.file_icon,
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
iconColor: AppColors.blackColor,
|
|
|
|
fontSize: 10,
|
|
|
|
iconSize: 12.h,
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
text: "File no: 3628599",
|
|
|
|
borderRadius: 12,
|
|
|
|
onPressed: () {},
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
backgroundColor: AppColors.greyColor,
|
|
|
|
height: 30.h,
|
|
|
|
borderColor: AppColors.greyColor,
|
|
|
|
),
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
SizedBox(width: 4.h),
|
|
|
|
fontSize: 10,
|
|
|
|
CustomButton(
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
text: LocaleKeys.verified.tr(context: context),
|
|
|
|
borderRadius: 12,
|
|
|
|
onPressed: () {},
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
backgroundColor: AppColors.greyColor,
|
|
|
|
height: 30.h,
|
|
|
|
borderColor: AppColors.greyColor,
|
|
|
|
),
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
SizedBox(width: 4.h),
|
|
|
|
fontSize: 10,
|
|
|
|
CustomButton(
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
text: LocaleKeys.verified.tr(context: context),
|
|
|
|
borderRadius: 12,
|
|
|
|
onPressed: () {},
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
backgroundColor: AppColors.greyColor,
|
|
|
|
height: 30.h,
|
|
|
|
borderColor: AppColors.greyColor,
|
|
|
|
),
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
],
|
|
|
|
fontSize: 10,
|
|
|
|
),
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
],
|
|
|
|
borderRadius: 12,
|
|
|
|
)
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
],
|
|
|
|
height: 30.h,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
],
|
|
|
|
Divider(color: AppColors.dividerColor, height: 1.h),
|
|
|
|
),
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
],
|
|
|
|
Row(
|
|
|
|
)
|
|
|
|
children: [
|
|
|
|
],
|
|
|
|
CustomButton(
|
|
|
|
),
|
|
|
|
text: "30 Years Old",
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
onPressed: () {},
|
|
|
|
Divider(color: AppColors.dividerColor, height: 1.h),
|
|
|
|
backgroundColor: AppColors.greyColor,
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
borderColor: AppColors.greyColor,
|
|
|
|
Row(
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
children: [
|
|
|
|
fontSize: 10,
|
|
|
|
CustomButton(
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
text: "30 Years Old",
|
|
|
|
borderRadius: 12,
|
|
|
|
onPressed: () {},
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
backgroundColor: AppColors.greyColor,
|
|
|
|
height: 30.h,
|
|
|
|
borderColor: AppColors.greyColor,
|
|
|
|
),
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
SizedBox(width: 4.h),
|
|
|
|
fontSize: 10,
|
|
|
|
CustomButton(
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
icon: AppAssets.blood_icon,
|
|
|
|
borderRadius: 12,
|
|
|
|
iconColor: AppColors.primaryRedColor,
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
iconSize: 13.h,
|
|
|
|
height: 30.h,
|
|
|
|
text: "Blood: A+",
|
|
|
|
),
|
|
|
|
onPressed: () {},
|
|
|
|
SizedBox(width: 4.h),
|
|
|
|
backgroundColor: AppColors.greyColor,
|
|
|
|
CustomButton(
|
|
|
|
borderColor: AppColors.greyColor,
|
|
|
|
icon: AppAssets.blood_icon,
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
iconColor: AppColors.primaryRedColor,
|
|
|
|
fontSize: 10,
|
|
|
|
iconSize: 13.h,
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
text: "Blood: A+",
|
|
|
|
borderRadius: 12,
|
|
|
|
onPressed: () {},
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
backgroundColor: AppColors.greyColor,
|
|
|
|
height: 30.h,
|
|
|
|
borderColor: AppColors.greyColor,
|
|
|
|
),
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
SizedBox(width: 4.h),
|
|
|
|
fontSize: 10,
|
|
|
|
CustomButton(
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
icon: AppAssets.insurance_active_icon,
|
|
|
|
borderRadius: 12,
|
|
|
|
iconColor: AppColors.successColor,
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
iconSize: 13.h,
|
|
|
|
height: 30.h,
|
|
|
|
text: "Insurance Active",
|
|
|
|
),
|
|
|
|
onPressed: () {},
|
|
|
|
SizedBox(width: 4.h),
|
|
|
|
backgroundColor: AppColors.bgGreenColor.withOpacity(0.20),
|
|
|
|
CustomButton(
|
|
|
|
borderColor: AppColors.bgGreenColor.withOpacity(0.0),
|
|
|
|
icon: AppAssets.insurance_active_icon,
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
iconColor: AppColors.successColor,
|
|
|
|
fontSize: 10,
|
|
|
|
iconSize: 13.h,
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
text: "Insurance Active",
|
|
|
|
borderRadius: 12,
|
|
|
|
onPressed: () {},
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
backgroundColor: AppColors.bgGreenColor.withOpacity(0.20),
|
|
|
|
height: 30.h,
|
|
|
|
borderColor: AppColors.bgGreenColor.withOpacity(0.0),
|
|
|
|
),
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
],
|
|
|
|
fontSize: 10,
|
|
|
|
),
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
borderRadius: 12,
|
|
|
|
],
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
|
|
|
|
height: 30.h,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
).paddingSymmetrical(24.h, 0.0),
|
|
|
|
CustomTabBar(
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
activeTextColor: Color(0xffED1C2B),
|
|
|
|
CustomTabBar(
|
|
|
|
activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1),
|
|
|
|
activeTextColor: Color(0xffED1C2B),
|
|
|
|
tabs: [
|
|
|
|
activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1),
|
|
|
|
CustomTabBarModel(AppAssets.myFilesBottom, "General".needTranslation),
|
|
|
|
tabs: [
|
|
|
|
CustomTabBarModel(AppAssets.insurance, "Insurance".needTranslation),
|
|
|
|
CustomTabBarModel(AppAssets.myFilesBottom, LocaleKeys.general.tr(context: context).needTranslation),
|
|
|
|
CustomTabBarModel(AppAssets.requests, "Requests".needTranslation),
|
|
|
|
CustomTabBarModel(AppAssets.insurance, LocaleKeys.insurance.tr(context: context)),
|
|
|
|
CustomTabBarModel(AppAssets.more, "More".needTranslation),
|
|
|
|
CustomTabBarModel(AppAssets.requests, LocaleKeys.request.tr(context: context).needTranslation),
|
|
|
|
],
|
|
|
|
CustomTabBarModel(AppAssets.more, "More".needTranslation),
|
|
|
|
onTabChange: (index) {},
|
|
|
|
],
|
|
|
|
),
|
|
|
|
onTabChange: (index) {},
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
).paddingSymmetrical(24.h, 0.0),
|
|
|
|
//Insurance Tab Data
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
Consumer<InsuranceViewModel>(builder: (context, insuranceVM, child) {
|
|
|
|
//Insurance Tab Data
|
|
|
|
return insuranceVM.isInsuranceLoading
|
|
|
|
Consumer<InsuranceViewModel>(builder: (context, insuranceVM, child) {
|
|
|
|
? const MoviesShimmerWidget()
|
|
|
|
return insuranceVM.isInsuranceLoading
|
|
|
|
: PatientInsuranceCard(
|
|
|
|
? const MoviesShimmerWidget().paddingSymmetrical(24.h, 0.0)
|
|
|
|
insuranceCardDetailsModel: insuranceVM.patientInsuranceList.first,
|
|
|
|
: PatientInsuranceCard(
|
|
|
|
isInsuranceExpired: DateTime.now().isBefore(DateUtil.convertStringToDate(insuranceVM.patientInsuranceList.first.cardValidTo)));
|
|
|
|
insuranceCardDetailsModel: insuranceVM.patientInsuranceList.first,
|
|
|
|
}),
|
|
|
|
isInsuranceExpired: DateTime.now().isBefore(DateUtil.convertStringToDate(insuranceVM.patientInsuranceList.first.cardValidTo)));
|
|
|
|
SizedBox(height: 10.h),
|
|
|
|
}),
|
|
|
|
GridView(
|
|
|
|
SizedBox(height: 10.h),
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, crossAxisSpacing: 13, mainAxisSpacing: 13),
|
|
|
|
GridView(
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, crossAxisSpacing: 13, mainAxisSpacing: 13),
|
|
|
|
padding: EdgeInsets.only(top: 12),
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
shrinkWrap: true,
|
|
|
|
padding: EdgeInsets.only(top: 12),
|
|
|
|
children: [
|
|
|
|
shrinkWrap: true,
|
|
|
|
MedicalFileCard(label: "Update Insurance", textColor: AppColors.blackColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.eye_result_icon),
|
|
|
|
children: [
|
|
|
|
MedicalFileCard(label: "Insurance Approvals", textColor: AppColors.blackColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.eye_result_icon),
|
|
|
|
MedicalFileCard(label: "Update Insurance", textColor: AppColors.blackColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.eye_result_icon),
|
|
|
|
MedicalFileCard(label: "My Invoices List", textColor: AppColors.blackColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.eye_result_icon),
|
|
|
|
MedicalFileCard(label: "Insurance Approvals", textColor: AppColors.blackColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.eye_result_icon),
|
|
|
|
MedicalFileCard(label: "Ancillary Orders List", textColor: AppColors.blackColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.eye_result_icon),
|
|
|
|
MedicalFileCard(label: "My Invoices List", textColor: AppColors.blackColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.eye_result_icon),
|
|
|
|
],
|
|
|
|
MedicalFileCard(label: "Ancillary Orders List", textColor: AppColors.blackColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.eye_result_icon),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
).paddingSymmetrical(24.h, 0.0),
|
|
|
|
),
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|