diff --git a/assets/images/new/ic_zoom.svg b/assets/images/new/ic_zoom.svg
new file mode 100644
index 00000000..f7449eeb
--- /dev/null
+++ b/assets/images/new/ic_zoom.svg
@@ -0,0 +1,53 @@
+
+
+
+
diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart
index 4320eb21..32aaa898 100644
--- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart
+++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart
@@ -14,6 +14,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/photo_view_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
+import 'package:flutter_svg/svg.dart';
import 'package:provider/provider.dart';
import 'new_cmc_step_tow_page.dart';
@@ -124,10 +125,8 @@ class _NewCMCStepOnePageState extends State {
),
margin: EdgeInsets.all(12),
child: IconButton(
- icon: Icon(
- Icons.view_carousel_rounded,
- color: Colors.white,
- ),
+ icon: SvgPicture.asset("assets/images/new/ic_zoom.svg",color: Colors.white,),
+ padding: EdgeInsets.all(12),
onPressed: () {
showDraggableDialog(context, PhotoViewPage(projectViewModel.isArabic ? "assets/images/cc_ar.png" : "assets/images/cc_en.png"));
},
diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart
index e07b7d70..540f0e7f 100644
--- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart
+++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart
@@ -178,7 +178,7 @@ class _NewHomeHealthCareStepThreePageState extends State Utils.route(route, equalsTo: HomeHealthCarePage));
Navigator.push(context, FadePage(page: HomeHealthCarePage()));
},
);
diff --git a/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart b/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart
index 458d9ec2..97953978 100644
--- a/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart
+++ b/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart
@@ -145,6 +145,7 @@ class CovidDirveThruQuestionsState extends State {
itemBuilder: (ctx, idx) {
var obj = qa[idx];
var qtext = isArabic ? obj["questionAR"] : obj["questionEN"];
+ print("dddddddddddddd " + obj["ans"].toString());
return Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
@@ -170,6 +171,7 @@ class CovidDirveThruQuestionsState extends State {
onChanged: (newValue) {
setState(() {
obj["ans"] = newValue;
+ checkAllChecked();
});
}),
Text(
@@ -192,6 +194,7 @@ class CovidDirveThruQuestionsState extends State {
onChanged: (newValue) {
setState(() {
obj["ans"] = newValue;
+ checkAllChecked();
});
}),
Text(
@@ -228,7 +231,7 @@ class CovidDirveThruQuestionsState extends State {
child: MaterialButton(
height: 50,
elevation: 0,
- color: CustomColors.accentColor,
+ color: all2 ? CustomColors.accentColor : CustomColors.grey,
disabledColor: Theme.of(context).appBarTheme.color.withOpacity(0.25),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
child: Text(
@@ -249,6 +252,17 @@ class CovidDirveThruQuestionsState extends State {
));
}
+ bool all2 = false;
+
+ checkAllChecked() {
+ all2 = true;
+ qa.forEach((element) {
+ if (element["ans"] == 2 || element["ans"] == null) {
+ all2 = false;
+ }
+ });
+ }
+
next() async {
bool all = true;
qa.forEach((element) {
diff --git a/lib/pages/Covid-DriveThru/covid-payment-details.dart b/lib/pages/Covid-DriveThru/covid-payment-details.dart
index 29a269af..81ba1285 100644
--- a/lib/pages/Covid-DriveThru/covid-payment-details.dart
+++ b/lib/pages/Covid-DriveThru/covid-payment-details.dart
@@ -117,6 +117,7 @@ class _CovidPaymentDetailsState extends State {
onTap: () {
setState(() {
widget.selectedProcedure = widget.proceduresList[index];
+ getPaymentInfo(context, widget.projectID.toString(), widget.selectedProcedure.procedureID);
});
},
child: ListTile(
diff --git a/lib/pages/Covid-DriveThru/covid-payment-summary.dart b/lib/pages/Covid-DriveThru/covid-payment-summary.dart
index 62eb6942..c47c8d36 100644
--- a/lib/pages/Covid-DriveThru/covid-payment-summary.dart
+++ b/lib/pages/Covid-DriveThru/covid-payment-summary.dart
@@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.da
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/QRCode.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
+import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
@@ -251,7 +252,16 @@ class _CovidPaymentSummaryState extends State {
onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) {
print("onBrowserExit Called!!!!");
- if (isPaymentMade) checkPaymentStatus(appo);
+ if (isPaymentMade) {
+ checkPaymentStatus(appo);
+ } else {
+ print("onBrowserExit Payment Not made");
+ Navigator.pushAndRemoveUntil(
+ context,
+ MaterialPageRoute(builder: (context) => LandingPage()),
+ (Route route) => false,
+ );
+ }
}
checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
diff --git a/lib/pages/ErService/rapid-response-team/rrt-place-order.dart b/lib/pages/ErService/rapid-response-team/rrt-place-order.dart
index 41b4b2fe..262ef1b6 100644
--- a/lib/pages/ErService/rapid-response-team/rrt-place-order.dart
+++ b/lib/pages/ErService/rapid-response-team/rrt-place-order.dart
@@ -208,5 +208,6 @@ class RRTPlaceOrderPage extends StatelessWidget {
gotoRRTRoot() {
Navigator.popUntil(_context, (route) => Utils.route(route, equalsTo: RRTMainScreen));
+ Navigator.push(_context, FadePage(page: RRTMainScreen()));
}
}
diff --git a/lib/pages/landing/widgets/logged_slider_view.dart b/lib/pages/landing/widgets/logged_slider_view.dart
index a73b4531..a239e789 100644
--- a/lib/pages/landing/widgets/logged_slider_view.dart
+++ b/lib/pages/landing/widgets/logged_slider_view.dart
@@ -137,19 +137,20 @@ class LoggedSliderView extends StatelessWidget {
padding: const EdgeInsets.only(left: 20, right: 20),
child: Row(
children: [
- Expanded( flex: 3,
+ Expanded(
+ flex: 3,
child: Row(
children: [
SvgPicture.asset(
'assets/images/new/height.svg',
- width: 12,
- height: 12,
+ width: 11,
+ height: 11,
),
mWidth(6),
Texts(
"${TranslationBase.of(context).height}: ${model.heightCm} ${TranslationBase.of(context).cm}",
color: Colors.white,
- fontSize: 10,
+ fontSize: 8,
)
],
),
@@ -157,16 +158,21 @@ class LoggedSliderView extends StatelessWidget {
SizedBox(
width: 3,
),
- Expanded( flex: 3,
+ Expanded(
+ flex: 3,
child: Row(
children: [
SvgPicture.asset(
'assets/images/new/weight.svg',
- width: 12,
- height: 12,
+ width: 11,
+ height: 11,
),
mWidth(6),
- Texts('${TranslationBase.of(context).weight}: ${model.weightKg} ${TranslationBase.of(context).kg}', color: Colors.white, fontSize: 10)
+ Texts(
+ '${TranslationBase.of(context).weight}: ${model.weightKg} ${TranslationBase.of(context).kg}',
+ color: Colors.white,
+ fontSize: 8,
+ )
],
),
),
@@ -179,11 +185,15 @@ class LoggedSliderView extends StatelessWidget {
children: [
SvgPicture.asset(
'assets/images/new/blood.svg',
- width: 12,
- height: 12,
+ width: 11,
+ height: 11,
),
mWidth(6),
- Texts('${TranslationBase.of(context).bloodType1} ${model.booldType}', color: Colors.white, fontSize: 10)
+ Texts(
+ '${TranslationBase.of(context).bloodType1} ${model.booldType}',
+ color: Colors.white,
+ fontSize: 8,
+ )
],
),
),
diff --git a/lib/pages/medical/my_trackers/Weight/WeightHomePage.dart b/lib/pages/medical/my_trackers/Weight/WeightHomePage.dart
index 1f1dda1c..d7dcafa7 100644
--- a/lib/pages/medical/my_trackers/Weight/WeightHomePage.dart
+++ b/lib/pages/medical/my_trackers/Weight/WeightHomePage.dart
@@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/TabBarWidget.dart';
+import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@@ -49,6 +50,7 @@ class _WeightHomePageState extends State with SingleTickerProvid
showNewAppBar: true,
showNewAppBarTitle: true,
appBarTitle: TranslationBase.of(context).weight,
+ backgroundColor: CustomColors.appBackgroudGrey2Color,
appBarIcons: [
IconButton(
icon: Icon(Icons.email),
@@ -106,35 +108,22 @@ class _WeightHomePageState extends State with SingleTickerProvid
)
],
),
- floatingActionButton: Stack(
- children: [
- Positioned(
- bottom: 80,
- right: projectViewModel.isArabic ? MediaQuery.of(context).size.width * .85 : 0,
- child: InkWell(
- onTap: () {
- Navigator.push(
- context,
- FadePage(
- page: AddWeightPage(
- model: model,
- )));
- },
- child: Container(
- width: 55,
- height: 55,
- decoration: BoxDecoration(
- shape: BoxShape.circle,
- color: Theme.of(context).primaryColor,
- ),
- child: Center(
- child: Icon(
- Icons.add,
- color: Colors.white,
- ),
- ),
- )))
- ],
+ floatingActionButton: FloatingActionButton(
+ child: Icon(
+ Icons.add,
+ color: Colors.white,
+ ),
+ backgroundColor: CustomColors.accentColor,
+ onPressed: () {
+ Navigator.push(
+ context,
+ FadePage(
+ page: AddWeightPage(
+ model: model,
+ ),
+ ),
+ );
+ },
),
),
),
diff --git a/lib/pages/medical/my_trackers/Weight/WeightMonthlyPage.dart b/lib/pages/medical/my_trackers/Weight/WeightMonthlyPage.dart
index 5088d572..05485adf 100644
--- a/lib/pages/medical/my_trackers/Weight/WeightMonthlyPage.dart
+++ b/lib/pages/medical/my_trackers/Weight/WeightMonthlyPage.dart
@@ -2,9 +2,11 @@ import "package:collection/collection.dart";
import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/MonthLineChartCurved.dart';
+import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
+import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@@ -20,62 +22,74 @@ class WeightMonthlyPage extends StatelessWidget {
this.model,
}) : super(key: key);
List monthlyGroup = [];
+
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
groupData();
return AppScaffold(
isShowDecPage: false,
+ backgroundColor: CustomColors.appBackgroudGrey2Color,
body: ListView(
children: [
- Container(
- width: double.maxFinite,
- color: Colors.white,
- child: MonthLineChartCurved(
- horizontalInterval: 1.0,
- title: TranslationBase.of(context).weight,
- timeSeries: model.weighMonthTimeSeriesData.isEmpty ? [TimeSeriesSales3(0, 0.0)] : model.weighMonthTimeSeriesData,
- indexes: model.weighMonthTimeSeriesData.length ~/ 5.5,
- )),
- SizedBox(
- height: 12,
- ),
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: Texts(TranslationBase.of(context).details),
+ Card(
+ shape: cardRadius(12),
+ elevation: 1,
+ margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8),
+ child: MonthLineChartCurved(
+ horizontalInterval: 1.0,
+ title: TranslationBase.of(context).weight,
+ timeSeries: model.weighMonthTimeSeriesData.isEmpty ? [TimeSeriesSales3(0, 0.0)] : model.weighMonthTimeSeriesData,
+ indexes: model.weighMonthTimeSeriesData.length ~/ 5.5,
+ ),
),
- Container(
- padding: EdgeInsets.all(10),
- color: Colors.transparent,
+ Card(
+ shape: cardRadius(12),
+ elevation: 1,
+ margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- model.weighMonthTimeSeriesData.isEmpty
- ? Container(
- child: Center(
- child: Texts(TranslationBase.of(context).noDataAvailable),
- ),
- )
- : Column(children: [
- for (var monthly in monthlyGroup)
- Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
- Container(
- width: double.maxFinite,
- padding: EdgeInsets.only(top: 10, bottom: 10, left: 5, right: 5),
- decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(5)),
- child: Texts(monthly[0])),
- Table(
- columnWidths: {
- 0: FlexColumnWidth(2.5),
- // 2: FlexColumnWidth(1.8),
- },
- children: fullData(context, projectViewModel, monthly[1]),
+ children: [
+ Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Texts(TranslationBase.of(context).details),
+ ),
+ Container(
+ padding: EdgeInsets.all(10),
+ color: Colors.transparent,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ model.weighMonthTimeSeriesData.isEmpty
+ ? Container(
+ child: Center(
+ child: Texts(TranslationBase.of(context).noDataAvailable),
+ ),
)
- ])
- ])
+ : Column(children: [
+ for (var monthly in monthlyGroup)
+ Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
+ Container(
+ width: double.maxFinite,
+ padding: EdgeInsets.only(top: 10, bottom: 10, left: 5, right: 5),
+ decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(5)),
+ child: Texts(monthly[0])),
+ Table(
+ columnWidths: {
+ 0: FlexColumnWidth(2.5),
+ // 2: FlexColumnWidth(1.8),
+ },
+ children: fullData(context, projectViewModel, monthly[1]),
+ )
+ ])
+ ])
+ ],
+ ),
+ )
],
),
- )
+ ),
+ mHeight(80),
],
),
);
diff --git a/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart b/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart
index 8d82b13c..2f3f7d0a 100644
--- a/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart
+++ b/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart
@@ -1,9 +1,11 @@
import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/LineChartCurved.dart';
+import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
+import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@@ -25,46 +27,64 @@ class WeightWeeklyPage extends StatelessWidget {
return AppScaffold(
isShowDecPage: false,
+ backgroundColor: CustomColors.appBackgroudGrey2Color,
body: ListView(
children: [
- Container(
- margin: EdgeInsets.only(top: 12, left: 8, right: 8),
- color: Colors.white,
+ // Container(
+ // margin: EdgeInsets.only(top: 12, left: 8, right: 8),
+ // color: Colors.white,
+ // child: LineChartCurved(
+ // horizontalInterval: 1.0,
+ // title: TranslationBase.of(context).weight,
+ // timeSeries: model.weightWeekTimeSeriesData.isEmpty ? [TimeSeriesSales2(DateTime.now(), 0.0)] : model.weightWeekTimeSeriesData,
+ // indexes: model.weightWeekTimeSeriesData.length ~/ 5.5 ?? 0,
+ // ),
+ // ),
+ Card(
+ shape: cardRadius(12),
+ elevation: 1,
+ margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8),
child: LineChartCurved(
- horizontalInterval: 1.0,
title: TranslationBase.of(context).weight,
timeSeries: model.weightWeekTimeSeriesData.isEmpty ? [TimeSeriesSales2(DateTime.now(), 0.0)] : model.weightWeekTimeSeriesData,
indexes: model.weightWeekTimeSeriesData.length ~/ 5.5 ?? 0,
),
),
- SizedBox(
- height: 12,
- ),
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: Texts(TranslationBase.of(context).details),
- ),
- Container(
- padding: EdgeInsets.all(10),
- color: Colors.transparent,
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- model.weightWeekTimeSeriesData.isEmpty
- ? Container(
- child: Center(
- child: Texts(TranslationBase.of(context).noDataAvailable),
- ),
- )
- : Table(
- columnWidths: {
- 0: FlexColumnWidth(2.5),
- },
- children: fullData(context, projectViewModel, model),
- ),
+ Card(
+ shape: cardRadius(12),
+ elevation: 1,
+ margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8),
+ child: Column(crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Texts(TranslationBase.of(context).details),
+ ),
+ Container(
+ padding: EdgeInsets.all(10),
+ color: Colors.transparent,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ model.weightWeekTimeSeriesData.isEmpty
+ ? Container(
+ child: Center(
+ child: Texts(TranslationBase.of(context).noDataAvailable),
+ ),
+ )
+ : Table(
+ columnWidths: {
+ 0: FlexColumnWidth(2.5),
+ },
+ children: fullData(context, projectViewModel, model),
+ ),
+ ],
+ ),
+ )
],
),
- )
+ ),
+ mHeight(80),
],
),
);
diff --git a/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart b/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart
index 9c2414eb..843e438b 100644
--- a/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart
+++ b/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart
@@ -2,9 +2,11 @@ import "package:collection/collection.dart";
import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/LineChartCurved.dart';
+import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
+import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@@ -26,55 +28,63 @@ class WeightYearPage extends StatelessWidget {
groupData();
return AppScaffold(
isShowDecPage: false,
+ backgroundColor: CustomColors.appBackgroudGrey2Color,
body: ListView(
children: [
- Container(
- width: double.maxFinite,
- color: Colors.white,
+ Card(
+ shape: cardRadius(12),
+ elevation: 1,
+ margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8),
child: LineChartCurved(
horizontalInterval: 2.0,
title: TranslationBase.of(context).weight,
timeSeries: model.weightYearTimeSeriesData.isEmpty ? [TimeSeriesSales2(DateTime.now(), 0.0)] : model.weightYearTimeSeriesData,
indexes: model.weightYearTimeSeriesData.length ~/ 5.5 ?? "",
)),
- SizedBox(
- height: 12,
- ),
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: Texts(TranslationBase.of(context).details),
- ),
- Container(
- padding: EdgeInsets.all(10),
- color: Colors.transparent,
+
+ Card(
+ shape: cardRadius(12),
+ elevation: 1,
+ margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8),
child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- model.weightYearTimeSeriesData.isEmpty
- ? Container(
- child: Center(
- child: Texts(TranslationBase.of(context).noDataAvailable),
- ),
- )
- : Column(children: [
- for (var monthly in monthlyGroup)
- Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
- Container(
- width: double.maxFinite,
- padding: EdgeInsets.only(top: 10, bottom: 10, left: 5, right: 5),
- decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(5)),
- child: Texts(monthly[0])),
- Table(
- columnWidths: {
- 0: FlexColumnWidth(2.5),
- },
- children: fullData(context, projectViewModel, monthly[1]),
- )
- ])
- ]),
- ],
+ crossAxisAlignment: CrossAxisAlignment.start,children: [ Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Texts(TranslationBase.of(context).details),
),
- )
+ Container(
+ padding: EdgeInsets.all(10),
+ color: Colors.transparent,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ model.weightYearTimeSeriesData.isEmpty
+ ? Container(
+ child: Center(
+ child: Texts(TranslationBase.of(context).noDataAvailable),
+ ),
+ )
+ : Column(children: [
+ for (var monthly in monthlyGroup)
+ Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
+ Container(
+ width: double.maxFinite,
+ padding: EdgeInsets.only(top: 10, bottom: 10, left: 5, right: 5),
+ decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(5)),
+ child: Texts(monthly[0])),
+ Table(
+ columnWidths: {
+ 0: FlexColumnWidth(2.5),
+ },
+ children: fullData(context, projectViewModel, monthly[1]),
+ )
+ ])
+ ]),
+ ],
+ ),
+ )],
+ ),
+ ),
+ mHeight(80),
],
),
);
diff --git a/lib/pages/medical/my_trackers/widget/LineChartCurved.dart b/lib/pages/medical/my_trackers/widget/LineChartCurved.dart
index 2597f17c..47a5d490 100644
--- a/lib/pages/medical/my_trackers/widget/LineChartCurved.dart
+++ b/lib/pages/medical/my_trackers/widget/LineChartCurved.dart
@@ -36,7 +36,7 @@ class LineChartCurved extends StatelessWidget {
),
Text(
title,
- style: TextStyle(color: Colors.black, fontSize: 15, letterSpacing: 2),
+ style: TextStyle(color: Colors.black, fontSize: 16, letterSpacing: -0.64, fontWeight: FontWeight.w600),
textAlign: TextAlign.center,
),
SizedBox(
@@ -44,7 +44,7 @@ class LineChartCurved extends StatelessWidget {
),
Expanded(
child: Padding(
- padding: const EdgeInsets.only(right: 18.0, left: 16.0, top: 15, bottom: 15),
+ padding: const EdgeInsets.only(right: 18.0, left: 16.0),
child: LineChart(
sampleData1(context),
swapAnimationDuration: const Duration(milliseconds: 250),
@@ -80,6 +80,83 @@ class LineChartCurved extends StatelessWidget {
}
}
}
+
+ // 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, horizontalInterval: 14, verticalInterval: 14),
+ // titlesData: FlTitlesData(
+ // bottomTitles: SideTitles(
+ // showTitles: true,
+ // getTextStyles: (value) => const TextStyle(
+ // color: Colors.black,
+ // fontSize: 10,
+ // ),
+ // // rotateAngle: 90,
+ // //rotateAngle:-65,
+ // margin: 22,
+ // getTitles: (value) {
+ // if (timeSeries.length < 15) {
+ // if (timeSeries.length > value.toInt()) {
+ // return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
+ // } else
+ // return '';
+ // } else {
+ // if (value.toInt() == 0) return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
+ // if (value.toInt() == timeSeries.length - 1) return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
+ // if (xAxixs.contains(value.toInt())) {
+ // return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
+ // }
+ // }
+ // return '';
+ // },
+ // ),
+ // leftTitles: SideTitles(
+ // showTitles: true,
+ // // interval:getMaxY() - getMinY() <=500?50:getMaxY() - getMinY() <=1000?100:200,
+ // interval: 3,
+ // getTextStyles: (value) => const TextStyle(
+ // color: Colors.black,
+ // fontWeight: FontWeight.bold,
+ // fontSize: 10,
+ // ),
+ //
+ // 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: (timeSeries.length - 1).toDouble(),
+ // maxY: getMaxY() + 0.3,
+ // minY: 0,
+ // //getMinY(),
+ // lineBarsData: getData(context),
+ // );
+ // }
+
LineChartData sampleData1(context) {
return LineChartData(
lineTouchData: LineTouchData(
@@ -89,8 +166,7 @@ class LineChartCurved extends StatelessWidget {
touchCallback: (LineTouchResponse touchResponse) {},
handleBuiltInTouches: true,
),
- gridData: FlGridData(
- horizontalInterval: horizontalInterval, show: true, drawVerticalLine: true, drawHorizontalLine: true),
+ gridData: FlGridData(show: true, drawVerticalLine: true, drawHorizontalLine: true, horizontalInterval: 14, verticalInterval: 14),
titlesData: FlTitlesData(
bottomTitles: SideTitles(
showTitles: true,
@@ -98,8 +174,7 @@ class LineChartCurved extends StatelessWidget {
color: Colors.black,
fontSize: 10,
),
- // rotateAngle: 90,
- //rotateAngle:-65,
+ rotateAngle: -65,
margin: 22,
getTitles: (value) {
if (timeSeries.length < 15) {
@@ -108,10 +183,8 @@ class LineChartCurved extends StatelessWidget {
} else
return '';
} else {
- if (value.toInt() == 0)
- return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
- if (value.toInt() == timeSeries.length - 1)
- return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
+ if (value.toInt() == 0) return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
+ if (value.toInt() == timeSeries.length - 1) return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
if (xAxixs.contains(value.toInt())) {
return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
}
@@ -121,13 +194,21 @@ class LineChartCurved extends StatelessWidget {
),
leftTitles: SideTitles(
showTitles: true,
- interval:getMaxY() - getMinY() <=500?50:getMaxY() - getMinY() <=1000?100:200,
getTextStyles: (value) => const TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 10,
),
-
+ interval: 3.0,
+ // interval: getMaxY() - getMinY() <= 500
+ // ? getMaxY() - getMinY() <= 50
+ // ? 10
+ // : 10
+ // : getMaxY() - getMinY() <= 1000
+ // ? 100
+ // : getMaxY() - getMinY() >= 10000
+ // ? 5000
+ // : 200,
margin: 12,
),
),
@@ -149,14 +230,14 @@ class LineChartCurved extends StatelessWidget {
),
),
),
- minX: 0,
- maxX: (timeSeries.length - 1).toDouble(),
- maxY: getMaxY() + 0.3,
- minY: 0,//getMinY(),
+ minX: 0,
+ maxX: (timeSeries.length - 1).toDouble(),
+ maxY: getMaxY() + 0.3,
+ minY: 0,
+ //getMinY(),
lineBarsData: getData(context),
);
}
-
double getMaxY() {
double max = 0;
timeSeries.forEach((element) {
@@ -180,9 +261,6 @@ class LineChartCurved extends StatelessWidget {
List getData(context) {
List spots = List();
- if (timeSeries.length == 0) {
- spots.add(FlSpot(0, 0));
- }
for (int index = 0; index < timeSeries.length; index++) {
spots.add(FlSpot(index.toDouble(), timeSeries[index].sales));
}
@@ -191,9 +269,8 @@ class LineChartCurved extends StatelessWidget {
spots: spots,
isCurved: true,
colors: [secondaryColor],
- barWidth: 5,
+ barWidth: 1.5,
isStrokeCapRound: true,
- curveSmoothness: 0.12,
dotData: FlDotData(
show: false,
),
diff --git a/lib/pages/medical/my_trackers/widget/MonthLineChartCurved.dart b/lib/pages/medical/my_trackers/widget/MonthLineChartCurved.dart
index 5ef71f5b..c1ef7f5a 100644
--- a/lib/pages/medical/my_trackers/widget/MonthLineChartCurved.dart
+++ b/lib/pages/medical/my_trackers/widget/MonthLineChartCurved.dart
@@ -36,7 +36,7 @@ class MonthLineChartCurved extends StatelessWidget {
),
Text(
title,
- style: TextStyle(color: Colors.black, fontSize: 15, letterSpacing: 2),
+ style: TextStyle(color: Colors.black, fontSize: 16, letterSpacing: -0.64, fontWeight: FontWeight.w600),
textAlign: TextAlign.center,
),
SizedBox(
@@ -91,7 +91,12 @@ class MonthLineChartCurved extends StatelessWidget {
handleBuiltInTouches: true,
),
gridData: FlGridData(
- horizontalInterval: horizontalInterval, show: true, drawVerticalLine: true, drawHorizontalLine: true),
+ horizontalInterval: 12,
+ show: true,
+ drawVerticalLine: true,
+ drawHorizontalLine: true,
+ verticalInterval: 12,
+ ),
titlesData: FlTitlesData(
bottomTitles: SideTitles(
showTitles: true,
@@ -111,7 +116,11 @@ class MonthLineChartCurved extends StatelessWidget {
fontWeight: FontWeight.bold,
fontSize: 10,
),
- interval:getMaxY() - getMinY() <=500?50:getMaxY() - getMinY() <=1000?100:200,
+ interval: getMaxY() - getMinY() <= 500
+ ? 50
+ : getMaxY() - getMinY() <= 1000
+ ? 100
+ : 200,
// getTitles: (value) {
// if (value.toInt() == 0)
@@ -184,7 +193,7 @@ class MonthLineChartCurved extends StatelessWidget {
spots: spots,
isCurved: true,
colors: [secondaryColor],
- barWidth: 5,
+ barWidth: 1.5,
isStrokeCapRound: true,
curveSmoothness: 0.0,
dotData: FlDotData(
diff --git a/lib/pages/medical/prescriptions/PrescriptionIDeliveryAddressPage.dart b/lib/pages/medical/prescriptions/PrescriptionIDeliveryAddressPage.dart
index 8f04d3a0..f4d3aaed 100644
--- a/lib/pages/medical/prescriptions/PrescriptionIDeliveryAddressPage.dart
+++ b/lib/pages/medical/prescriptions/PrescriptionIDeliveryAddressPage.dart
@@ -7,9 +7,12 @@ import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/PrescriptionDeliveryViewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
+import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
+import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart';
@@ -28,20 +31,13 @@ class PrescriptionDeliveryAddressPage extends StatefulWidget {
final List prescriptionReportList;
final List prescriptionReportEnhList;
- const PrescriptionDeliveryAddressPage(
- {Key key,
- this.prescriptions,
- this.prescriptionReportList,
- this.prescriptionReportEnhList})
- : super(key: key);
+ const PrescriptionDeliveryAddressPage({Key key, this.prescriptions, this.prescriptionReportList, this.prescriptionReportEnhList}) : super(key: key);
@override
- _PrescriptionDeliveryAddressPageState createState() =>
- _PrescriptionDeliveryAddressPageState();
+ _PrescriptionDeliveryAddressPageState createState() => _PrescriptionDeliveryAddressPageState();
}
-class _PrescriptionDeliveryAddressPageState
- extends State {
+class _PrescriptionDeliveryAddressPageState extends State {
AddressInfo _selectedAddress;
Completer _controller = Completer();
@@ -79,218 +75,252 @@ class _PrescriptionDeliveryAddressPageState
return BaseView(
onModelReady: (model) => model.getCustomerInfo(),
builder: (_, model, w) => AppScaffold(
- isShowAppBar: true,
- appBarTitle: TranslationBase.of(context).shippingAddresss,
- baseViewModel: model,
- body: Container(
- height: MediaQuery.of(context).size.height * 0.65,
- child: SingleChildScrollView(
- physics: BouncingScrollPhysics(),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- SizedBox(
- height: 8,
- ),
- InkWell(
- onTap: () {
- confirmSelectLocationDialog(model.addressesList);
- },
- child: Container(
- margin: EdgeInsets.only(left: 10, right: 10, top: 15),
- height: 50,
- decoration: BoxDecoration(
- border: Border.all(color: Colors.grey),
- borderRadius: BorderRadius.circular(7),
- color: Colors.white,
- shape: BoxShape.rectangle,
- ),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Expanded(
- child: Padding(
- padding: const EdgeInsets.all(8.0),
- child: Container(
- child: Text(
- getAddressName(),
- ),
- margin: EdgeInsets.only(left: 10, right: 10),
+ isShowAppBar: true,
+ appBarTitle: TranslationBase.of(context).shippingAddresss,
+ baseViewModel: model,
+ showNewAppBarTitle: true,
+ showNewAppBar: true,
+ backgroundColor: CustomColors.appBackgroudGrey2Color,
+ body: Container(
+ child: Column(
+ children: [
+ Expanded(
+ child: SingleChildScrollView(
+ physics: BouncingScrollPhysics(),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Card(
+ margin: EdgeInsets.only(left: 12, right: 12, bottom: 12, top: 12),
+ shape: cardRadius(12),
+ elevation: 3,
+ child: Container(
+ child: InkWell(
+ onTap: () => confirmSelectLocationDialog(model.addressesList),
+ child: Container(
+ padding: EdgeInsets.all(8),
+ width: double.infinity,
+ // height: 65,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(10),
+ color: Colors.white,
+ ),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Expanded(
+ child: Text(
+ getAddressName(),
+ style: TextStyle(
+ fontWeight: FontWeight.w600,
+ fontSize: 12,
+ letterSpacing: -0.45,
+ ),
+ ),
+ ),
+ Icon(Icons.arrow_drop_down)
+ ],
),
),
),
- Icon(
- Icons.arrow_drop_down,
- size: 22,
- color: Colors.grey,
- )
- ],
+ height: 50,
+ width: double.infinity,
+ ),
),
- ),
- ),
- SizedBox(
- height: 10,
- ),
- _selectedAddress == null
- ? Container(
- child: Image.asset(
- projectViewModel.isArabic
- ? 'assets/images/pharmacy/shipping_image_ar.png'
- : 'assets/images/pharmacy/shipping_image.png',
- height: 300,
- ),
- )
- : Padding(
- padding: const EdgeInsets.all(8.0),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: Container(
- decoration: BoxDecoration(
- border: Border.all(color: Colors.grey)),
- height: 200,
- child: GoogleMap(
- mapType: MapType.normal,
- markers: markers,
- initialCameraPosition: _kGooglePlex,
- onMapCreated:
- (GoogleMapController controller) {
- _controller.complete(controller);
- },
+ InkWell(
+ onTap: () async {
+ Navigator.push(
+ context,
+ FadePage(
+ page: LocationPage(
+ latitude: latitude,
+ longitude: longitude,
+ )),
+ ).then((value) {
+ if (value != null && value is AddNewAddressRequestModel) {
+ setState(() {
+ _selectedAddress = AddressInfo(
+ id: value.customer.id.toString(),
+ email: value.customer.email,
+ firstName: value.customer.addresses[0].firstName,
+ lastName: value.customer.addresses[0].lastName,
+ address1: value.customer.addresses[0].address1,
+ address2: value.customer.addresses[0].address2,
+ city: value.customer.addresses[0].city,
+ country: value.customer.addresses[0].country,
+ phoneNumber: value.customer.addresses[0].phoneNumber,
+ latLong: value.customer.addresses[0].latLong,
+ company: value.customer.addresses[0].company,
+ countryId: value.customer.addresses[0].countryId,
+ createdOnUtc: value.customer.addresses[0].createdOnUtc,
+ customerAttributes: value.customer.addresses[0].customerAttributes,
+ faxNumber: value.customer.addresses[0].faxNumber,
+ province: value.customer.addresses[0].province,
+ stateProvinceId: value.customer.addresses[0].stateProvinceId,
+ zipPostalCode: value.customer.addresses[0].zipPostalCode,
+ );
+ List latLongArr = _selectedAddress.latLong.split(',');
+
+ latitude = double.parse(latLongArr[0]);
+ longitude = double.parse(latLongArr[1]);
+ markers = Set();
+ markers.add(
+ Marker(
+ markerId: MarkerId(
+ _selectedAddress.latLong.hashCode.toString(),
+ ),
+ position: LatLng(latitude, longitude),
),
+ );
+ _kGooglePlex = CameraPosition(
+ target: LatLng(latitude, longitude),
+ zoom: 14.4746,
+ );
+ });
+ }
+ });
+ },
+ child: Padding(
+ padding: EdgeInsets.only(left: 12, right: 12, bottom: 16, top: 8),
+ child: Row(
+ children: [
+ Icon(Icons.add_circle_outline_sharp),
+ mWidth(12),
+ Text(
+ TranslationBase.of(context).addNewAddress,
+ style: TextStyle(
+ fontSize: 14,
+ fontWeight: FontWeight.w600,
+ letterSpacing: -0.46,
),
),
- SizedBox(
- height: 10,
- ),
- Texts(
- TranslationBase.of(context).shippingAddresss),
- SizedBox(
- height: 10,
- ),
- Texts(
- '${model.user.firstName} ${model.user.lastName}'),
- SizedBox(
- height: 10,
- ),
- Texts(_selectedAddress.address1),
- SizedBox(
- height: 10,
- ),
- Texts(_selectedAddress.address2),
- SizedBox(
- height: 10,
- ),
- Texts(_selectedAddress.city +
- " " +
- _selectedAddress.country),
],
),
+ ),
+ ),
+ if (_selectedAddress != null)
+ Card(
+ shape: cardRadius(12),
+ color: Colors.white,
+ margin: EdgeInsets.all(12),
+ child: Padding(
+ padding: const EdgeInsets.all(12.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Texts(
+ TranslationBase.of(context).selectAddress + ":",
+ fontSize: 12,
+ color: CustomColors.grey,
+ fontWeight: FontWeight.w600,
+ ),
+ mHeight(12),
+ Container(
+ height: 175,
+ decoration: containerColorRadiusBorder(Colors.white, 12, Colors.grey),
+ clipBehavior: Clip.antiAlias,
+ child: Card(
+ shape: cardRadius(12),
+ clipBehavior: Clip.antiAlias,
+ elevation: 0,
+ margin: const EdgeInsets.all(0),
+ // child: GoogleMap(
+ // mapType: MapType.normal,
+ // markers: markers,
+ // initialCameraPosition: _kGooglePlex,
+ // onMapCreated: (GoogleMapController controller) {
+ // _controller.complete(controller);
+ // },
+ // ),
+ child: Image.network(
+ "https://maps.googleapis.com/maps/api/staticmap?center=" +
+ _kGooglePlex.target.latitude.toString() +
+ "," +
+ _kGooglePlex.target.longitude.toString() +
+ "&zoom=16&size=600x300&maptype=roadmap&markers=color:red%7C" +
+ _kGooglePlex.target.latitude.toString() +
+ "," +
+ _kGooglePlex.target.longitude.toString() +
+ "&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8",
+ width: double.infinity,
+ height: double.infinity,
+ fit: BoxFit.cover,
+ ),
+ ),
+ ),
+ SizedBox(
+ height: 10,
+ ),
+ Texts(
+ TranslationBase.of(context).shippingAddresss + ":",
+ fontSize: 12,
+ color: CustomColors.grey,
+ fontWeight: FontWeight.w600,
+ ),
+ SizedBox(
+ height: 2,
+ ),
+ Texts(
+ '${model.user.firstName} ${model.user.lastName}',
+ fontSize: 12,
+ fontWeight: FontWeight.w600,
+ ),
+ Texts(
+ _selectedAddress.address1,
+ fontSize: 12,
+ fontWeight: FontWeight.w600,
+ ),
+ Texts(
+ _selectedAddress.address2,
+ fontSize: 12,
+ fontWeight: FontWeight.w600,
+ ),
+ Texts(
+ _selectedAddress.city + " " + _selectedAddress.country,
+ fontSize: 12,
+ fontWeight: FontWeight.w600,
+ ),
+ ],
+ ),
+ ),
)
- ],
+ ],
+ ),
+ ),
),
- ),
- ),
- bottomSheet: Container(
- width: double.infinity,
- height: MediaQuery.of(context).size.height * 0.25,
- color: Colors.grey[100],
- child: Column(
- children: [
- Divider(),
- Container(
- width: MediaQuery.of(context).size.width * 0.8,
+ Card(
+ shape: cardRadius(0),
+ margin: EdgeInsets.zero,
+ elevation: 20,
+ child: Container(
+ width: double.infinity,
+ padding: EdgeInsets.only(left: 16, right: 16, top: 16),
child: Button(
- label:
- TranslationBase.of(context).addNewAddress.toUpperCase(),
+ label: TranslationBase.of(context).continues.toUpperCase(),
+ disabled: _selectedAddress == null,
+ backgroundColor: _selectedAddress == null ? CustomColors.grey2 : CustomColors.accentColor,
onTap: () {
Navigator.push(
context,
FadePage(
- page: LocationPage(
- latitude: latitude,
- longitude: longitude,
- )),
- ).then((value) {
- if (value != null &&
- value is AddNewAddressRequestModel) {
- setState(() {
- _selectedAddress = AddressInfo(
- id: value.customer.id.toString(),
- email: value.customer.email,
- firstName: value.customer.addresses[0].firstName,
- lastName: value.customer.addresses[0].lastName,
- address1: value.customer.addresses[0].address1,
- address2: value.customer.addresses[0].address2,
- city: value.customer.addresses[0].city,
- country: value.customer.addresses[0].country,
- phoneNumber: value.customer.addresses[0].phoneNumber,
- latLong: value.customer.addresses[0].latLong,
- company: value.customer.addresses[0].company,
- countryId: value.customer.addresses[0].countryId,
- createdOnUtc: value.customer.addresses[0].createdOnUtc,
- customerAttributes: value.customer.addresses[0].customerAttributes,
- faxNumber: value.customer.addresses[0].faxNumber,
- province: value.customer.addresses[0].province,
- stateProvinceId: value.customer.addresses[0].stateProvinceId,
- zipPostalCode: value.customer.addresses[0].zipPostalCode,
-
- );
- List latLongArr = _selectedAddress.latLong.split(',');
-
- latitude = double.parse(latLongArr[0]);
- longitude = double.parse(latLongArr[1]);
- markers = Set();
- markers.add(
- Marker(
- markerId: MarkerId(
- _selectedAddress.latLong.hashCode.toString(),
- ),
- position: LatLng(latitude, longitude),
- ),
- );
- _kGooglePlex = CameraPosition(
- target: LatLng(latitude, longitude),
- zoom: 14.4746,
- );
- });
- }
- });
+ page: PrescriptionOrderOverview(
+ latitude: latitude,
+ longitude: longitude,
+ prescriptionReportEnhList: widget.prescriptionReportEnhList,
+ prescriptionReportList: widget.prescriptionReportList,
+ prescriptions: widget.prescriptions,
+ selectedAddress: _selectedAddress,
+ ),
+ ),
+ );
},
),
),
- Container(
- width: MediaQuery.of(context).size.width * 0.8,
- child: Button(
- label:
- TranslationBase.of(context).continues.toUpperCase(),
- disabled: _selectedAddress == null,
- backgroundColor: _selectedAddress == null
- ? Colors.green[300]
- : Colors.green[700],
- onTap: () {
- Navigator.push(
- context,
- FadePage(
- page: PrescriptionOrderOverview(
- latitude: latitude,
- longitude: longitude,
- prescriptionReportEnhList:
- widget.prescriptionReportEnhList,
- prescriptionReportList:
- widget.prescriptionReportList,
- prescriptions: widget.prescriptions,
- selectedAddress: _selectedAddress,
- ),
- ),
- );
- },
- ))
- ],
- ),
- )),
+ ),
+ ],
+ ),
+ ),
+ ),
);
}
diff --git a/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart b/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart
index e77b29db..9a437d6a 100644
--- a/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart
+++ b/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart
@@ -5,8 +5,10 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_repor
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/PrescriptionDeliveryViewModel.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
+import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart';
@@ -30,146 +32,145 @@ class PrescriptionOrderOverview extends StatelessWidget {
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).orderOverview,
baseViewModel: model,
+ showNewAppBar: true,
+ showNewAppBarTitle: true,
+ backgroundColor: CustomColors.appBackgroudGrey2Color,
body: Container(
- height: MediaQuery.of(context).size.height * 0.8,
+ height: double.infinity,
child: Column(
children: [
- if (!prescriptions.isInOutPatient)
- ...List.generate(
- prescriptionReportList.length,
- (index) => Container(
- width: double.infinity,
- margin: EdgeInsets.only(top: 10, left: 10, right: 10),
- padding: EdgeInsets.all(8.0),
- decoration: BoxDecoration(
- color: Colors.white,
- borderRadius: BorderRadius.all(
- Radius.circular(10.0),
- ),
- border: Border.all(color: Colors.grey[200], width: 0.5),
- ),
+ Expanded(
+ child: Column(
+ children: [
+ if (!prescriptions.isInOutPatient)
+ ...List.generate(
+ prescriptionReportList.length,
+ (index) => Container(
+ width: double.infinity,
+ margin: EdgeInsets.only(top: 10, left: 10, right: 10),
+ padding: EdgeInsets.all(8.0),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.all(
+ Radius.circular(10.0),
+ ),
+ border: Border.all(color: Colors.grey[200], width: 0.5),
+ ),
+ child: Row(
+ children: [
+ ClipRRect(
+ borderRadius: BorderRadius.all(Radius.circular(5)),
+ child: Image.network(
+ prescriptionReportList[index].imageSRCUrl,
+ fit: BoxFit.cover,
+ width: 60,
+ height: 70,
+ ),
+ ),
+ SizedBox(
+ width: 10,
+ ),
+ Expanded(
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Center(
+ child: Texts(
+ prescriptionReportList[index].itemDescription.isNotEmpty ? prescriptionReportList[index].itemDescription : prescriptionReportList[index].itemDescriptionN)),
+ )),
+
+ ],
+ ),
+ ))
+ else
+ ...List.generate(
+ prescriptionReportEnhList.length,
+ (index) => Card(
+ margin: EdgeInsets.all(12.0),
+ color: Colors.white,
+ shape: cardRadius(12),
+ elevation: 4,
child: Row(
children: [
- ClipRRect(
- borderRadius: BorderRadius.all(Radius.circular(5)),
- child: Image.network(
- prescriptionReportList[index].imageSRCUrl,
- fit: BoxFit.cover,
- width: 60,
- height: 70,
+ Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: ClipRRect(
+ borderRadius: BorderRadius.all(Radius.circular(5)),
+ child: Image.network(
+ prescriptionReportEnhList[index].imageSRCUrl,
+ fit: BoxFit.cover,
+ width: 60,
+ height: 60,
+ ),
),
),
- SizedBox(
- width: 10,
- ),
+
Expanded(
- child: Padding(
- padding: const EdgeInsets.all(8.0),
- child: Center(
- child: Texts(
- prescriptionReportList[index].itemDescription.isNotEmpty ? prescriptionReportList[index].itemDescription : prescriptionReportList[index].itemDescriptionN)),
- )),
- Icon(
- Icons.arrow_forward_ios,
- size: 18,
- color: Colors.grey[500],
- )
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Texts(prescriptionReportEnhList[index].itemDescription),
+ ],
+ ),
+ ),
+ ),
+
],
),
- ))
- else
- ...List.generate(
- prescriptionReportEnhList.length,
- (index) => Container(
- margin: EdgeInsets.all(8.0),
- color: Colors.white,
- child: Row(
- children: [
- ClipRRect(
- borderRadius: BorderRadius.all(Radius.circular(5)),
- child: Image.network(
- prescriptionReportEnhList[index].imageSRCUrl,
- fit: BoxFit.cover,
- width: 60,
- height: 70,
- ),
- ),
- SizedBox(
- width: 10,
- ),
- Expanded(
- child: Padding(
- padding: const EdgeInsets.all(8.0),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Texts(prescriptionReportEnhList[index].itemDescription),
- ],
- ),
- ),
),
- Icon(
- Icons.arrow_forward_ios,
- size: 18,
- color: Colors.grey[500],
- )
- ],
- ),
- ),
- )
- ],
- ),
- ),
- bottomSheet: Container(
- width: double.infinity,
- height: MediaQuery.of(context).size.height * 0.15,
- color: Colors.grey[100],
- child: Column(
- children: [
- SizedBox(
- height: 12,
+ )
+ ],
+ ),
),
- Container(
- width: MediaQuery.of(context).size.width * 0.8,
- child: SecondaryButton(
- label: TranslationBase.of(context).submit.toUpperCase(),
- color: Colors.green[800],
- onTap: () async {
- showDialog(
- context: context,
- child: ConfirmWithMessageDialog(
- message: TranslationBase.of(context).confirmPrescription,
- okTitle: TranslationBase.of(context).ok,
- onTap: () async {
- GifLoaderDialogUtils.showMyDialog(context);
- await model
- .insertDeliveryOrder(
- lineItemNo: 0,
- longitude: longitude,
- latitude: latitude,
- appointmentNo: prescriptions.appointmentNo,
- dischargeID: prescriptions.dischargeNo,
- createdBy: model.user.patientID)
- .then((value) {
- GifLoaderDialogUtils.hideDialog(context);
- if (model.state == ViewState.ErrorLocal)
- showErrorDialog(context, model.error);
- else {
- Navigator.pop(context);
- Navigator.pop(context);
- Navigator.pop(context, true);
- }
- }).catchError((e) {
- GifLoaderDialogUtils.hideDialog(context);
- });
- },
- ),
- );
- },
- ))
+ Card(
+ shape: cardRadius(0),
+ margin: EdgeInsets.zero,
+ elevation: 20,
+ child: Container(
+ width: double.infinity,
+ margin: EdgeInsets.all(12),
+ child: SecondaryButton(
+ label: TranslationBase.of(context).submit.toUpperCase(),
+ color: CustomColors.accentColor,
+ onTap: () async {
+ showDialog(
+ context: context,
+ child: ConfirmWithMessageDialog(
+ message: TranslationBase.of(context).confirmPrescription,
+ okTitle: TranslationBase.of(context).ok,
+ onTap: () async {
+ GifLoaderDialogUtils.showMyDialog(context);
+ await model
+ .insertDeliveryOrder(
+ lineItemNo: 0,
+ longitude: longitude,
+ latitude: latitude,
+ appointmentNo: prescriptions.appointmentNo,
+ dischargeID: prescriptions.dischargeNo,
+ createdBy: model.user.patientID)
+ .then((value) {
+ GifLoaderDialogUtils.hideDialog(context);
+ if (model.state == ViewState.ErrorLocal)
+ showErrorDialog(context, model.error);
+ else {
+ Navigator.pop(context);
+ Navigator.pop(context);
+ Navigator.pop(context, true);
+ }
+ }).catchError((e) {
+ GifLoaderDialogUtils.hideDialog(context);
+ });
+ },
+ ),
+ );
+ },
+ )),
+ )
],
),
),
+
),
);
}
diff --git a/lib/pages/medical/vital_sign/LineChartCurved.dart b/lib/pages/medical/vital_sign/LineChartCurved.dart
index 34e3735e..f28c2801 100644
--- a/lib/pages/medical/vital_sign/LineChartCurved.dart
+++ b/lib/pages/medical/vital_sign/LineChartCurved.dart
@@ -137,15 +137,6 @@ class LineChartCurved extends StatelessWidget {
fontSize: 10,
),
interval: 3.0,
- // interval: getMaxY() - getMinY() <= 500
- // ? getMaxY() - getMinY() <= 50
- // ? 10
- // : 10
- // : getMaxY() - getMinY() <= 1000
- // ? 100
- // : getMaxY() - getMinY() >= 10000
- // ? 5000
- // : 200,
margin: 12,
),
),
diff --git a/lib/widgets/buttons/button.dart b/lib/widgets/buttons/button.dart
index 99abad84..84f3cca6 100644
--- a/lib/widgets/buttons/button.dart
+++ b/lib/widgets/buttons/button.dart
@@ -10,15 +10,7 @@ import 'package:provider/provider.dart';
/// [loading] show the progress indicator
/// [elevation] color elevation value
class Button extends StatefulWidget {
- Button(
- {Key key,
- this.label: "",
- this.icon,
- this.onTap,
- this.backgroundColor,
- this.loading: false,
- this.elevation: true, this.disabled=false})
- : super(key: key);
+ Button({Key key, this.label: "", this.icon, this.onTap, this.backgroundColor, this.loading: false, this.elevation: true, this.disabled = false}) : super(key: key);
final String label;
final Widget icon;
@@ -37,17 +29,11 @@ class _ButtonState extends State