Merge branch 'development' into Haroon

merge-requests/335/head
haroon amjad 5 years ago
commit 9c1fdf96f4

@ -365,7 +365,7 @@ const Map localizedValues = {
'painScale': {'en': 'Pain Scale', 'ar': 'مقياس الألم'},
'weight': {'en': 'Weight', 'ar': 'الوزن'},
'height': {'en': 'Height', 'ar': 'الطول'},
'heart': {'en': 'Heart', 'ar': 'قلب'},
'heart': {'en': 'Heart Rate', 'ar': 'معدل النبض'},
"heightUnit": {"en": "height unit", "ar": "وحدة الطول"},
"weightUnit": {"en": "Weight Unit", "ar": "وحدة الوزن"},
"request": {"en": "Request", "ar": "طلبات الاضافة"},
@ -1963,18 +1963,32 @@ const Map localizedValues = {
},
"ancillary-orders": {"en": "Ancillary Orders", "ar": "الأوامر التبعية"},
"onlineCheckInAgreement": {"en": "The online check-in is for non-life threatening situationCall the red crescent (number) or go to the nearest emergency department if there are:signs of stroke or heart attack history of seizure or syncope there is limb or life threatening injury picture of severe injuries",
"ar": "تسجيل الذهاب الى الطوارئ عبر الإنترنت هو فقط للحالات  التي لا تهدد الحياة يجب الاتصل بالهلال الأحمر (رقم) أو الذهاب إلى أقرب قسم طوارئ إذا كان هناك علامات السكتة الدماغية أو النوبة القلبية او هناك نوبة تشنج او حالة فقدان الوعي او وجود إصابة تهدد أحد الأطراف او تهدد الحياة او وجود إصابات خطيرة"},
"onlineCheckInAgreement": {
"en":
"The online check-in is for non-life threatening situationCall the red crescent (number) or go to the nearest emergency department if there are:signs of stroke or heart attack history of seizure or syncope there is limb or life threatening injury picture of severe injuries",
"ar":
"تسجيل الذهاب الى الطوارئ عبر الإنترنت هو فقط للحالات  التي لا تهدد الحياة يجب الاتصل بالهلال الأحمر (رقم) أو الذهاب إلى أقرب قسم طوارئ إذا كان هناك علامات السكتة الدماغية أو النوبة القلبية او هناك نوبة تشنج او حالة فقدان الوعي او وجود إصابة تهدد أحد الأطراف او تهدد الحياة او وجود إصابات خطيرة"
},
"MRN": {"en": "MRN", "ar": "ایم آر این"},
"appointment-date": {"en": "Appointment Date", "ar": "تقرری کی تاریخ"},
"appointment-no": {"en": "Appointment No", "ar": "تقرری نمبر"},
"insurance-id": {"en": "Insurance ID", "ar": "انشورنس ID"},
"chiefComplaints": {"en": "Chief Complaints", "ar": "الشكوى الرئيسة"},
"errorChiefComplaints": {"en": "Please Chief Complaints", "ar": "يرجى ادخال الشكوى الرئيسة"},
"errorExpectedArrivalTimes": {"en": "Please Expected arrival time", "ar": "يرجى ادخال الوقت المتوقع للوصول"},
"expectedArrivalTime": {"en": "Expected arrival time", "ar": "الوقت المتوقع للوصول"},
"add-address": {
"en": "Add new address",
"ar": "اضف عنوان جديد"
"errorChiefComplaints": {
"en": "Please Chief Complaints",
"ar": "يرجى ادخال الشكوى الرئيسة"
},
"errorExpectedArrivalTimes": {
"en": "Please Expected arrival time",
"ar": "يرجى ادخال الوقت المتوقع للوصول"
},
"expectedArrivalTime": {
"en": "Expected arrival time",
"ar": "الوقت المتوقع للوصول"
},
"add-address": {"en": "Add new address", "ar": "اضف عنوان جديد"},
"enter-file": {
"en": "Please enter the mobile number and the medical file number",
"ar": "الرجاء إدخال رقم الجوال ورقم الملف الطبي"
}
};

@ -103,7 +103,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrders>
bottom: BorderSide(
width: 0.5,
))),
padding: EdgeInsets.all(5),
padding: EdgeInsets.all(15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [

@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import "package:collection/collection.dart";
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
class AnicllaryOrdersDetails extends StatefulWidget {
final dynamic appoNo;
@ -186,11 +187,60 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
}
Widget getAncillaryDetails(model) {
var newMap = groupBy(model.ancillaryListsDetails[0].ancillaryOrderProcList,
Map newMap = groupBy(model.ancillaryListsDetails[0].ancillaryOrderProcList,
(obj) => obj.procedureCategoryName);
print(newMap);
return Padding(
padding: EdgeInsets.only(top: 10, bottom: 10),
child: Column(children: []));
child: getHeaderDetails(newMap));
}
Widget getHeaderDetails(newMap) {
List<Widget> list = new List<Widget>();
newMap.forEach((key, value) {
list.add(
Texts(
key,
fontWeight: FontWeight.bold,
),
);
list.add(Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [getLabDetails(value)],
));
});
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: list,
);
}
getLabDetails(value) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: value.map<Widget>((result) {
return Container(
width: MediaQuery.of(context).size.width * .9,
padding: EdgeInsets.all(10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Expanded(
flex: 3,
child: Text(result.procedureName.toString(),
overflow: TextOverflow.ellipsis)),
Expanded(child: AppText(result.companyShare.toString())),
Expanded(child: AppText(result.companyTaxAmount.toString())),
Expanded(
child: AppText(
result.companyShareWithTax.toString(),
))
],
));
}).toList(),
);
}
}

