|
|
|
@ -106,7 +106,9 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
insuranceViewModel = Provider.of<InsuranceViewModel>(context, listen: false);
|
|
|
|
insuranceViewModel = Provider.of<InsuranceViewModel>(context, listen: false);
|
|
|
|
immediateLiveCareViewModel = Provider.of<ImmediateLiveCareViewModel>(context, listen: false);
|
|
|
|
immediateLiveCareViewModel = Provider.of<ImmediateLiveCareViewModel>(context, listen: false);
|
|
|
|
appState = getIt.get<AppState>();
|
|
|
|
appState = getIt.get<AppState>();
|
|
|
|
return Scaffold(
|
|
|
|
return PopScope(
|
|
|
|
|
|
|
|
canPop: false,
|
|
|
|
|
|
|
|
child: Scaffold(
|
|
|
|
backgroundColor: AppColors.bgScaffoldColor,
|
|
|
|
backgroundColor: AppColors.bgScaffoldColor,
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
padding: EdgeInsets.only(top: kToolbarHeight + 0.h, bottom: 24),
|
|
|
|
padding: EdgeInsets.only(top: kToolbarHeight + 0.h, bottom: 24),
|
|
|
|
@ -135,7 +137,7 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
textColor: Color(0xffED1C2B),
|
|
|
|
textColor: Color(0xffED1C2B),
|
|
|
|
fontSize: 14.f,
|
|
|
|
fontSize: 14.f,
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
borderRadius: 12,
|
|
|
|
borderRadius: 12.r,
|
|
|
|
padding: EdgeInsets.fromLTRB(10.h, 0, 10.h, 0),
|
|
|
|
padding: EdgeInsets.fromLTRB(10.h, 0, 10.h, 0),
|
|
|
|
height: 40.h,
|
|
|
|
height: 40.h,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -168,7 +170,7 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
)
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
appState.isAuthenticated
|
|
|
|
appState.isAuthenticated
|
|
|
|
@ -188,17 +190,18 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
).paddingSymmetrical(24.h, 0.h).onPress(() {
|
|
|
|
).paddingSymmetrical(24.h, 0.h).onPress(() {
|
|
|
|
Navigator.of(context).push(
|
|
|
|
Navigator.of(context).push(CustomPageRoute(page: MyAppointmentsPage()));
|
|
|
|
CustomPageRoute(
|
|
|
|
|
|
|
|
page: MyAppointmentsPage(),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
Consumer<MyAppointmentsViewModel>(builder: (context, myAppointmentsVM, child) {
|
|
|
|
Consumer<MyAppointmentsViewModel>(
|
|
|
|
|
|
|
|
builder: (context, myAppointmentsVM, child) {
|
|
|
|
return myAppointmentsVM.isMyAppointmentsLoading
|
|
|
|
return myAppointmentsVM.isMyAppointmentsLoading
|
|
|
|
? Container(
|
|
|
|
? Container(
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
|
|
|
borderRadius: 24.r,
|
|
|
|
|
|
|
|
hasShadow: true,
|
|
|
|
|
|
|
|
),
|
|
|
|
child: AppointmentCard(
|
|
|
|
child: AppointmentCard(
|
|
|
|
patientAppointmentHistoryResponseModel: PatientAppointmentHistoryResponseModel(),
|
|
|
|
patientAppointmentHistoryResponseModel: PatientAppointmentHistoryResponseModel(),
|
|
|
|
myAppointmentsViewModel: myAppointmentsViewModel,
|
|
|
|
myAppointmentsViewModel: myAppointmentsViewModel,
|
|
|
|
@ -210,8 +213,11 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
: myAppointmentsVM.patientAppointmentsHistoryList.isNotEmpty
|
|
|
|
: myAppointmentsVM.patientAppointmentsHistoryList.isNotEmpty
|
|
|
|
? myAppointmentsVM.patientAppointmentsHistoryList.length == 1
|
|
|
|
? myAppointmentsVM.patientAppointmentsHistoryList.length == 1
|
|
|
|
? Container(
|
|
|
|
? Container(
|
|
|
|
decoration:
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
|
|
|
borderRadius: 24.r,
|
|
|
|
|
|
|
|
hasShadow: true,
|
|
|
|
|
|
|
|
),
|
|
|
|
child: AppointmentCard(
|
|
|
|
child: AppointmentCard(
|
|
|
|
patientAppointmentHistoryResponseModel: myAppointmentsVM.patientAppointmentsHistoryList.first,
|
|
|
|
patientAppointmentHistoryResponseModel: myAppointmentsVM.patientAppointmentsHistoryList.first,
|
|
|
|
myAppointmentsViewModel: myAppointmentsViewModel,
|
|
|
|
myAppointmentsViewModel: myAppointmentsViewModel,
|
|
|
|
@ -240,8 +246,11 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
return Container(
|
|
|
|
return Container(
|
|
|
|
decoration: RoundedRectangleBorder()
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
.toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
|
|
|
borderRadius: 24.r,
|
|
|
|
|
|
|
|
hasShadow: true,
|
|
|
|
|
|
|
|
),
|
|
|
|
child: AppointmentCard(
|
|
|
|
child: AppointmentCard(
|
|
|
|
patientAppointmentHistoryResponseModel: myAppointmentsVM.patientAppointmentsHistoryList[index],
|
|
|
|
patientAppointmentHistoryResponseModel: myAppointmentsVM.patientAppointmentsHistoryList[index],
|
|
|
|
myAppointmentsViewModel: myAppointmentsViewModel,
|
|
|
|
myAppointmentsViewModel: myAppointmentsViewModel,
|
|
|
|
@ -255,7 +264,7 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
: Container(
|
|
|
|
: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
width: double.infinity,
|
|
|
|
decoration:
|
|
|
|
decoration:
|
|
|
|
RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24, hasShadow: true),
|
|
|
|
RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r, hasShadow: true),
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.all(12.h),
|
|
|
|
padding: EdgeInsets.all(12.h),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
@ -267,11 +276,7 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
CustomButton(
|
|
|
|
CustomButton(
|
|
|
|
text: LocaleKeys.bookAppo.tr(context: context),
|
|
|
|
text: LocaleKeys.bookAppo.tr(context: context),
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () {
|
|
|
|
Navigator.of(context).push(
|
|
|
|
Navigator.of(context).push(CustomPageRoute(page: BookAppointmentPage()));
|
|
|
|
CustomPageRoute(
|
|
|
|
|
|
|
|
page: BookAppointmentPage(),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
backgroundColor: Color(0xffFEE9EA),
|
|
|
|
backgroundColor: Color(0xffFEE9EA),
|
|
|
|
borderColor: Color(0xffFEE9EA),
|
|
|
|
borderColor: Color(0xffFEE9EA),
|
|
|
|
@ -281,13 +286,16 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
padding: EdgeInsets.fromLTRB(10.h, 0, 10.h, 0),
|
|
|
|
padding: EdgeInsets.fromLTRB(10.h, 0, 10.h, 0),
|
|
|
|
icon: AppAssets.add_icon,
|
|
|
|
icon: AppAssets.add_icon,
|
|
|
|
iconColor: AppColors.primaryRedColor,
|
|
|
|
iconColor: AppColors.primaryRedColor,
|
|
|
|
|
|
|
|
height: (isFoldable || isTablet) ? 56.h : 46.h,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
).paddingSymmetrical(24.h, 0.h);
|
|
|
|
).paddingSymmetrical(24.h, 0.h);
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
Consumer<ImmediateLiveCareViewModel>(builder: (context, immediateLiveCareVM, child) {
|
|
|
|
),
|
|
|
|
|
|
|
|
Consumer<ImmediateLiveCareViewModel>(
|
|
|
|
|
|
|
|
builder: (context, immediateLiveCareVM, child) {
|
|
|
|
return immediateLiveCareVM.patientHasPendingLiveCareRequest
|
|
|
|
return immediateLiveCareVM.patientHasPendingLiveCareRequest
|
|
|
|
? Column(
|
|
|
|
? Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
@ -295,7 +303,7 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
borderRadius: 20.h,
|
|
|
|
borderRadius: 20.r,
|
|
|
|
hasShadow: true,
|
|
|
|
hasShadow: true,
|
|
|
|
side: BorderSide(color: AppColors.ratingColorYellow, width: 3.h),
|
|
|
|
side: BorderSide(color: AppColors.ratingColorYellow, width: 3.h),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -335,17 +343,14 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
).paddingSymmetrical(24.h, 0.h).onPress(() {
|
|
|
|
).paddingSymmetrical(24.h, 0.h).onPress(() {
|
|
|
|
Navigator.of(context).push(
|
|
|
|
Navigator.of(context).push(CustomPageRoute(page: ImmediateLiveCarePendingRequestPage()));
|
|
|
|
CustomPageRoute(
|
|
|
|
|
|
|
|
page: ImmediateLiveCarePendingRequestPage(),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: SizedBox(height: 12.h);
|
|
|
|
: SizedBox(height: 12.h);
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
@ -359,19 +364,12 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
).paddingSymmetrical(24.h, 0.h).onPress(() {
|
|
|
|
).paddingSymmetrical(24.h, 0.h).onPress(() {
|
|
|
|
Navigator.of(context).push(
|
|
|
|
Navigator.of(context).push(CustomPageRoute(page: MedicalFilePage()));
|
|
|
|
CustomPageRoute(
|
|
|
|
|
|
|
|
page: MedicalFilePage(),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
height: 120.h,
|
|
|
|
height: 120.h,
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r),
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
|
|
|
borderRadius: 24,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
@ -411,10 +409,7 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: Container(
|
|
|
|
: Container(
|
|
|
|
height: 127.h,
|
|
|
|
height: 127.h,
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r),
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
|
|
|
borderRadius: 24.r,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
@ -464,7 +459,7 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 350.h,
|
|
|
|
height: 340.h,
|
|
|
|
child: ListView.separated(
|
|
|
|
child: ListView.separated(
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
itemCount: LandingPageData.getServiceCardsList.length,
|
|
|
|
itemCount: LandingPageData.getServiceCardsList.length,
|
|
|
|
@ -494,6 +489,7 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -503,7 +499,8 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
title: "",
|
|
|
|
title: "",
|
|
|
|
isCloseButtonVisible: false,
|
|
|
|
isCloseButtonVisible: false,
|
|
|
|
|
|
|
|
|
|
|
|
child: StatefulBuilder(builder: (context, setState) {
|
|
|
|
child: StatefulBuilder(
|
|
|
|
|
|
|
|
builder: (context, setState) {
|
|
|
|
return QuickLogin(
|
|
|
|
return QuickLogin(
|
|
|
|
isDone: isDone,
|
|
|
|
isDone: isDone,
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () {
|
|
|
|
@ -515,7 +512,8 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
// height: isDone == false ? ResponsiveExtension.screenHeight * 0.5 : ResponsiveExtension.screenHeight * 0.3,
|
|
|
|
// height: isDone == false ? ResponsiveExtension.screenHeight * 0.5 : ResponsiveExtension.screenHeight * 0.3,
|
|
|
|
isFullScreen: false,
|
|
|
|
isFullScreen: false,
|
|
|
|
callBackFunc: () {
|
|
|
|
callBackFunc: () {
|
|
|
|
|