Merge branch 'mirza_home_page' into development_new_design_2.0

merge-requests/390/head
Mirza.Shafique 5 years ago
commit 85c759a4a5

@ -490,7 +490,7 @@ const Map localizedValues = {
"writeReview": {"en": "Write Review", "ar": " اكتب تقييمك"}, "writeReview": {"en": "Write Review", "ar": " اكتب تقييمك"},
"shareReview": {"en": "SHARE REVIEW", "ar": " اكتب تقييمك"}, "shareReview": {"en": "SHARE REVIEW", "ar": " اكتب تقييمك"},
"review": {"en": " reviews", "ar": " تقييمات"}, "review": {"en": " reviews", "ar": " تقييمات"},
"viewMedicalFile": {"en": "View Medical File", "ar": "عرض الملف الطبي"}, "viewMedicalFile": {"en": "View Details", "ar": "عرض الملف الطبي"},
"viewAllServices": {"en": "View All Services", "ar": "عرض جميع الخدمات"}, "viewAllServices": {"en": "View All Services", "ar": "عرض جميع الخدمات"},
"medicalFile": {"en": "Medical File", "ar": "ملف طبي"}, "medicalFile": {"en": "Medical File", "ar": "ملف طبي"},
"verified": {"en": "Verified", "ar": "تم التحقق"}, "verified": {"en": "Verified", "ar": "تم التحقق"},

@ -14,6 +14,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'config/config.dart';
import 'config/size_config.dart'; import 'config/size_config.dart';
import 'core/viewModels/project_view_model.dart'; import 'core/viewModels/project_view_model.dart';
import 'locator.dart'; import 'locator.dart';
@ -41,6 +42,7 @@ class _MyApp extends State<MyApp> {
// ProjectViewModel projectProvider; // ProjectViewModel projectProvider;
// projectProvider = Provider.of(context); // projectProvider = Provider.of(context);
// var font = projectProvider.isArabic ? 'Cairo' : 'WorkSans'; // var font = projectProvider.isArabic ? 'Cairo' : 'WorkSans';
ThemeNotifier(defaultTheme()); ThemeNotifier(defaultTheme());
super.initState(); super.initState();
} }
@ -48,6 +50,7 @@ class _MyApp extends State<MyApp> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
PlatformBridge.init(context); PlatformBridge.init(context);
LocalNotification.init(onNotificationClick: (payload) { LocalNotification.init(onNotificationClick: (payload) {
LocalNotification.getInstance() LocalNotification.getInstance()
.showNow(title: "Payload", subtitle: payload, payload: payload); .showNow(title: "Payload", subtitle: payload, payload: payload);

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

@ -61,18 +61,29 @@ class LoggedSliderView extends StatelessWidget {
padding: EdgeInsets.only(left: 20, right: 16, top: 6, bottom: 6), padding: EdgeInsets.only(left: 20, right: 16, top: 6, bottom: 6),
child: Text( child: Text(
TranslationBase.of(context).medicalFile, TranslationBase.of(context).medicalFile,
style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 13), style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 10,
letterSpacing: -0.3,
height: 1.2,
),
), ),
), ),
mWidth(MediaQuery.of(context).size.width / 50), mWidth(MediaQuery.of(context).size.width / 50),
//circularAviator(MediaQuery.of(context).size.width / 14, brColor: Colors.white), //circularAviator(MediaQuery.of(context).size.width / 14, brColor: Colors.white),
mFlex(1), mFlex(1),
projectViewModel.isArabic?circularAviator(MediaQuery.of(context).size.width / 28, brColor: Colors.white, icon: Icons.done, bcColor: Colors.white):Container(), projectViewModel.isArabic ? circularAviator(MediaQuery.of(context).size.width / 28, brColor: Colors.white, icon: Icons.done, bcColor: Colors.white) : Container(),
Text( Text(
TranslationBase.of(context).verified, TranslationBase.of(context).verified,
style: TextStyle(color: Colors.white, fontSize: 10), style: TextStyle(
color: Colors.white,
fontSize: 10,
letterSpacing: -0.3,
height: 1,
),
), ),
!projectViewModel.isArabic?circularAviator(MediaQuery.of(context).size.width / 28, brColor: Colors.white, icon: Icons.done, bcColor: Colors.white):Container(), !projectViewModel.isArabic ? circularAviator(MediaQuery.of(context).size.width / 28, brColor: Colors.white, icon: Icons.done, bcColor: Colors.white) : Container(),
mWidth(MediaQuery.of(context).size.width / 70), mWidth(MediaQuery.of(context).size.width / 70),
], ],
), ),
@ -87,12 +98,19 @@ class LoggedSliderView extends StatelessWidget {
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 18, fontSize: 17,
letterSpacing: -0.25,
height: 25 / 17,
), ),
), ),
Text( Text(
sliderData.pateintId, sliderData.pateintId,
style: TextStyle(color: Colors.white, fontSize: 14), style: TextStyle(
color: Colors.white,
fontSize: 12,
letterSpacing: -0.36,
height: 1,
),
), ),
], ],
), ),
@ -102,7 +120,12 @@ class LoggedSliderView extends StatelessWidget {
padding: const EdgeInsets.only(left: 20, right: 20), padding: const EdgeInsets.only(left: 20, right: 20),
child: Text( child: Text(
"34 Years, Male, 4 January 1987", "34 Years, Male, 4 January 1987",
style: TextStyle(color: Colors.white, fontSize: 14), style: TextStyle(
color: Colors.white,
fontSize: 12,
letterSpacing: -0.36,
height: 1,
),
), ),
), ),
mFlex(4), mFlex(4),