@ -109,27 +109,49 @@ class _InsuranceCardState extends State<InsuranceCard> {
),
Column(
crossAxisAlignment:
CrossAxisAlignment.stretch,
CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Texts(
TranslationBase.of(context)
.category,
fontSize: 18.5),
Texts(
TranslationBase.of(context).category +": "+
model.insurance[index]
.subCategoryDesc,
fontSize: 18.5,
fontSize: 18.5)
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Texts(
TranslationBase.of(context)
.expirationDate +": "+
convertDateFormat(model
.insurance[index].cardValidTo),
fontSize: 18.5,
.expirationDate,
fontSize: 18.5),
Texts(
convertDateFormat(
model.insurance[index]
.cardValidTo,
),
Expanded(
child: Column(
children: <Widget>[
model.insurance[index].isActive == true
fontSize: 18.5),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Texts(
TranslationBase.of(context)
.status +
": ",
fontSize: 18.5),
model.insurance[index].isActive ==
true
? Texts(
TranslationBase.of(context)
.activeInsurence,
@ -144,23 +166,35 @@ class _InsuranceCardState extends State<InsuranceCard> {
fontSize: 17.9)
],
),
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Texts(
TranslationBase.of(context)
.patientCard,
fontSize: 18.5),
Texts(
model.insurance[index]
.patientCardID,
fontSize: 18.5)
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Texts(
TranslationBase.of(context)
.patientCard +": "+
model
.insurance[index].patientCardID,
.policyNumber,
fontSize: 18.5,
),
Texts(
TranslationBase.of(context)
.policyNumber +" "+
model.insurance[index]
.insurancePolicyNumber,
fontSize: 18.5,
),
)
]),
],
),
SizedBox(

@ -88,7 +88,9 @@ class _Login extends State<Login> {
Expanded(
flex: 2,
child: Texts(
TranslationBase.of(context).enterNationalId,
loginType == 1
? TranslationBase.of(context).enterNationalId
: TranslationBase.of(context).enterFile,
fontSize: SizeConfig.textMultiplier * 3.5,
textAlign: TextAlign.start,
)),

@ -14,10 +14,18 @@ class LineChartCurved extends StatelessWidget {
List<int> xAxixs = List();
List<double> yAxixs = List();
double minY = 0;
double maxY = 0;
double minX = 0;
double maxX = 0;
double increasingY = 0;
@override
Widget build(BuildContext context) {
getXaxix();
getYaxix();
calculateMaxAndMin();
return AspectRatio(
aspectRatio: 1.1,
child: Container(
@ -70,10 +78,18 @@ class LineChartCurved extends StatelessWidget {
}
}
}
getYaxix() {
int indexess= (timeSeries.length*0.30).toInt();
// int indexess= (timeSeries.length*0.30).toInt();
// for (int index = 0; index < timeSeries.length; index++) {
// int mIndex = indexess * index;
// if (mIndex < timeSeries.length) {
// yAxixs.add(timeSeries[mIndex].sales);
// }
// }
for (int index = 0; index < timeSeries.length; index++) {
int mIndex = indexess * index;
int mIndex = indexes * index;
if (mIndex < timeSeries.length) {
yAxixs.add(timeSeries[mIndex].sales);
}
@ -100,7 +116,6 @@ class LineChartCurved extends StatelessWidget {
fontSize: 10,
),
rotateAngle:-65,
//rotateAngle:-65,
margin: 22,
getTitles: (value) {
if (timeSeries.length < 15) {
@ -128,18 +143,18 @@ class LineChartCurved extends StatelessWidget {
fontSize: 10,
),
getTitles: (value) {
// if (timeSeries.length < 10) {
// return '${value.toInt()}';
// } else {
// if (value == getMinY())
// return '${value.toInt()}';
// if (value == getMaxY())
// return '${value.toInt()}';
// if (yAxixs.contains(value)) {
// return '${value.toInt()}';
// }
// return '';
// }
if (timeSeries.length < 15) {
return '${value.toInt()}';
} else {
if (value == minY)
return '${value.toInt()}';
if (value == getMaxY())
return '${value.toInt()}';
//if (yAxixs.contains(value)) {
return '${value.toInt()}';
return '';
}
return '${value.toInt()}';
},
margin: 12,
@ -163,31 +178,55 @@ class LineChartCurved extends StatelessWidget {
),
),
),
minX: 0,
maxX: (timeSeries.length - 1).toDouble(),
maxY: getMaxY()+0.3,
minY: getMinY(),
minX: minX,
maxX: maxX,
maxY: maxY,
minY: minY,
lineBarsData: getData(context),
);
}
calculateMaxAndMin(){
getMaxY();
getMaxX();
getMin();
getMinY();
increasingY = ((maxY-minY)/timeSeries.length - 1)*15;
maxY += increasingY.abs();
minY -= increasingY.abs();
}
double getMaxY() {
double max = 0;
maxY = 0;
timeSeries.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble > maxY) maxY = resultValueDouble;
});
return maxY.roundToDouble() ;
}
getMaxX(){
maxX = (timeSeries.length - 1).toDouble();
}
double getMin(){
minX = 0;
timeSeries.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble > max) max = resultValueDouble;
if (resultValueDouble < minX) minX = resultValueDouble;
});
return max.roundToDouble() ;
return minX.roundToDouble() ;
}
double getMinY() {
double min = timeSeries[0].sales;
minY = 0;
timeSeries.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble < min) min = resultValueDouble;
if (resultValueDouble < minY) minY = resultValueDouble;
});
int value = min.toInt();
int value = minY.toInt();
return value.toDouble();
}
@ -202,7 +241,7 @@ class LineChartCurved extends StatelessWidget {
spots: spots,
isCurved: true,
colors: [secondaryColor],
barWidth: 5,
barWidth: 3,
isStrokeCapRound: true,
dotData: FlDotData(
show: false,

@ -178,8 +178,8 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
),
minX: 0,
maxX: (timeSeries1.length - 1).toDouble(),
maxY: getMaxY() + 0.3,
minY: getMinY(),
maxY: getMaxY() + 15,
minY: getMinY()-15,
lineBarsData: getData(context),
);
}

