|
|
|
|
@ -1,3 +1,5 @@
|
|
|
|
|
import 'package:auto_size_text/auto_size_text.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/config/size_config.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
|
|
|
|
|
@ -9,6 +11,7 @@ import 'package:diplomaticquarterapp/pages/landing/widgets/logged_slider_view.da
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/landing/widgets/services_view.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/landing/widgets/slider_view.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/packages_offers/OfferAndPackagesPage.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/theme/colors.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/utils.dart';
|
|
|
|
|
@ -68,17 +71,22 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
|
|
|
|
|
children: [
|
|
|
|
|
projectViewModel.isLogin
|
|
|
|
|
? AspectRatio(
|
|
|
|
|
aspectRatio: 2.7,
|
|
|
|
|
aspectRatio: 2.6,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.only(left: 20, right: 20, top: 8, bottom: 6),
|
|
|
|
|
child: LoggedSliderView(
|
|
|
|
|
projectViewModel,
|
|
|
|
|
new SliderData(TranslationBase.of(context).fileno + ": " + projectViewModel.user.patientID.toString(), projectViewModel.user.firstName + ' ' + projectViewModel.user.lastName,
|
|
|
|
|
"", bannerColor[0].darkColor, bannerColor[0].lightColor)),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
navigateTo(context, MedicalProfilePageNew());
|
|
|
|
|
},
|
|
|
|
|
child: LoggedSliderView(
|
|
|
|
|
projectViewModel,
|
|
|
|
|
new SliderData(TranslationBase.of(context).fileno + ": " + projectViewModel.user.patientID.toString(), projectViewModel.user.firstName + ' ' + projectViewModel.user.lastName,
|
|
|
|
|
"", bannerColor[0].darkColor, bannerColor[0].lightColor)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: AspectRatio(
|
|
|
|
|
aspectRatio: 2.7,
|
|
|
|
|
aspectRatio: 2.6,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 20, right: 20, top: 8, bottom: 6),
|
|
|
|
|
child: SliderView(
|
|
|
|
|
@ -109,8 +117,10 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
|
|
|
|
|
TranslationBase.of(context).myMedicalFile,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
letterSpacing: -0.96,
|
|
|
|
|
height: 19 / 16,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -122,8 +132,9 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
|
|
|
|
|
TranslationBase.of(context).viewMedicalFile,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: CustomColors.accentColor,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
decoration: TextDecoration.underline,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
letterSpacing: -0.72,
|
|
|
|
|
height: 23 / 12,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -172,7 +183,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: MediaQuery.of(context).size.width * 0.3,
|
|
|
|
|
padding: EdgeInsets.only(left: 20, right: 20, top: 16, bottom: 16),
|
|
|
|
|
padding: EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
@ -192,10 +203,15 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
left: 20,
|
|
|
|
|
right: 8,
|
|
|
|
|
),
|
|
|
|
|
padding: projectViewModel.isArabic
|
|
|
|
|
? const EdgeInsets.only(
|
|
|
|
|
left: 8,
|
|
|
|
|
right: 20,
|
|
|
|
|
)
|
|
|
|
|
: const EdgeInsets.only(
|
|
|
|
|
left: 20,
|
|
|
|
|
right: 8,
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
@ -203,8 +219,10 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
|
|
|
|
|
TranslationBase.of(context).hMGService,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
letterSpacing: -0.96,
|
|
|
|
|
height: 19 / 16,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -216,8 +234,9 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
|
|
|
|
|
TranslationBase.of(context).viewAllServices,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: CustomColors.accentColor,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
decoration: TextDecoration.underline,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
letterSpacing: -0.72,
|
|
|
|
|
height: 23 / 12,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -228,7 +247,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
|
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
left: 20,
|
|
|
|
|
right: 20,
|
|
|
|
|
top: 4,
|
|
|
|
|
top: 0,
|
|
|
|
|
),
|
|
|
|
|
child: GridView.builder(
|
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
|
|
|
|
|
@ -251,137 +270,152 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
|
|
|
|
|
Widget offersButton() {
|
|
|
|
|
return Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: double.infinity,
|
|
|
|
|
clipBehavior: Clip.antiAlias,
|
|
|
|
|
decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor),
|
|
|
|
|
child: Stack(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: double.infinity,
|
|
|
|
|
// color: Color(0xFF2B353E),
|
|
|
|
|
decoration: containerRadius(Color(0xFF2B353E), 20),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: double.infinity,
|
|
|
|
|
clipBehavior: Clip.antiAlias,
|
|
|
|
|
decoration: projectViewModel.isArabic
|
|
|
|
|
? containerBottomRightRadiusWithGradientForAr(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor)
|
|
|
|
|
: containerBottomRightRadiusWithGradient(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor),
|
|
|
|
|
child: Stack(
|
|
|
|
|
children: [
|
|
|
|
|
SvgPicture.asset(
|
|
|
|
|
"assets/images/new/strips.svg",
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: double.infinity,
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesHomePage()));
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: double.infinity,
|
|
|
|
|
clipBehavior: Clip.antiAlias,
|
|
|
|
|
decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor),
|
|
|
|
|
child: Stack(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: double.infinity,
|
|
|
|
|
// color: Color(0xFF2B353E),
|
|
|
|
|
decoration: containerRadius(Color(0xFF2B353E), 20),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? Positioned(
|
|
|
|
|
left: 20,
|
|
|
|
|
top: 12,
|
|
|
|
|
child: Opacity(
|
|
|
|
|
opacity: 0.04,
|
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
|
"assets/images/new/logo.svg",
|
|
|
|
|
height: MediaQuery.of(context).size.width * 0.14,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: double.infinity,
|
|
|
|
|
clipBehavior: Clip.antiAlias,
|
|
|
|
|
decoration: projectViewModel.isArabic
|
|
|
|
|
? containerBottomRightRadiusWithGradientForAr(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor)
|
|
|
|
|
: containerBottomRightRadiusWithGradient(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor),
|
|
|
|
|
child: Stack(
|
|
|
|
|
children: [
|
|
|
|
|
SvgPicture.asset(
|
|
|
|
|
"assets/images/new/strips.svg",
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: double.infinity,
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: Positioned(
|
|
|
|
|
right: 20,
|
|
|
|
|
top: 12,
|
|
|
|
|
child: Opacity(
|
|
|
|
|
opacity: 0.04,
|
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
|
"assets/images/new/logo.svg",
|
|
|
|
|
height: MediaQuery.of(context).size.width * 0.14,
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? Positioned(
|
|
|
|
|
left: 20,
|
|
|
|
|
top: 12,
|
|
|
|
|
child: Opacity(
|
|
|
|
|
opacity: 0.04,
|
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
|
"assets/images/new/logo.svg",
|
|
|
|
|
height: MediaQuery.of(context).size.width * 0.14,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: Positioned(
|
|
|
|
|
right: 20,
|
|
|
|
|
top: 12,
|
|
|
|
|
child: Opacity(
|
|
|
|
|
opacity: 0.04,
|
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
|
"assets/images/new/logo.svg",
|
|
|
|
|
height: MediaQuery.of(context).size.width * 0.14,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? Positioned(
|
|
|
|
|
right: -16,
|
|
|
|
|
top: 2,
|
|
|
|
|
child: Transform.rotate(
|
|
|
|
|
angle: math.pi / 4,
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 18, right: 18, top: 6, bottom: 3),
|
|
|
|
|
color: CustomColors.accentColor,
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context).newDes,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 9,
|
|
|
|
|
height: 0.8,
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? Positioned(
|
|
|
|
|
right: -16,
|
|
|
|
|
top: 2,
|
|
|
|
|
child: Transform.rotate(
|
|
|
|
|
angle: math.pi / 4,
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 18, right: 18, top: 6, bottom: 3),
|
|
|
|
|
color: CustomColors.accentColor,
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context).newDes,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 9,
|
|
|
|
|
height: 0.8,
|
|
|
|
|
letterSpacing: -0.27,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: Positioned(
|
|
|
|
|
left: -16,
|
|
|
|
|
top: 2,
|
|
|
|
|
child: Transform.rotate(
|
|
|
|
|
angle: -math.pi / 4,
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 18, right: 18, top: 6, bottom: 3),
|
|
|
|
|
color: CustomColors.accentColor,
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context).newDes,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 9,
|
|
|
|
|
)
|
|
|
|
|
: Positioned(
|
|
|
|
|
left: -16,
|
|
|
|
|
top: 2,
|
|
|
|
|
child: Transform.rotate(
|
|
|
|
|
angle: -math.pi / 4,
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 18, right: 18, top: 6, bottom: 3),
|
|
|
|
|
color: CustomColors.accentColor,
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context).newDes,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 9,
|
|
|
|
|
letterSpacing: -0.27,
|
|
|
|
|
height: 1.2,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: double.infinity,
|
|
|
|
|
padding: EdgeInsets.only(left: projectViewModel.isArabic ? 20 : 25, right: projectViewModel.isArabic ? 25 : 20),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).offersdiscount,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: double.infinity,
|
|
|
|
|
padding: EdgeInsets.only(left: projectViewModel.isArabic ? 20 : 25, right: projectViewModel.isArabic ? 25 : 20),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
mFlex(3),
|
|
|
|
|
AutoSizeText(
|
|
|
|
|
TranslationBase.of(context).offersdiscount,
|
|
|
|
|
maxLines: 1,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
letterSpacing: -0.75,
|
|
|
|
|
height: 1,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).explore,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
height: projectViewModel.isArabic ? 0.8 : 1,
|
|
|
|
|
projectViewModel.isArabic ? mHeight(4) : Container(),
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).explore,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 9,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
letterSpacing: -0.27,
|
|
|
|
|
height: projectViewModel.isArabic ? 0.8 : 1,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
mHeight(8),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
showFloating("assets/images/new/ear.svg"),
|
|
|
|
|
mWidth(4),
|
|
|
|
|
showFloating("assets/images/new/head.svg"),
|
|
|
|
|
mWidth(4),
|
|
|
|
|
showFloating("assets/images/new/tooth.svg"),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
mFlex(1),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
showFloating("assets/images/new/ear.svg"),
|
|
|
|
|
mWidth(4),
|
|
|
|
|
showFloating("assets/images/new/head.svg"),
|
|
|
|
|
mWidth(4),
|
|
|
|
|
showFloating("assets/images/new/tooth.svg"),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
mFlex(2)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
@ -451,14 +485,18 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: double.infinity,
|
|
|
|
|
padding: EdgeInsets.all(16),
|
|
|
|
|
padding: EdgeInsets.all(SizeConfig.widthMultiplier * 3.4),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
SvgPicture.asset(
|
|
|
|
|
"assets/images/new/Pharmacy.svg",
|
|
|
|
|
height: MediaQuery.of(context).size.width * 0.065,
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors.yellow,
|
|
|
|
|
// width: MediaQuery.of(context).size.width * 0.065,
|
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
|
"assets/images/new/Pharmacy.svg",
|
|
|
|
|
height: MediaQuery.of(context).size.width * 0.08,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
mFlex(1),
|
|
|
|
|
Column(
|
|
|
|
|
@ -471,14 +509,18 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
letterSpacing: -0.45,
|
|
|
|
|
height: 1,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
projectViewModel.isArabic ? mHeight(5) : Container(),
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).ecommerceSolution,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontSize: 9,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
letterSpacing: -0.27,
|
|
|
|
|
height: projectViewModel.isArabic ? 0.2 : 1,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|