@ -102,26 +102,37 @@ class ServicesView extends StatelessWidget {
hmgServices.action == 2 hmgServices.action == 2
? Image.asset( ? Image.asset(
hmgServices.icon, hmgServices.icon,
height: index == 0 ? MediaQuery.of(context).size.width / 18 : MediaQuery.of(context).size.width / 14, height: index == 0 ? MediaQuery.of(context).size.width / 18 : MediaQuery.of(context).size.width / 18,
) )
: SvgPicture.asset( : Container(
hmgServices.icon, // color: Colors.yellow,
height: index == 0 ? MediaQuery.of(context).size.width / 18 : MediaQuery.of(context).size.width / 14, width: index == 4 ? MediaQuery.of(context).size.width / 12 : MediaQuery.of(context).size.width / 12,
height: index == 4 ? MediaQuery.of(context).size.width / 10 : MediaQuery.of(context).size.width / 12,
child: SvgPicture.asset(
hmgServices.icon,
// width: MediaQuery.of(context).size.width / 12,
// height: MediaQuery.of(context).size.width / 12,
),
), ),
mFlex(4), mFlex(4),
AutoSizeText( AutoSizeText(
hmgServices.title, hmgServices.title,
maxLines: 1, maxLines: 1,
minFontSize: 10,
style: TextStyle( style: TextStyle(
fontSize: SizeConfig.textMultiplier * 1.9, fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
letterSpacing: -0.39,
height: 0.8,
), ),
), ),
AutoSizeText( AutoSizeText(
hmgServices.subTitle, hmgServices.subTitle,
maxLines: 1, maxLines: 1,
minFontSize: 8,
style: TextStyle( style: TextStyle(
fontSize: SizeConfig.textMultiplier * 0.9, fontSize: SizeConfig.textMultiplier * 1.4,
letterSpacing: -0.27,
), ),
), ),
mFlex(1), mFlex(1),

@ -13,6 +13,7 @@ class SliderView extends StatelessWidget {
SliderView({this.onLoginClick}); SliderView({this.onLoginClick});
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
@ -32,7 +33,9 @@ class SliderView extends StatelessWidget {
height: double.infinity, height: double.infinity,
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
margin: EdgeInsets.zero, margin: EdgeInsets.zero,
decoration:projectViewModel.isArabic?containerBottomRightRadiusWithGradientForAr(MediaQuery.of(context).size.width / 4): containerBottomRightRadiusWithGradient(MediaQuery.of(context).size.width / 4), decoration: projectViewModel.isArabic
? containerBottomRightRadiusWithGradientForAr(MediaQuery.of(context).size.width / 4)
: containerBottomRightRadiusWithGradient(MediaQuery.of(context).size.width / 4),
child: Card( child: Card(
color: Colors.transparent, color: Colors.transparent,
margin: EdgeInsets.zero, margin: EdgeInsets.zero,
@ -42,15 +45,21 @@ class SliderView extends StatelessWidget {
mFlex(3), mFlex(3),
Container( Container(
decoration: projectViewModel.isArabic ? containerColorRadiusLeft(Color(0xFFFBF2E31), 100) : containerColorRadiusRight(Color(0xFFFBF2E31), 100), decoration: projectViewModel.isArabic ? containerColorRadiusLeft(Color(0xFFFBF2E31), 100) : containerColorRadiusRight(Color(0xFFFBF2E31), 100),
padding: EdgeInsets.only(left: projectViewModel.isArabic ?16:20, right: projectViewModel.isArabic ?20:16, top: 6, bottom: 6), padding: EdgeInsets.only(left: projectViewModel.isArabic ? 16 : 20, right: projectViewModel.isArabic ? 20 : 16, top: 6, bottom: 6),
child: Text( child: Text(
TranslationBase.of(context).medicalFile, TranslationBase.of(context).medicalFile,
style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 13), style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 10,
letterSpacing: -0.3,
height: 1.2,
),
), ),
), ),
mFlex(2), mFlex(2),
Padding( Padding(
padding: const EdgeInsets.only(left: 20,right: 20), padding: const EdgeInsets.only(left: 20, right: 20),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -59,22 +68,29 @@ class SliderView extends StatelessWidget {
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 18, fontSize: 17,
letterSpacing: -0.25,
height: 25 / 17,
), ),
), ),
Text( Text(
TranslationBase.of(context).loginRegisterNow, TranslationBase.of(context).loginRegisterNow,
style: TextStyle(color: Colors.white, fontSize: 14), style: TextStyle(
color: Colors.white,
fontSize: 12,
letterSpacing: -0.36,
height: 1,
),
), ),
], ],
), ),
), ),
mFlex(2), mFlex(2),
Padding( Padding(
padding: const EdgeInsets.only(left: 20,right: 20), padding: const EdgeInsets.only(left: 20, right: 20),
child: Container( child: Container(
height: MediaQuery.of(context).size.width / 14, height: MediaQuery.of(context).size.width / 14,
width: MediaQuery.of(context).size.width /(projectViewModel.isArabic?4: 6), width: MediaQuery.of(context).size.width / (projectViewModel.isArabic ? 4 : 6),
child: RaisedButton( child: RaisedButton(
shape: cardRadius(8), shape: cardRadius(8),
color: Color(0xFFFBF2E31), color: Color(0xFFFBF2E31),
@ -88,7 +104,8 @@ class SliderView extends StatelessWidget {
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 14 fontSize: 13,
letterSpacing: -0.39,
), ),
), ),
), ),

@ -1,5 +1,7 @@
import 'dart:async'; import 'dart:async';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -28,6 +30,7 @@ class SplashScreen extends StatefulWidget {
class _SplashScreenState extends State<SplashScreen> { class _SplashScreenState extends State<SplashScreen> {
PrivilegeService _privilegeService = locator<PrivilegeService>(); PrivilegeService _privilegeService = locator<PrivilegeService>();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -48,7 +51,10 @@ class _SplashScreenState extends State<SplashScreen> {
/// load the Privilege from service /// load the Privilege from service
Future loadPrivilege() async { Future loadPrivilege() async {
await _privilegeService.getPrivilege(); await _privilegeService.getPrivilege();
Provider.of<ProjectViewModel>(context, listen: false).setPrivilegeModelList(privilege: _privilegeService.privilegeModelList); ProjectViewModel projectProvider = Provider.of<ProjectViewModel>(context, listen: false);
projectProvider.setPrivilegeModelList(privilege: _privilegeService.privilegeModelList);
var themeNotifier = Provider.of<ThemeNotifier>(context,listen: false);
themeNotifier.setTheme(defaultTheme(fontName: projectProvider.isArabic ? 'Cairo' : 'Poppins'));
} }
@override @override

@ -63,7 +63,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: widget.index, index: widget.index,
currentIndex: 1, currentIndex: 1,
name: TranslationBase.of(context).medicalProfile, name: TranslationBase.of(context).medicalFile,
), ),
BottomNavigationItem( BottomNavigationItem(
icon: DQIcons.family, icon: DQIcons.family,

@ -61,8 +61,10 @@ class MedicalProfileItem extends StatelessWidget {
title, title,
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
fontSize: SizeConfig.textMultiplier * 1.6, fontSize: SizeConfig.textMultiplier * 1.4,
fontWeight: FontWeight.bold, fontWeight: FontWeight.w600,
letterSpacing: -0.3,
height: 13 / 10,
), ),
), ),
Container( Container(
@ -74,8 +76,10 @@ class MedicalProfileItem extends StatelessWidget {
subTitle, subTitle,
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
fontSize: SizeConfig.textMultiplier * 1.6, fontSize: SizeConfig.textMultiplier * 1.4,
fontWeight: FontWeight.bold, fontWeight: FontWeight.w600,
letterSpacing: -0.3,
height: 1,
), ),
), ),
), ),

