Ganaric Font and font implementaion

merge-update-with-lab-changes
Mirza.Shafique 4 years ago
parent 38465eaafb
commit 5f44dece71

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

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

@ -61,18 +61,29 @@ class LoggedSliderView extends StatelessWidget {
padding: EdgeInsets.only(left: 20, right: 16, top: 6, bottom: 6),
child: Text(
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),
//circularAviator(MediaQuery.of(context).size.width / 14, brColor: Colors.white),
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(
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),
],
),
@ -87,12 +98,19 @@ class LoggedSliderView extends StatelessWidget {
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 18,
fontSize: 17,
letterSpacing: -0.25,
height: 25 / 17,
),
),
Text(
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),
child: Text(
"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),

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

@ -13,6 +13,7 @@ class SliderView extends StatelessWidget {
SliderView({this.onLoginClick});
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
@ -32,7 +33,9 @@ class SliderView extends StatelessWidget {
height: double.infinity,
clipBehavior: Clip.antiAlias,
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(
color: Colors.transparent,
margin: EdgeInsets.zero,
@ -42,15 +45,21 @@ class SliderView extends StatelessWidget {
mFlex(3),
Container(
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(
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),
Padding(
padding: const EdgeInsets.only(left: 20,right: 20),
padding: const EdgeInsets.only(left: 20, right: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -59,22 +68,29 @@ class SliderView extends StatelessWidget {
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 18,
fontSize: 17,
letterSpacing: -0.25,
height: 25 / 17,
),
),
Text(
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),
Padding(
padding: const EdgeInsets.only(left: 20,right: 20),
padding: const EdgeInsets.only(left: 20, right: 20),
child: Container(
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(
shape: cardRadius(8),
color: Color(0xFFFBF2E31),
@ -88,7 +104,8 @@ class SliderView extends StatelessWidget {
maxLines: 1,
style: TextStyle(
color: Colors.white,
fontSize: 14
fontSize: 13,
letterSpacing: -0.39,
),
),
),

@ -1,5 +1,7 @@
import 'dart:async';
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/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -28,6 +30,7 @@ class SplashScreen extends StatefulWidget {
class _SplashScreenState extends State<SplashScreen> {
PrivilegeService _privilegeService = locator<PrivilegeService>();
@override
void initState() {
super.initState();
@ -48,7 +51,10 @@ class _SplashScreenState extends State<SplashScreen> {
/// load the Privilege from service
Future loadPrivilege() async {
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

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

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

@ -16,6 +16,8 @@ import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doct
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.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_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -62,9 +64,7 @@ class _AppDrawerState extends State<AppDrawer> {
Widget build(BuildContext context) {
projectProvider = Provider.of(context);
// (user.isFamily == null || user.isFamily == false) && projectProvider.havePrivilege(2)
print(user.isFamily.toString());
print(user.isFamily.toString());
print(projectProvider.havePrivilege(2).toString());
return Container(
width: MediaQuery.of(context).size.width * 0.75,
color: Theme.of(context).scaffoldBackgroundColor,
@ -115,14 +115,20 @@ class _AppDrawerState extends State<AppDrawer> {
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 18,
fontSize: 17,
letterSpacing: -1.2,
),
),
Text(
(user != null && projectProvider.isLogin)
? TranslationBase.of(context).fileno + ": " + user.patientID.toString()
: TranslationBase.of(context).loginRegisterNow,
style: TextStyle(color: Colors.black, fontSize: 14),
style: TextStyle(
color: Colors.black,
fontSize: 13,
letterSpacing: -0.96,
height: 1,
),
),
],
),
@ -152,6 +158,8 @@ class _AppDrawerState extends State<AppDrawer> {
} else {
projectProvider.changeLanguage('ar');
}
var themeNotifier = Provider.of<ThemeNotifier>(context, listen: false);
themeNotifier.setTheme(defaultTheme(fontName: projectProvider.isArabic ? 'Cairo' : 'Poppins'));
},
),
(user != null && projectProvider.isLogin)
@ -168,6 +176,7 @@ class _AppDrawerState extends State<AppDrawer> {
textColor: Theme.of(context).textTheme.bodyText1.color,
iconColor: Theme.of(context).textTheme.bodyText1.color,
sideArrow: true,
letterSpacing: -0.84,
),
onTap: () {
Navigator.of(context).pop();
@ -208,10 +217,18 @@ class _AppDrawerState extends State<AppDrawer> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(mainUser.firstName + ' ' + mainUser.lastName, color: Theme.of(context).textTheme.bodyText1.color),
AppText(
TranslationBase.of(context).fileno + ": " + mainUser.patientID.toString(),
mainUser.firstName + ' ' + mainUser.lastName,
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,
),
],
),
@ -245,9 +262,19 @@ class _AppDrawerState extends State<AppDrawer> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(result.patientName, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
AppText(TranslationBase.of(context).fileno + ": " + result.responseID.toString(),
color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
AppText(
result.patientName,
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(
color: Colors.grey[400],
),
@ -273,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)),
isImageIcon: true,
bottomLine: false,
letterSpacing: -0.84,
fontSize: 14,
fontHeight: projectProvider.isArabic ? 1 : 0.8,
),
onTap: () {
@ -292,6 +321,8 @@ class _AppDrawerState extends State<AppDrawer> {
SvgPicture.asset("assets/images/new/notifications.svg"),
isImageIcon: true,
bottomLine: false,
letterSpacing: -0.84,
fontSize: 14,
count: notificationCount != null
? new Container(
padding: EdgeInsets.all(4),
@ -331,6 +362,8 @@ class _AppDrawerState extends State<AppDrawer> {
SvgPicture.asset("assets/images/new/app_setting.svg"),
isImageIcon: true,
bottomLine: false,
letterSpacing: -0.84,
fontSize: 14,
),
onTap: () {
Navigator.of(context).pushNamed(
@ -343,6 +376,8 @@ class _AppDrawerState extends State<AppDrawer> {
TranslationBase.of(context).rateApp,
Icons.star,
bottomLine: false,
letterSpacing: -0.84,
fontSize: 14,
),
onTap: () {
if (Platform.isIOS) {
@ -358,6 +393,8 @@ class _AppDrawerState extends State<AppDrawer> {
SvgPicture.asset("assets/images/new/logout.svg"),
isImageIcon: true,
bottomLine: false,
letterSpacing: -0.84,
fontSize: 14,
),
onTap: () {
logout();
@ -370,6 +407,8 @@ class _AppDrawerState extends State<AppDrawer> {
TranslationBase.of(context).loginregister,
SvgPicture.asset("assets/images/new/logout.svg"),
isImageIcon: true,
letterSpacing: -0.84,
fontSize: 14,
bottomLine: false,
),
onTap: () {
@ -400,7 +439,9 @@ class _AppDrawerState extends State<AppDrawer> {
TranslationBase.of(context).poweredBy,
style: TextStyle(
color: Color(0xFF989898),
fontWeight: FontWeight.bold,
fontSize: 13,
letterSpacing: -0.54,
fontWeight: FontWeight.w600,
),
),
mWidth(2),
@ -408,7 +449,9 @@ class _AppDrawerState extends State<AppDrawer> {
"Cloud Solutions",
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 13,
letterSpacing: -0.54,
fontWeight: FontWeight.w600,
),
),
mWidth(16),

@ -17,8 +17,11 @@ class DrawerItem extends StatefulWidget {
final Widget count;
final bool isImageIcon;
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
_DrawerItemState createState() => _DrawerItemState();
@ -59,8 +62,9 @@ class _DrawerItemState extends State<DrawerItem> {
AppText(
widget.title,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.3,
fontSize: widget.fontSize,
height: widget.fontHeight,
letterSpacing: widget.letterSpacing,
),
widget.count ?? SizedBox(),
],

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

Loading…
Cancel
Save