hot fixes

merge-requests/215/merge
Mohammad Aljammal 4 years ago committed by Mohammad Aljammal
parent 51f7833f50
commit 9c18c69d90

@ -1207,4 +1207,8 @@ const Map localizedValues = {
"en": "The request has been submitted successfully", "en": "The request has been submitted successfully",
"ar": "تم تنفيذ طلبك بنجاح" "ar": "تم تنفيذ طلبك بنجاح"
}, },
"pulseTitle": {
"en": "Heart rate",
"ar": "معدل النبض بالدقيقة"
},
}; };

@ -27,6 +27,8 @@ class HospitalService extends BaseService {
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['Latitude'] = _latitude; body['Latitude'] = _latitude;
body['Longitude'] = _longitude; body['Longitude'] = _longitude;
body['IsOnlineCheckIn'] = true;
body['PatientOutSA'] = 0;
await baseAppClient.post(GET_PROJECT, await baseAppClient.post(GET_PROJECT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {

@ -80,6 +80,7 @@ class PharmacyService extends BaseService {
body['PHR_itemName'] = drugName; body['PHR_itemName'] = drugName;
body['isLoginForDoctorApp'] = true; body['isLoginForDoctorApp'] = true;
body['isDentalAllowedBackend'] = true; body['isDentalAllowedBackend'] = true;
body['PageSize'] = 25;
body['Latitude'] = _latitude; body['Latitude'] = _latitude;
body['Longitude'] = _longitude; body['Longitude'] = _longitude;

@ -74,11 +74,10 @@ class MyBalanceViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
//==============
Future getCities() async { Future getCities() async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _bloodDonationService.getAllCitiesOrders(); await _bloodDonationService.getAllCitiesOrders();
// getHospitals();
if (_bloodDonationService.hasError) { if (_bloodDonationService.hasError) {
error = _bloodDonationService.error; error = _bloodDonationService.error;
setState(ViewState.Error); setState(ViewState.Error);
@ -98,7 +97,6 @@ class MyBalanceViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
//===============
Future getPatientInfoByPatientID({String id}) async { Future getPatientInfoByPatientID({String id}) async {
setState(ViewState.Busy); setState(ViewState.Busy);

@ -218,7 +218,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0), borderRadius: BorderRadius.circular(10.0),
), ),
minWidth: MediaQuery.of(context).size.width * 0.7, minWidth: MediaQuery.of(context).size.height * 0.1,
height: 45.0, height: 45.0,
child: RaisedButton( child: RaisedButton(
color: new Color(0xFF60686b), color: new Color(0xFF60686b),

@ -44,7 +44,6 @@ class _InsuranceCardState extends State<InsuranceCard> {
AppScaffold( AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
image: 'assets/images/medical/insurance_card_icon.png',
appBarTitle: TranslationBase.of(context).insuranceCards, appBarTitle: TranslationBase.of(context).insuranceCards,
description: TranslationBase.of(context).infoInsuranceCards, description: TranslationBase.of(context).infoInsuranceCards,
infoList: TranslationBase.of(context).infoInsuranceCardsPoints, infoList: TranslationBase.of(context).infoInsuranceCardsPoints,

@ -102,7 +102,7 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
controller: _tabController, controller: _tabController,
children: <Widget>[ children: <Widget>[
Container( Container(
child: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.isNotEmpty child: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.isNotEmpty?? false
? ListView.builder( ? ListView.builder(
itemCount: model.getAllSharedRecordsByStatusResponse itemCount: model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList.length, .getAllSharedRecordsByStatusList.length,

@ -236,7 +236,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.1, height: MediaQuery.of(context).size.height * 0.13,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
child: SecondaryButton( child: SecondaryButton(

@ -156,11 +156,12 @@ class ConfirmPaymentPage extends StatelessWidget {
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.1, height: MediaQuery.of(context).size.height * 0.13,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
child: SecondaryButton( child: SecondaryButton(
textColor: Colors.white, textColor: Colors.white,
color: Theme.of(context).primaryColor,
label: TranslationBase.of(context).confirm.toUpperCase(), label: TranslationBase.of(context).confirm.toUpperCase(),
disabled: model.state == ViewState.Busy, disabled: model.state == ViewState.Busy,
onTap: () { onTap: () {

@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart'; import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart';
@ -343,7 +344,20 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
), ),
), ),
Expanded( Expanded(
child: Container(), flex: 1,
child: InkWell(
onTap: () {
Navigator.push(context,
FadePage(page: InsuranceUpdate()));
},
child: MedicalProfileItem(
title:
TranslationBase.of(context).updateInsurance,
imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context)
.updateInsuranceSubtitle,
),
),
), ),
Expanded( Expanded(
child: Container(), child: Container(),

@ -105,13 +105,13 @@ class _HomeReportPageState extends State<HomeReportPage>
Container( Container(
width: MediaQuery.of(context).size.width * 0.15, width: MediaQuery.of(context).size.width * 0.15,
child: Center( child: Center(
child: Texts(TranslationBase.of(context).requested,fontSize: 12,), child: Texts(TranslationBase.of(context).requested,fontSize: 11,),
), ),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.15, width: MediaQuery.of(context).size.width * 0.15,
child: Center( child: Center(
child: Texts(TranslationBase.of(context).ready,fontSize: 12,), child: Texts(TranslationBase.of(context).ready,fontSize: 11,),
), ),
), ),
Container( Container(
@ -125,7 +125,7 @@ class _HomeReportPageState extends State<HomeReportPage>
width: MediaQuery.of(context).size.width * 0.15, width: MediaQuery.of(context).size.width * 0.15,
child: Center( child: Center(
child: child:
Texts(TranslationBase.of(context).cancelled,fontSize: 12,), Texts(TranslationBase.of(context).cancelled,fontSize: 11,),
), ),
), ),
], ],

@ -35,11 +35,11 @@ class LineChartCurved extends StatelessWidget {
title, title,
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
fontSize: 32, fontSize: 15,
fontWeight: FontWeight.bold,
letterSpacing: 2), letterSpacing: 2),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
SizedBox(height: 10,),
Expanded( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.only(right: 18.0, left: 16.0), padding: const EdgeInsets.only(right: 18.0, left: 16.0),

@ -0,0 +1,226 @@
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart';
class LineChartCurvedBloodPressure extends StatelessWidget {
final String title;
final List<TimeSeriesSales2> timeSeries1;
final List<TimeSeriesSales2> timeSeries2;
final int indexes;
LineChartCurvedBloodPressure({this.title, this.timeSeries1, this.indexes, this.timeSeries2});
List<int> xAxixs = List();
List<double> yAxixs = List();
@override
Widget build(BuildContext context) {
getXaxix();
return AspectRatio(
aspectRatio: 1.1,
child: Container(
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(18)),
// color: Colors.white,
),
child: Stack(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
const SizedBox(
height: 15,
),
Text(
title,
style: TextStyle(
color: Colors.black,
fontSize: 15,
letterSpacing: 2),
textAlign: TextAlign.center,
),
SizedBox(height: 10,),
Expanded(
child: Padding(
padding: const EdgeInsets.only(right: 18.0, left: 16.0,top: 15),
child: LineChart(
sampleData1(context),
swapAnimationDuration: const Duration(milliseconds: 250),
),
),
),
const SizedBox(
height: 10,
),
],
),
],
),
),
);
}
getXaxix() {
for (int index = 0; index < timeSeries1.length; index++) {
int mIndex = indexes * index;
if (mIndex < timeSeries1.length) {
xAxixs.add(mIndex);
}
}
}
LineChartData sampleData1(context) {
return LineChartData(
lineTouchData: LineTouchData(
touchTooltipData: LineTouchTooltipData(
tooltipBgColor: Colors.white,
),
touchCallback: (LineTouchResponse touchResponse) {},
handleBuiltInTouches: true,
),
gridData: FlGridData(
show: true, drawVerticalLine: true, drawHorizontalLine: true),
titlesData: FlTitlesData(
bottomTitles: SideTitles(
showTitles: true,
getTextStyles: (value) => const TextStyle(
color: Colors.black,
fontSize: 10,
),
rotateAngle:-65,
//rotateAngle:-65,
margin: 22,
getTitles: (value) {
if (timeSeries1.length < 15) {
if (timeSeries1.length > value.toInt()) {
return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}';
} else
return '';
} else {
if (value.toInt() == 0)
return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}';
if (value.toInt() == timeSeries1.length - 1)
return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}';
if (xAxixs.contains(value.toInt())) {
return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}';
}
}
return '';
},
),
leftTitles: SideTitles(
showTitles: true,
getTextStyles: (value) => const TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 10,
),
getTitles: (value) {
return '${value.toInt()}';
},
margin: 12,
),
),
borderData: FlBorderData(
show: true,
border: const Border(
bottom: BorderSide(
color: Colors.black,
width: 0.5,
),
left: BorderSide(
color: Colors.black,
),
right: BorderSide(
color: Colors.black,
),
top: BorderSide(
color: Colors.transparent,
),
),
),
minX: 0,
maxX: (timeSeries1.length - 1).toDouble(),
maxY: getMaxY()+0.3,
minY: getMinY(),
lineBarsData: getData(context),
);
}
double getMaxY() {
double max = 0;
timeSeries1.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble > max) max = resultValueDouble;
});
timeSeries2.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble > max) max = resultValueDouble;
});
return max.roundToDouble() ;
}
double getMinY() {
double min = timeSeries1[0].sales;
timeSeries1.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble < min) min = resultValueDouble;
});
timeSeries2.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble < min) min = resultValueDouble;
});
int value = min.toInt();
return value.toDouble();
}
List<LineChartBarData> getData(context) {
List<FlSpot> spots = List();
for (int index = 0; index < timeSeries1.length; index++) {
spots.add(FlSpot(index.toDouble(), timeSeries1[index].sales));
}
List<FlSpot> spots2 = List();
for (int index = 0; index < timeSeries2.length; index++) {
spots2.add(FlSpot(index.toDouble(), timeSeries2[index].sales));
}
final LineChartBarData lineChartBarData1 = LineChartBarData(
spots: spots,
isCurved: true,
colors: [Theme.of(context).primaryColor],
barWidth: 5,
isStrokeCapRound: true,
dotData: FlDotData(
show: false,
),
belowBarData: BarAreaData(
show: false,
),
);
final LineChartBarData lineChartBarData2 = LineChartBarData(
spots: spots2,
isCurved: true,
colors: [Colors.grey],
barWidth: 5,
isStrokeCapRound: true,
dotData: FlDotData(
show: false,
),
belowBarData: BarAreaData(
show: false,
),
);
return [
lineChartBarData1,
lineChartBarData2
];
}
}