@ -102,16 +102,19 @@ class _TimeLineViewState extends State<TimeLineView> {
TranslationBase.of(context).appointments, TranslationBase.of(context).appointments,
style: TextStyle( style: TextStyle(
color: CustomColors.white, color: CustomColors.white,
fontSize: 14, fontSize: 12,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
letterSpacing: -0.72,
), ),
), ),
Text( Text(
TranslationBase.of(context).timeLine, TranslationBase.of(context).timeLine,
style: TextStyle( style: TextStyle(
color: CustomColors.white, color: CustomColors.white,
fontSize: 24, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
letterSpacing: -1.44,
height: 1.2,
), ),
), ),
], ],
@ -205,16 +208,19 @@ class _TimeLineViewState extends State<TimeLineView> {
TranslationBase.of(context).appointments, TranslationBase.of(context).appointments,
style: TextStyle( style: TextStyle(
color: CustomColors.white, color: CustomColors.white,
fontSize: 14, fontSize: 12,
fontWeight: FontWeight.bold, fontWeight: FontWeight.w600,
letterSpacing: -0.72,
), ),
), ),
Text( Text(
TranslationBase.of(context).timeLine, TranslationBase.of(context).timeLine,
style: TextStyle( style: TextStyle(
color: CustomColors.white, color: CustomColors.white,
fontSize: 24, fontSize: 22,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
letterSpacing: -1.44,
height: 1.2,
), ),
), ),
], ],
@ -226,6 +232,7 @@ class _TimeLineViewState extends State<TimeLineView> {
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14, fontSize: 14,
letterSpacing: -0.42,
), ),
), ),
mHeight(4), mHeight(4),
@ -245,7 +252,11 @@ class _TimeLineViewState extends State<TimeLineView> {
child: AutoSizeText( child: AutoSizeText(
TranslationBase.of(context).login, TranslationBase.of(context).login,
maxLines: 1, maxLines: 1,
style: TextStyle(color: Colors.white, fontSize: 14), style: TextStyle(
color: Colors.white,
fontSize: 12,
letterSpacing: -0.33,
),
), ),
), ),
), ),
@ -297,6 +308,8 @@ class TimelineNewWidget extends StatelessWidget {
), ),
style: TextStyle( style: TextStyle(
color: CustomColors.grey2, color: CustomColors.grey2,
fontSize: 12,
height: 1.2,
), ),
), ),
mWidth(8), mWidth(8),
@ -324,7 +337,9 @@ class TimelineNewWidget extends StatelessWidget {
appoitmentAllHistoryResul.doctorNameObj, appoitmentAllHistoryResul.doctorNameObj,
style: TextStyle( style: TextStyle(
color: CustomColors.white, color: CustomColors.white,
fontSize: 12, fontSize: 10,
fontWeight: FontWeight.w600,
letterSpacing: -0.36,
), ),
), ),
Text( Text(
@ -332,7 +347,8 @@ class TimelineNewWidget extends StatelessWidget {
style: TextStyle( style: TextStyle(
color: CustomColors.grey2, color: CustomColors.grey2,
fontSize: 8, fontSize: 8,
fontWeight: FontWeight.bold, fontWeight: FontWeight.w600,
letterSpacing: -0.36,
), ),
), ),
], ],

