|
|
|
|
@ -95,33 +95,32 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
|
children: [
|
|
|
|
|
appState.isAuthenticated
|
|
|
|
|
? WelcomeWidget(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
FadePage(
|
|
|
|
|
page: ProfileSettings(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
name: ('${appState.getAuthenticatedUser()!.firstName!} ${appState.getAuthenticatedUser()!.lastName!}'),
|
|
|
|
|
imageUrl: appState
|
|
|
|
|
.getAuthenticatedUser()
|
|
|
|
|
?.gender == 1 ? AppAssets.male_img : AppAssets.femaleImg,
|
|
|
|
|
)
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
FadePage(
|
|
|
|
|
page: ProfileSettings(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
name: ('${appState.getAuthenticatedUser()!.firstName!} ${appState.getAuthenticatedUser()!.lastName!}'),
|
|
|
|
|
imageUrl: appState.getAuthenticatedUser()?.gender == 1 ? AppAssets.male_img : AppAssets.femaleImg,
|
|
|
|
|
).expanded
|
|
|
|
|
: CustomButton(
|
|
|
|
|
text: LocaleKeys.loginOrRegister.tr(context: context),
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
await authVM.onLoginPressed();
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: Color(0xffFEE9EA),
|
|
|
|
|
borderColor: Color(0xffFEE9EA),
|
|
|
|
|
textColor: Color(0xffED1C2B),
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 12,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
|
height: 50,
|
|
|
|
|
),
|
|
|
|
|
text: LocaleKeys.loginOrRegister.tr(context: context),
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
await authVM.onLoginPressed();
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: Color(0xffFEE9EA),
|
|
|
|
|
borderColor: Color(0xffFEE9EA),
|
|
|
|
|
textColor: Color(0xffED1C2B),
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 12,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
|
height: 50,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.bell, height: 20, width: 20).onPress(() {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
@ -155,156 +154,155 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
appState.isAuthenticated
|
|
|
|
|
? Column(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 24,
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(12.h),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.home_calendar_icon, width: 32.h, height: 32.h),
|
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
|
"You do not have any upcoming appointment. Please book an appointment".toText12(isCenter: true),
|
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
|
CustomButton(
|
|
|
|
|
text: LocaleKeys.bookAppo.tr(context: context),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.of(context)
|
|
|
|
|
.push(
|
|
|
|
|
FadePage(
|
|
|
|
|
page: BookAppointmentPage(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: Color(0xffFEE9EA),
|
|
|
|
|
borderColor: Color(0xffFEE9EA),
|
|
|
|
|
textColor: Color(0xffED1C2B),
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 12,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
|
height: 40,
|
|
|
|
|
icon: AppAssets.add_icon,
|
|
|
|
|
iconColor: AppColors.primaryRedColor,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 24,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
"Quick Links".toText16(isBold: true),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
"View medical file".toText12(color: AppColors.primaryRedColor),
|
|
|
|
|
SizedBox(width: 2.h),
|
|
|
|
|
Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 10.h),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
).paddingSymmetrical(24.h, 0.h).onPress(() {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
FadePage(
|
|
|
|
|
page: MedicalFilePage(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
|
Container(
|
|
|
|
|
height: 127.h,
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 24,
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(16.h),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: ListView.separated(
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
itemCount: LandingPageData.getLoggedInServiceCardsList.length,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
padding: const EdgeInsets.only(left: 0, right: 8),
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return AnimationConfiguration.staggeredList(
|
|
|
|
|
position: index,
|
|
|
|
|
duration: const Duration(milliseconds: 1000),
|
|
|
|
|
child: SlideAnimation(
|
|
|
|
|
horizontalOffset: 100.0,
|
|
|
|
|
child: FadeInAnimation(
|
|
|
|
|
child: SmallServiceCard(
|
|
|
|
|
icon: LandingPageData.getLoggedInServiceCardsList[index].icon,
|
|
|
|
|
title: LandingPageData.getLoggedInServiceCardsList[index].title,
|
|
|
|
|
subtitle: LandingPageData.getLoggedInServiceCardsList[index].subtitle,
|
|
|
|
|
iconColor: LandingPageData.getLoggedInServiceCardsList[index].iconColor,
|
|
|
|
|
textColor: LandingPageData.getLoggedInServiceCardsList[index].textColor,
|
|
|
|
|
backgroundColor: LandingPageData.getLoggedInServiceCardsList[index].backgroundColor,
|
|
|
|
|
isBold: LandingPageData.getLoggedInServiceCardsList[index].isBold,
|
|
|
|
|
serviceName: LandingPageData.getLoggedInServiceCardsList[index].serviceName,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(12.h),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.home_calendar_icon, width: 32.h, height: 32.h),
|
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
|
"You do not have any upcoming appointment. Please book an appointment".toText12(isCenter: true),
|
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
|
CustomButton(
|
|
|
|
|
text: LocaleKeys.bookAppo.tr(context: context),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
FadePage(
|
|
|
|
|
page: BookAppointmentPage(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
separatorBuilder: (BuildContext cxt, int index) => 0.width,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: Color(0xffFEE9EA),
|
|
|
|
|
borderColor: Color(0xffFEE9EA),
|
|
|
|
|
textColor: Color(0xffED1C2B),
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 12,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
|
|
|
|
height: 40,
|
|
|
|
|
icon: AppAssets.add_icon,
|
|
|
|
|
iconColor: AppColors.primaryRedColor,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: Container(
|
|
|
|
|
height: 127.h,
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 24,
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(16.h),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: ListView.separated(
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
itemCount: LandingPageData.getNotLoggedInServiceCardsList.length,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
padding: const EdgeInsets.only(left: 0, right: 8),
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return AnimationConfiguration.staggeredList(
|
|
|
|
|
position: index,
|
|
|
|
|
duration: const Duration(milliseconds: 1000),
|
|
|
|
|
child: SlideAnimation(
|
|
|
|
|
horizontalOffset: 100.0,
|
|
|
|
|
child: FadeInAnimation(
|
|
|
|
|
child: SmallServiceCard(
|
|
|
|
|
icon: LandingPageData.getNotLoggedInServiceCardsList[index].icon,
|
|
|
|
|
title: LandingPageData.getNotLoggedInServiceCardsList[index].title,
|
|
|
|
|
subtitle: LandingPageData.getNotLoggedInServiceCardsList[index].subtitle,
|
|
|
|
|
iconColor: LandingPageData.getNotLoggedInServiceCardsList[index].iconColor,
|
|
|
|
|
textColor: LandingPageData.getNotLoggedInServiceCardsList[index].textColor,
|
|
|
|
|
backgroundColor: LandingPageData.getNotLoggedInServiceCardsList[index].backgroundColor,
|
|
|
|
|
isBold: LandingPageData.getNotLoggedInServiceCardsList[index].isBold,
|
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
"Quick Links".toText16(isBold: true),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
"View medical file".toText12(color: AppColors.primaryRedColor),
|
|
|
|
|
SizedBox(width: 2.h),
|
|
|
|
|
Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 10.h),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
).paddingSymmetrical(24.h, 0.h).onPress(() {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
FadePage(
|
|
|
|
|
page: MedicalFilePage(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
|
Container(
|
|
|
|
|
height: 127.h,
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 24,
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(16.h),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: ListView.separated(
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
itemCount: LandingPageData.getLoggedInServiceCardsList.length,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
padding: const EdgeInsets.only(left: 0, right: 8),
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return AnimationConfiguration.staggeredList(
|
|
|
|
|
position: index,
|
|
|
|
|
duration: const Duration(milliseconds: 1000),
|
|
|
|
|
child: SlideAnimation(
|
|
|
|
|
horizontalOffset: 100.0,
|
|
|
|
|
child: FadeInAnimation(
|
|
|
|
|
child: SmallServiceCard(
|
|
|
|
|
icon: LandingPageData.getLoggedInServiceCardsList[index].icon,
|
|
|
|
|
title: LandingPageData.getLoggedInServiceCardsList[index].title,
|
|
|
|
|
subtitle: LandingPageData.getLoggedInServiceCardsList[index].subtitle,
|
|
|
|
|
iconColor: LandingPageData.getLoggedInServiceCardsList[index].iconColor,
|
|
|
|
|
textColor: LandingPageData.getLoggedInServiceCardsList[index].textColor,
|
|
|
|
|
backgroundColor: LandingPageData.getLoggedInServiceCardsList[index].backgroundColor,
|
|
|
|
|
isBold: LandingPageData.getLoggedInServiceCardsList[index].isBold,
|
|
|
|
|
serviceName: LandingPageData.getLoggedInServiceCardsList[index].serviceName,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
separatorBuilder: (BuildContext cxt, int index) => 0.width,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: Container(
|
|
|
|
|
height: 127.h,
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 24,
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(16.h),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: ListView.separated(
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
itemCount: LandingPageData.getNotLoggedInServiceCardsList.length,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
padding: const EdgeInsets.only(left: 0, right: 8),
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return AnimationConfiguration.staggeredList(
|
|
|
|
|
position: index,
|
|
|
|
|
duration: const Duration(milliseconds: 1000),
|
|
|
|
|
child: SlideAnimation(
|
|
|
|
|
horizontalOffset: 100.0,
|
|
|
|
|
child: FadeInAnimation(
|
|
|
|
|
child: SmallServiceCard(
|
|
|
|
|
icon: LandingPageData.getNotLoggedInServiceCardsList[index].icon,
|
|
|
|
|
title: LandingPageData.getNotLoggedInServiceCardsList[index].title,
|
|
|
|
|
subtitle: LandingPageData.getNotLoggedInServiceCardsList[index].subtitle,
|
|
|
|
|
iconColor: LandingPageData.getNotLoggedInServiceCardsList[index].iconColor,
|
|
|
|
|
textColor: LandingPageData.getNotLoggedInServiceCardsList[index].textColor,
|
|
|
|
|
backgroundColor: LandingPageData.getNotLoggedInServiceCardsList[index].backgroundColor,
|
|
|
|
|
isBold: LandingPageData.getNotLoggedInServiceCardsList[index].isBold,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
separatorBuilder: (BuildContext cxt, int index) => 0.width,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
separatorBuilder: (BuildContext cxt, int index) => 0.width,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
@ -374,7 +372,7 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
|
// sharedPref.setBool(HAS_ENABLED_QUICK_LOGIN, true);
|
|
|
|
|
authVM.loginWithFingerPrintFace(() {
|
|
|
|
|
isDone = true;
|
|
|
|
|
cacheService.saveBool(key: CacheConst.quickLoginEnabled,value: true);
|
|
|
|
|
cacheService.saveBool(key: CacheConst.quickLoginEnabled, value: true);
|
|
|
|
|
setState(() {});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|