@ -0,0 +1,146 @@
import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class VitalSignBloodPressureWidget extends StatefulWidget {
final List<VitalSignResModel> vitalList;
final String title1;
final String title2;
final String title3;
final String viewKey1;
final String viewKey2;
VitalSignBloodPressureWidget(
{Key key, this.vitalList, this.title1, this.title2, this.viewKey1, this.title3, this.viewKey2});
@override
_VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState();
}
class _VitalSignDetailsWidgetState extends State<VitalSignBloodPressureWidget> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)),
border: Border.all(color: Colors.grey, width: 1),
),
margin: EdgeInsets.all(20),
child: Container(
color: Colors.transparent,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
),
children: fullData(projectViewModel),
),
],
),
),
);
}
List<TableRow> fullData(ProjectViewModel projectViewModel) {
List<TableRow> tableRow = [];
tableRow.add(TableRow(children: [
Container(
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0)
),
),
child: Center(
child: Texts(
TranslationBase.of(context).date,
color: Colors.white,
),
),
height: 60,
),
),
Container(
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
),
child: Center(
child: Texts(widget.title2, color: Colors.white),
),
height: 60),
),
Container(
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0)
),
),
child: Center(
child: Texts(widget.title3, color: Colors.white),
),
height: 60),
),
]));
widget.vitalList.forEach((vital) {
var data = vital.toJson()[widget.viewKey1];
if (data != 0)
tableRow.add(TableRow(children: [
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
'${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(vital.vitalSignDate.weekday) : DateUtil.getWeekDay(vital.vitalSignDate.weekday)}, ${vital.vitalSignDate.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(vital.vitalSignDate.month) : DateUtil.getMonth(vital.vitalSignDate.month)}, ${vital.vitalSignDate.year} ',
textAlign: TextAlign.center,
),
),
),
),
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
'${vital.toJson()[widget.viewKey1]}',
textAlign: TextAlign.center,
),
),
),
),
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
'${vital.toJson()[widget.viewKey2]}',
textAlign: TextAlign.center,
),
),
),
),
]));
});
return tableRow;
}
}

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/enum/patient_lookup.dart';
import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart'; import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sing_chart_and_detials.dart'; import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sing_chart_and_detials.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sing_chart_blood_pressure.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -38,7 +39,7 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
'viewKey': 'WeightKg', 'viewKey': 'WeightKg',
}, },
{ {
'name': 'Body Mass Index', 'name': 'Body Mass ',
'nameAr': 'مؤشر كتلة الجسم', 'nameAr': 'مؤشر كتلة الجسم',
'title1': 'Date', 'title1': 'Date',
'title2': 'BodyMass', 'title2': 'BodyMass',
@ -115,21 +116,16 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
case VitalSignDetails.BloodPressure: case VitalSignDetails.BloodPressure:
VSchart = [ VSchart = [
{ {
'name': 'Blood Pressure Higher', 'name': 'Blood Pressure Systolic Diastolic',
'nameAr': 'ضغط الدم الإنقباض', 'nameAr': 'ضغط الدم الإنقباض الإنبساط',
'title1': 'Date', 'title1': 'Date',
'title2': 'Minute', 'title2': 'systolic',
'title3': 'Diastolic',
'title2Ar': 'الإنقباض', 'title2Ar': 'الإنقباض',
'viewKey': 'BloodPressureHigher', 'title3Ar': 'الإنبساط',
'viewKey': 'BloodPressure',
}, },
{
'name': 'Blood Pressure Lower',
'nameAr': 'ضغط الدم الإنبساط',
'title1': 'Date',
'title2': 'Minute',
'title2Ar': 'الإنبساط',
'viewKey': 'BloodPressureLower',
}
]; ];
break; break;
@ -149,7 +145,7 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
case VitalSignDetails.heart: case VitalSignDetails.heart:
VSchart = [ VSchart = [
{ {
'name': 'FIO2', 'name': 'Heart rate',
'nameAr': 'معدل النبض بالدقيقة', 'nameAr': 'معدل النبض بالدقيقة',
'title1': 'Date', 'title1': 'Date',
'title2': 'bpm', 'title2': 'bpm',
@ -209,6 +205,20 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
var vitalListTemp = vitalList.where( var vitalListTemp = vitalList.where(
(element) => element.toJson()[chartInfo['viewKey']] != null, (element) => element.toJson()[chartInfo['viewKey']] != null,
); );
if(vitalListTemp.length != 0 && chartInfo['viewKey']=='BloodPressure'){
return VitalSingChartBloodPressure(
vitalList: vitalList,
name:projectViewModel.isArabic? chartInfo['nameAr']:chartInfo['name'],
title1: chartInfo['title1'],
title2:projectViewModel.isArabic?chartInfo['title2Ar']: chartInfo['title2'],
title3:projectViewModel.isArabic?chartInfo['title3Ar']: chartInfo['title3'],
viewKey1: 'BloodPressureHigher',
viewKey2: 'BloodPressureLower',
);
}
return vitalListTemp.length != 0 return vitalListTemp.length != 0
? VitalSingChartAndDetials( ? VitalSingChartAndDetials(
vitalList: vitalList, vitalList: vitalList,

@ -46,7 +46,7 @@ class VitalSingChartAndDetials extends StatelessWidget {
generateData() { generateData() {
if (vitalList.length > 0) { if (vitalList.length > 0) {
vitalList.forEach( vitalList.reversed.toList().forEach(
(element) { (element) {
if( element.toJson()[viewKey]?.toInt()!=0) if( element.toJson()[viewKey]?.toInt()!=0)
timeSeriesData.add( timeSeriesData.add(

@ -0,0 +1,87 @@
import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_blood_pressurewideget.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_wideget.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:flutter/material.dart';
import 'package:charts_flutter/flutter.dart' as charts;
import 'LineChartCurved.dart';
import 'LineChartCurvedBloodPressure.dart';
class VitalSingChartBloodPressure extends StatelessWidget {
VitalSingChartBloodPressure({
Key key,
@required this.vitalList,
@required this.name,
@required this.viewKey1,
@required this.viewKey2,
@required this.title1,
@required this.title2,
@required this.title3,
}) : super(key: key);
final List<VitalSignResModel> vitalList;
final String name;
final String viewKey1;
final String viewKey2;
final String title1;
final String title2;
final String title3;
List<TimeSeriesSales2> timeSeriesData1 = [];
List<TimeSeriesSales2> timeSeriesData2 = [];
@override
Widget build(BuildContext context) {
generateData();
return Column(
children: <Widget>[
AppExpandableNotifier(
isExpand: true,
headerWidget: LineChartCurvedBloodPressure(
title: name,
timeSeries1: timeSeriesData1,
timeSeries2: timeSeriesData2,
indexes: timeSeriesData1.length ~/ 5.5,
),
bodyWidget: VitalSignBloodPressureWidget(
vitalList: vitalList,
title1: title1,
title2: title2,
title3: title3,
viewKey1: viewKey1,
viewKey2: viewKey2,
),
),
],
);
}
generateData() {
if (vitalList.length > 0) {
vitalList.reversed.toList().forEach(
(element) {
if (element.toJson()[viewKey1]?.toInt() != 0)
timeSeriesData1.add(
TimeSeriesSales2(
new DateTime(element.vitalSignDate.year,
element.vitalSignDate.month, element.vitalSignDate.day),
element.toJson()[viewKey1].toDouble(),
),
);
if (element.toJson()[viewKey2]?.toInt() != 0)
timeSeriesData2.add(
TimeSeriesSales2(
new DateTime(element.vitalSignDate.year,
element.vitalSignDate.month, element.vitalSignDate.day),
element.toJson()[viewKey2].toDouble(),
),
);
var asd="";
},
);
}
}
}

@ -1052,6 +1052,7 @@ class TranslationBase {
String get requestReport => localizedValues['requestReport'][locale.languageCode]; String get requestReport => localizedValues['requestReport'][locale.languageCode];
String get confirmMsgReport => localizedValues['confirm-msg-report'][locale.languageCode]; String get confirmMsgReport => localizedValues['confirm-msg-report'][locale.languageCode];
String get successSendReport => localizedValues['successSendReport'][locale.languageCode]; String get successSendReport => localizedValues['successSendReport'][locale.languageCode];
String get pulseTitle => localizedValues['pulseTitle'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -31,7 +31,7 @@ class LabResultChartAndDetails extends StatelessWidget {
child: LineChartCurved(title: name,labResult:labResult,), child: LineChartCurved(title: name,labResult:labResult,),
), ),
bodyWidget: LabResultDetailsWidget( bodyWidget: LabResultDetailsWidget(
labResult: labResult, labResult: labResult.reversed.toList(),
), ),
isExpand: true, isExpand: true,
), ),

@ -41,6 +41,7 @@ class _ConfirmSendEmailDialogState extends State<ConfirmSendEmailDialog> {
Center( Center(
child: Texts( child: Texts(
TranslationBase.of(context).sendConfEmail, TranslationBase.of(context).sendConfEmail,
fontSize: 14,
color: Colors.grey, color: Colors.grey,
), ),
), ),

@ -550,7 +550,6 @@ class _AppDrawerState extends State<AppDrawer> {
.silentLoggin(user is AuthenticatedUser ? null : user, .silentLoggin(user is AuthenticatedUser ? null : user,
mainUser: user is AuthenticatedUser) mainUser: user is AuthenticatedUser)
.then((value) async { .then((value) async {
await authenticatedUserObject.getUser();
_vitalSignService.heightCm = ""; _vitalSignService.heightCm = "";
_vitalSignService.weightKg = ""; _vitalSignService.weightKg = "";
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -579,7 +578,7 @@ class _AppDrawerState extends State<AppDrawer> {
this.sharedPref.setObject(FAMILY_FILE, familyFile); this.sharedPref.setObject(FAMILY_FILE, familyFile);
this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID); this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID);
this.sharedPref.setString(TOKEN, result.authenticationTokenID); this.sharedPref.setString(TOKEN, result.authenticationTokenID);
//this.checkIfUserAgreedBefore(result), await authenticatedUserObject.getUser(getUser: true);
appointmentRateViewModel appointmentRateViewModel
.getIsLastAppointmentRatedList() .getIsLastAppointmentRatedList()
.then((value) => { .then((value) => {

@ -1,31 +1,20 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_loader_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:diplomaticquarterapp/widgets/robo-search/robosearch.dart';
import 'package:diplomaticquarterapp/widgets/robo-search/search.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../locator.dart'; import '../../locator.dart';
import 'floating_button_search.dart';
import '../progress_indicator/app_loader_widget.dart';
import 'arrow_back.dart'; import 'arrow_back.dart';
import 'network_base_view.dart'; import 'network_base_view.dart';
import 'not_auh_page.dart'; import 'not_auh_page.dart';
// ignore: must_be_immutable
class AppScaffold extends StatelessWidget { class AppScaffold extends StatelessWidget {
final String appBarTitle; final String appBarTitle;
final Widget body; final Widget body;
@ -38,7 +27,6 @@ class AppScaffold extends StatelessWidget {
final Widget floatingActionButton; final Widget floatingActionButton;
final String title; final String title;
final String description; final String description;
final String image;
final bool isShowDecPage; final bool isShowDecPage;
final List<String> infoList; final List<String> infoList;
final List<ImagesInfo> imagesInfo; final List<ImagesInfo> imagesInfo;
@ -58,7 +46,6 @@ class AppScaffold extends StatelessWidget {
this.description, this.description,
this.isShowDecPage = true, this.isShowDecPage = true,
this.isBottomBar, this.isBottomBar,
this.image,
this.infoList, this.infoList,
this.imagesInfo}); this.imagesInfo});
@ -93,32 +80,13 @@ class AppScaffold extends StatelessWidget {
), ),
centerTitle: true, centerTitle: true,
actions: <Widget>[ actions: <Widget>[
image != null IconButton(
? InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: InsuranceUpdate(),
),
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Image.asset(
image,
height: SizeConfig.heightMultiplier * 5,
width: SizeConfig.heightMultiplier * 5,
color: Colors.white,
),
),
)
: IconButton(
icon: Icon(FontAwesomeIcons.home), icon: Icon(FontAwesomeIcons.home),
color: Colors.white, color: Colors.white,
onPressed: () { onPressed: () {
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
context, context,
MaterialPageRoute( MaterialPageRoute(builder: (context) => LandingPage()),
builder: (context) => LandingPage()),
(Route<dynamic> r) => false); (Route<dynamic> r) => false);
}, },
), ),
@ -128,37 +96,22 @@ class AppScaffold extends StatelessWidget {
body: (!Provider.of<ProjectViewModel>(context, listen: false).isLogin && body: (!Provider.of<ProjectViewModel>(context, listen: false).isLogin &&
isShowDecPage) isShowDecPage)
? NotAutPage( ? NotAutPage(
title: appBarTitle, title: title?? appBarTitle,
description: description, description: description,
infoList: infoList, infoList: infoList,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
) )
: baseViewModel != null : baseViewModel != null
? NetworkBaseView( ? NetworkBaseView(
child: buildBodyWidget(), child: body,
baseViewModel: baseViewModel, baseViewModel: baseViewModel,
) )
: buildBodyWidget(), : body,
bottomSheet: bottomSheet:
(Provider.of<ProjectViewModel>(context, listen: false).isLogin || (Provider.of<ProjectViewModel>(context, listen: false).isLogin ||
!isShowDecPage) !isShowDecPage)
? bottomSheet ? bottomSheet
: null, : null,
//floatingActionButton: floatingActionButton ?? floatingActionButton,
// bottomNavigationBar:
// this.isBottomBar == true ? BottomBarSearch() : SizedBox()
// floatingActionButton: FloatingSearchButton(),
); );
} }
buildAppLoaderWidget(bool isLoading) {
return isLoading ? AppLoaderWidget() : Container();
}
buildBodyWidget() {
// return body; //Stack(children: <Widget>[body, buildAppLoaderWidget(isLoading)]);
return Stack(children: <Widget>[
body, /*FloatingSearchButton()*/
]);
}
} }

Loading…
Cancel
Save