@ -40,7 +40,7 @@ class _GeneralSettings extends State<GeneralSettings>
return Container(
child: ListView(scrollDirection: Axis.vertical, children: <Widget>[
Container(
color: Theme.of(context).primaryColor,
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(10),
child: AppText(
TranslationBase.of(context).modes,
@ -48,7 +48,7 @@ class _GeneralSettings extends State<GeneralSettings>
),
),
Container(
color: Theme.of(context).primaryColor,
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -68,7 +68,7 @@ class _GeneralSettings extends State<GeneralSettings>
],
)),
Container(
color: Theme.of(context).primaryColor,
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -88,7 +88,7 @@ class _GeneralSettings extends State<GeneralSettings>
],
)),
Container(
color: Theme.of(context).primaryColor,
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(10),
child: AppText(
TranslationBase.of(context).blindMode,
@ -96,7 +96,7 @@ class _GeneralSettings extends State<GeneralSettings>
),
),
new Container(
color: Theme.of(context).primaryColor,
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(8.0),
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
@ -179,7 +179,7 @@ class _GeneralSettings extends State<GeneralSettings>
)
])),
Container(
color: Theme.of(context).primaryColor,
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(10),
child: AppText(
TranslationBase.of(context).permissions,
@ -187,7 +187,7 @@ class _GeneralSettings extends State<GeneralSettings>
),
),
Container(
color: Theme.of(context).primaryColor,
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -206,7 +206,7 @@ class _GeneralSettings extends State<GeneralSettings>
],
)),
Container(
color: Theme.of(context).primaryColor,
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,

@ -35,7 +35,7 @@ defaultTheme({fontName}) {
backgroundColor: Color.fromRGBO(255, 255, 255, 1),
highlightColor: Colors.grey[100].withOpacity(0.4),
splashColor: Colors.transparent,
primaryColor: Color(0xffffffff),
primaryColor: Color(0xff515A5D),
buttonColor: Colors.black,
toggleableActiveColor: secondaryColor,
indicatorColor: secondaryColor,
@ -47,7 +47,7 @@ defaultTheme({fontName}) {
textTheme: TextTheme(
bodyText1: TextStyle(color: Colors.black),
headline1: TextStyle(color: Colors.white),
),
headline2: TextStyle(color: Colors.white)),
appBarTheme: AppBarTheme(
color: Color(0xff515A5D),
brightness: Brightness.light,
@ -76,7 +76,7 @@ invertThemes({fontName}) {
textTheme: TextTheme(
bodyText1: TextStyle(color: Colors.white),
headline1: TextStyle(color: Colors.white),
),
headline2: TextStyle(color: Colors.white)),
disabledColor: Colors.grey[800],
errorColor: Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor: Color(0xff000000), // Colors.grey[100],
@ -125,6 +125,7 @@ bwThemes({fontName}) {
textTheme: TextTheme(
bodyText1: TextStyle(color: Colors.red[900]),
headline1: TextStyle(color: Colors.red[900]),
headline2: TextStyle(color: Colors.white),
bodyText2: TextStyle(color: Colors.red[900]),
subtitle1: TextStyle(color: Colors.red[900]),
),

@ -1573,12 +1573,18 @@ class TranslationBase {
String get shippingAddresss =>
localizedValues["shipping-address"][locale.languageCode];
String get covidAlert => localizedValues["covid-alert"][locale.languageCode];
String get pharmacyRelogin => localizedValues["pharmacy-relogin"][locale.languageCode];
String get onlineCheckInAgreement => localizedValues["onlineCheckInAgreement"][locale.languageCode];
String get chiefComplaints => localizedValues["chiefComplaints"][locale.languageCode];
String get errorChiefComplaints => localizedValues["errorChiefComplaints"][locale.languageCode];
String get expectedArrivalTime => localizedValues["expectedArrivalTime"][locale.languageCode];
String get errorExpectedArrivalTime => localizedValues["errorExpectedArrivalTimes"][locale.languageCode];
String get pharmacyRelogin =>
localizedValues["pharmacy-relogin"][locale.languageCode];
String get onlineCheckInAgreement =>
localizedValues["onlineCheckInAgreement"][locale.languageCode];
String get chiefComplaints =>
localizedValues["chiefComplaints"][locale.languageCode];
String get errorChiefComplaints =>
localizedValues["errorChiefComplaints"][locale.languageCode];
String get expectedArrivalTime =>
localizedValues["expectedArrivalTime"][locale.languageCode];
String get errorExpectedArrivalTime =>
localizedValues["errorExpectedArrivalTimes"][locale.languageCode];
String get anicllaryOrders =>
localizedValues["ancillary-orders"][locale.languageCode];
String get mrn => localizedValues["MRN"][locale.languageCode];
@ -1588,6 +1594,7 @@ class TranslationBase {
localizedValues["appointment-no"][locale.languageCode];
String get insuranceID =>
localizedValues["insurance-id"][locale.languageCode];
String get enterFile => localizedValues["enter-file"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -36,6 +36,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:url_launcher/url_launcher.dart';
import '../Constants.dart';
import 'app_shared_preferences.dart';
@ -183,10 +184,9 @@ class Utils {
// }
}
static getPhoneNumberWithoutZero(String number){
String newNumber="";
if(number.startsWith('0'))
{
static getPhoneNumberWithoutZero(String number) {
String newNumber = "";
if (number.startsWith('0')) {
newNumber = number.substring(1);
}
return newNumber;
@ -202,7 +202,11 @@ class Utils {
.hasMatch(email);
}
static List<Widget> myMedicalList({ProjectViewModel projectViewModel, BuildContext context, bool isLogin, count}) {
static List<Widget> myMedicalList(
{ProjectViewModel projectViewModel,
BuildContext context,
bool isLogin,
count}) {
List<Widget> medical = List();
if (projectViewModel.havePrivilege(5)) {
medical.add(InkWell(
@ -503,15 +507,19 @@ class Utils {
if (projectViewModel.havePrivilege(32) || true) {
medical.add(InkWell(
onTap: () {
userData().then((userData_){
userData().then((userData_) {
if (projectViewModel.isLogin && userData_ != null) {
String patientID = userData_.patientID.toString();
GifLoaderDialogUtils.showMyDialog(context);
projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)});
projectViewModel
.platformBridge()
.connectHMGInternetWifi(patientID)
.then((value) => {GifLoaderDialogUtils.hideDialog(context)});
} else {
AlertDialogBox(
context: context,
confirmMessage: "Please login with your account first to use this feature",
confirmMessage:
"Please login with your account first to use this feature",
okText: "OK",
okFunction: () {
AlertDialogBox.closeAlertDialog(context);
@ -529,10 +537,9 @@ class Utils {
if (projectViewModel.havePrivilege(40)) {
medical.add(InkWell(
// onTap: () {
// Navigator.push(
// context, FadePage(page: InsuranceApproval()));
// },
onTap: () {
launch('whatsapp://send?phone=18885521858&text=');
},
child: MedicalProfileItem(
title: TranslationBase.of(context).chatbot,
imagePath: 'insurance_approvals_icon.png',
@ -546,12 +553,11 @@ class Utils {
}
Future<AuthenticatedUser> userData() async {
var userData = AuthenticatedUser.fromJson(await AppSharedPreferences().getObject(MAIN_USER));
var userData = AuthenticatedUser.fromJson(
await AppSharedPreferences().getObject(MAIN_USER));
return userData;
}
// extension function that use in iterations(list.. etc) to iterate items and get index and item it self
extension IndexedIterable<E> on Iterable<E> {
Iterable<T> mapIndexed<T>(T Function(E e, int i) f) {

@ -15,7 +15,7 @@ class ServicesContainer extends StatelessWidget {
height: 60,
margin: EdgeInsets.all(8),
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
color: Theme.of(context).textTheme.headline2.color,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(7),
),
@ -38,6 +38,7 @@ class ServicesContainer extends StatelessWidget {
Texts(
title,
fontSize: 16,
color: Colors.black,
),
],
),

@ -61,10 +61,14 @@ class _AppDrawerState extends State<AppDrawer> {
@override
Widget build(BuildContext context) {
projectProvider = Provider.of(context);
return SizedBox(
return Container(
width: MediaQuery.of(context).size.width * 0.75,
color: Theme.of(context).scaffoldBackgroundColor,
child: Container(
color: Colors.white,
// color: Colors.white,
child: Theme(
data: Theme.of(context).copyWith(
canvasColor: Theme.of(context).scaffoldBackgroundColor),
child: Drawer(
child: Column(
children: <Widget>[
@ -80,8 +84,8 @@ class _AppDrawerState extends State<AppDrawer> {
child: Column(
children: <Widget>[
Container(
child:
Image.asset('assets/images/logo_HMG.png'),
child: Image.asset(
'assets/images/logo_HMG.png'),
margin: EdgeInsets.all(
SizeConfig.imageSizeMultiplier * 4),
),
@ -95,11 +99,13 @@ class _AppDrawerState extends State<AppDrawer> {
Row(
children: <Widget>[
Padding(
padding: EdgeInsets.only(
padding:
EdgeInsets.only(
right: 5),
child: Icon(
Icons.account_circle,
color: Color(0xFF40ACC9),
color:
Color(0xFF40ACC9),
)),
AppText(
user.firstName +
@ -122,14 +128,15 @@ class _AppDrawerState extends State<AppDrawer> {
": " +
user.patientID
.toString(),
color:
Color(0xFF40ACC9),
color: Color(
0xFF40ACC9),
fontSize: SizeConfig
.textMultiplier *
1.5,
),
AppText(
user.bloodGroup != null
user.bloodGroup !=
null
? 'Blood Group: ' +
user.bloodGroup
: '',
@ -147,7 +154,8 @@ class _AppDrawerState extends State<AppDrawer> {
),
),
),
Column(
Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
InkWell(
@ -172,7 +180,8 @@ class _AppDrawerState extends State<AppDrawer> {
projectProvider.havePrivilege(2)
? InkWell(
child: DrawerItem(
TranslationBase.of(context).family,
TranslationBase.of(context)
.family,
Icons.group,
textColor: Theme.of(context)
.textTheme
@ -207,7 +216,8 @@ class _AppDrawerState extends State<AppDrawer> {
if (snapshot.hasError)
return Padding(
padding: EdgeInsets.all(10),
child: Text(snapshot.error));
child:
Text(snapshot.error));
else
return Container(
decoration: BoxDecoration(
@ -222,9 +232,10 @@ class _AppDrawerState extends State<AppDrawer> {
children: [
user.isFamily == true
? Container(
padding:
EdgeInsets.only(
bottom: 5),
padding: EdgeInsets
.only(
bottom:
5),
child: InkWell(
onTap: () {
switchUser(
@ -238,18 +249,19 @@ class _AppDrawerState extends State<AppDrawer> {
children: <
Widget>[
Expanded(
child: Icon(
Icons
.person),
child:
Icon(Icons.person),
),
Expanded(
flex: 7,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(mainUser.firstName + ' ' + mainUser.lastName),
AppText(TranslationBase.of(context).fileno + ": " + mainUser.patientID.toString()),
flex:
7,
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(),
color: Theme.of(context).textTheme.bodyText1.color,
),
])),
],
)))
@ -259,8 +271,10 @@ class _AppDrawerState extends State<AppDrawer> {
MainAxisAlignment
.start,
mainAxisSize:
MainAxisSize.min,
children: snapshot.data
MainAxisSize
.min,
children: snapshot
.data
.getAllSharedRecordsByStatusList
.map<Widget>(
(result) {
@ -268,24 +282,20 @@ class _AppDrawerState extends State<AppDrawer> {
.status ==
3
? Container(
padding: EdgeInsets
.only(
padding: EdgeInsets.only(
bottom:
5),
child: InkWell(
onTap: () {
switchUser(
result,
switchUser(result,
context);
},
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <
Widget>[
children: <Widget>[
Expanded(
child:
Icon(Icons.person, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
child: Icon(Icons.person, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
),
Expanded(
flex: 7,
@ -313,15 +323,18 @@ class _AppDrawerState extends State<AppDrawer> {
Icons.notifications,
count: notificationCount != null
? new Container(
padding: EdgeInsets.all(4),
padding:
EdgeInsets.all(4),
margin: EdgeInsets.all(2),
decoration: new BoxDecoration(
decoration:
new BoxDecoration(
color: Colors.red,
borderRadius:
BorderRadius.circular(
20),
BorderRadius
.circular(20),
),
constraints: BoxConstraints(
constraints:
BoxConstraints(
minWidth: 20,
minHeight: 20,
),
@ -329,12 +342,14 @@ class _AppDrawerState extends State<AppDrawer> {
notificationCount,
style: new TextStyle(
color: Colors.white,
fontSize: projectProvider
fontSize:
projectProvider
.isArabic
? 8
: 9,
),
textAlign: TextAlign.center,
textAlign:
TextAlign.center,
),
// ),
)
@ -345,8 +360,10 @@ class _AppDrawerState extends State<AppDrawer> {
onTap: () {
//NotificationsPage
Navigator.of(context).pop();
Navigator.push(context,
FadePage(page: NotificationsPage()));
Navigator.push(
context,
FadePage(
page: NotificationsPage()));
},
),
if (projectProvider.havePrivilege(3))
@ -387,7 +404,8 @@ class _AppDrawerState extends State<AppDrawer> {
)
: InkWell(
child: DrawerItem(
TranslationBase.of(context).loginregister,
TranslationBase.of(context)
.loginregister,
Icons.lock_open),
onTap: () {
login();
@ -404,7 +422,7 @@ class _AppDrawerState extends State<AppDrawer> {
// },
// )
],
)
))
],
),
),
@ -417,14 +435,17 @@ class _AppDrawerState extends State<AppDrawer> {
alignment: FractionalOffset.bottomCenter,
child: Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children: [
Column(
children: <Widget>[
Text(TranslationBase.of(context).poweredBy),
Text(TranslationBase.of(context)
.poweredBy),
Image.asset(
'assets/images/cs_logo_container.png',
width: SizeConfig.imageSizeMultiplier * 30,
width:
SizeConfig.imageSizeMultiplier * 30,
)
],
),
@ -432,7 +453,8 @@ class _AppDrawerState extends State<AppDrawer> {
children: <Widget>[
Image.asset(
'assets/images/new-design/vidamobile.png',
width: SizeConfig.imageSizeMultiplier * 25,
width:
SizeConfig.imageSizeMultiplier * 25,
)
],
),
@ -448,7 +470,7 @@ class _AppDrawerState extends State<AppDrawer> {
),
),
),
);
));
}
drawerNavigator(context, routeName) {

Loading…
Cancel
Save