@ -16,6 +16,8 @@ import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doct
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -113,14 +115,20 @@ class _AppDrawerState extends State<AppDrawer> {
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 18, fontSize: 17,
letterSpacing: -1.2,
), ),
), ),
Text( Text(
(user != null && projectProvider.isLogin) (user != null && projectProvider.isLogin)
? TranslationBase.of(context).fileno + ": " + user.patientID.toString() ? TranslationBase.of(context).fileno + ": " + user.patientID.toString()
: TranslationBase.of(context).loginRegisterNow, : TranslationBase.of(context).loginRegisterNow,
style: TextStyle(color: Colors.black, fontSize: 14), style: TextStyle(
color: Colors.black,
fontSize: 13,
letterSpacing: -0.96,
height: 1,
),
), ),
], ],
), ),
@ -150,6 +158,8 @@ class _AppDrawerState extends State<AppDrawer> {
} else { } else {
projectProvider.changeLanguage('ar'); projectProvider.changeLanguage('ar');
} }
var themeNotifier = Provider.of<ThemeNotifier>(context, listen: false);
themeNotifier.setTheme(defaultTheme(fontName: projectProvider.isArabic ? 'Cairo' : 'Poppins'));
}, },
), ),
(user != null && projectProvider.isLogin) (user != null && projectProvider.isLogin)
@ -166,6 +176,7 @@ class _AppDrawerState extends State<AppDrawer> {
textColor: Theme.of(context).textTheme.bodyText1.color, textColor: Theme.of(context).textTheme.bodyText1.color,
iconColor: Theme.of(context).textTheme.bodyText1.color, iconColor: Theme.of(context).textTheme.bodyText1.color,
sideArrow: true, sideArrow: true,
letterSpacing: -0.84,
), ),
onTap: () { onTap: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
@ -206,10 +217,18 @@ class _AppDrawerState extends State<AppDrawer> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText(mainUser.firstName + ' ' + mainUser.lastName, color: Theme.of(context).textTheme.bodyText1.color),
AppText( AppText(
TranslationBase.of(context).fileno + ": " + mainUser.patientID.toString(), mainUser.firstName + ' ' + mainUser.lastName,
color: Theme.of(context).textTheme.bodyText1.color, color: Theme.of(context).textTheme.bodyText1.color,
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.33,
),
AppText(
TranslationBase.of(context).fileno + ": " + mainUser.patientID.toString(),
color: Colors.grey[700],
fontSize: 12,
letterSpacing: -0.33,
), ),
], ],
), ),
@ -243,9 +262,19 @@ class _AppDrawerState extends State<AppDrawer> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText(result.patientName, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black), AppText(
AppText(TranslationBase.of(context).fileno + ": " + result.responseID.toString(), result.patientName,
color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black), color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black,
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.33,
),
AppText(
TranslationBase.of(context).fileno + ": " + result.responseID.toString(),
color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.grey[700],
fontSize: 12,
letterSpacing: -0.33,
),
Divider( Divider(
color: Colors.grey[400], color: Colors.grey[400],
), ),
@ -271,6 +300,8 @@ class _AppDrawerState extends State<AppDrawer> {
Padding(child: Image.asset('assets/images/lang.png'), padding: EdgeInsets.only(left: 3, right: 3, top: 3, bottom: projectProvider.isArabic ? 3 : 0)), Padding(child: Image.asset('assets/images/lang.png'), padding: EdgeInsets.only(left: 3, right: 3, top: 3, bottom: projectProvider.isArabic ? 3 : 0)),
isImageIcon: true, isImageIcon: true,
bottomLine: false, bottomLine: false,
letterSpacing: -0.84,
fontSize: 14,
fontHeight: projectProvider.isArabic ? 1 : 0.8, fontHeight: projectProvider.isArabic ? 1 : 0.8,
), ),
onTap: () { onTap: () {
@ -290,6 +321,8 @@ class _AppDrawerState extends State<AppDrawer> {
SvgPicture.asset("assets/images/new/notifications.svg"), SvgPicture.asset("assets/images/new/notifications.svg"),
isImageIcon: true, isImageIcon: true,
bottomLine: false, bottomLine: false,
letterSpacing: -0.84,
fontSize: 14,
count: notificationCount != null count: notificationCount != null
? new Container( ? new Container(
padding: EdgeInsets.all(4), padding: EdgeInsets.all(4),
@ -329,6 +362,8 @@ class _AppDrawerState extends State<AppDrawer> {
SvgPicture.asset("assets/images/new/app_setting.svg"), SvgPicture.asset("assets/images/new/app_setting.svg"),
isImageIcon: true, isImageIcon: true,
bottomLine: false, bottomLine: false,
letterSpacing: -0.84,
fontSize: 14,
), ),
onTap: () { onTap: () {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
@ -341,6 +376,8 @@ class _AppDrawerState extends State<AppDrawer> {
TranslationBase.of(context).rateApp, TranslationBase.of(context).rateApp,
Icons.star, Icons.star,
bottomLine: false, bottomLine: false,
letterSpacing: -0.84,
fontSize: 14,
), ),
onTap: () { onTap: () {
if (Platform.isIOS) { if (Platform.isIOS) {
@ -356,6 +393,8 @@ class _AppDrawerState extends State<AppDrawer> {
SvgPicture.asset("assets/images/new/logout.svg"), SvgPicture.asset("assets/images/new/logout.svg"),
isImageIcon: true, isImageIcon: true,
bottomLine: false, bottomLine: false,
letterSpacing: -0.84,
fontSize: 14,
), ),
onTap: () { onTap: () {
logout(); logout();
@ -368,6 +407,8 @@ class _AppDrawerState extends State<AppDrawer> {
TranslationBase.of(context).loginregister, TranslationBase.of(context).loginregister,
SvgPicture.asset("assets/images/new/logout.svg"), SvgPicture.asset("assets/images/new/logout.svg"),
isImageIcon: true, isImageIcon: true,
letterSpacing: -0.84,
fontSize: 14,
bottomLine: false, bottomLine: false,
), ),
onTap: () { onTap: () {
@ -398,7 +439,9 @@ class _AppDrawerState extends State<AppDrawer> {
TranslationBase.of(context).poweredBy, TranslationBase.of(context).poweredBy,
style: TextStyle( style: TextStyle(
color: Color(0xFF989898), color: Color(0xFF989898),
fontWeight: FontWeight.bold, fontSize: 13,
letterSpacing: -0.54,
fontWeight: FontWeight.w600,
), ),
), ),
mWidth(2), mWidth(2),
@ -406,7 +449,9 @@ class _AppDrawerState extends State<AppDrawer> {
"Cloud Solutions", "Cloud Solutions",
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.bold, fontSize: 13,
letterSpacing: -0.54,
fontWeight: FontWeight.w600,
), ),
), ),
mWidth(16), mWidth(16),

@ -17,8 +17,11 @@ class DrawerItem extends StatefulWidget {
final Widget count; final Widget count;
final bool isImageIcon; final bool isImageIcon;
final double fontHeight; final double fontHeight;
final double letterSpacing;
final double fontSize;
DrawerItem(this.title, this.icon, {this.textColor, this.iconColor, this.subTitle = '', this.bottomLine = true, this.count, this.sideArrow = false, this.isImageIcon = false,this.fontHeight}); DrawerItem(this.title, this.icon,
{this.fontSize, this.letterSpacing, this.textColor, this.iconColor, this.subTitle = '', this.bottomLine = true, this.count, this.sideArrow = false, this.isImageIcon = false, this.fontHeight});
@override @override
_DrawerItemState createState() => _DrawerItemState(); _DrawerItemState createState() => _DrawerItemState();
@ -59,8 +62,9 @@ class _DrawerItemState extends State<DrawerItem> {
AppText( AppText(
widget.title, widget.title,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.3, fontSize: widget.fontSize,
height: widget.fontHeight, height: widget.fontHeight,
letterSpacing: widget.letterSpacing,
), ),
widget.count ?? SizedBox(), widget.count ?? SizedBox(),
], ],

@ -24,6 +24,7 @@ class AppText extends StatefulWidget {
final Color backGroundcolor; final Color backGroundcolor;
final bool underline; final bool underline;
final double height; final double height;
final double letterSpacing;
AppText(this.data, AppText(this.data,
{this.color, {this.color,
@ -39,6 +40,7 @@ class AppText extends StatefulWidget {
this.visibility = true, this.visibility = true,
this.textAlign, this.textAlign,
this.underline = false, this.underline = false,
this.letterSpacing,
this.height, this.height,
this.backGroundcolor = Colors.white}); this.backGroundcolor = Colors.white});
@ -63,11 +65,12 @@ class _AppTextState extends State<AppText> {
fontWeight: widget.fontWeight, fontWeight: widget.fontWeight,
fontSize: widget.fontSize ?? (SizeConfig.textMultiplier * 2), fontSize: widget.fontSize ?? (SizeConfig.textMultiplier * 2),
height: widget.height, height: widget.height,
fontFamily: widget.fontFamily == null letterSpacing: widget.letterSpacing,
? projectViewModel.isArabic // fontFamily: widget.fontFamily == null
? 'Cairo' // ? projectViewModel.isArabic
: 'WorkSans' // ? 'Cairo'
: widget.fontFamily, // : 'WorkSans'
// : widget.fontFamily,
decoration: widget.underline == true ? TextDecoration.underline : TextDecoration.none decoration: widget.underline == true ? TextDecoration.underline : TextDecoration.none
// backgroundColor:widget.backGroundcolor // backgroundColor:widget.backGroundcolor
), ),

Loading…
Cancel
Save