merge-update-with-lab-changes
devamirsaleemahmad 2 years ago
parent 1c34843bc5
commit 2c9e51aef0

@ -1,6 +1,6 @@
import 'dart:math' as math; import 'dart:math' as math;
import 'package:flutter_charts/flutter_charts.dart' as charts; import 'package:flutter_charts/flutter_charts.dart' as Charts;
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_detail_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_detail_model.dart';
@ -94,7 +94,7 @@ class H2OViewModel extends BaseViewModel {
} }
} }
List<charts.Series<ChartSeries, String>> createUserProgressForWeekDataSeries() { List<Charts.<ChartSeries, String>> createUserProgressForWeekDataSeries() {
List<ChartSeries> globalData = []; List<ChartSeries> globalData = [];
_h2OService.userProgressForWeekDataList.forEach((UserProgressForWeekDataModel data) { _h2OService.userProgressForWeekDataList.forEach((UserProgressForWeekDataModel data) {
globalData.add(new ChartSeries(data.dayName!, data.percentageConsumed!)); globalData.add(new ChartSeries(data.dayName!, data.percentageConsumed!));
@ -108,7 +108,7 @@ class H2OViewModel extends BaseViewModel {
minValue = -1; minValue = -1;
} }
return [ return [
new charts.series<ChartSeries, String>( Charts.series<ChartSeries, String>(
id: 'Global Revenue', id: 'Global Revenue',
domainFn: (ChartSeries sales, _) => sales.y, domainFn: (ChartSeries sales, _) => sales.y,
measureFn: (ChartSeries sales, _) => sales.x, measureFn: (ChartSeries sales, _) => sales.x,

@ -19,7 +19,7 @@ class VitalSignViewModel extends BaseViewModel {
String respirationBeatPerMinute = "0"; String respirationBeatPerMinute = "0";
String bloodPressure = "0 / 0"; String bloodPressure = "0 / 0";
getPatientVitalSign({int? appointmentNo, required int projectID}) async { getPatientVitalSign({int? appointmentNo, int? projectID}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
if (appointmentNo != null && projectID != null) { if (appointmentNo != null && projectID != null) {

@ -29,6 +29,7 @@ import 'package:provider/provider.dart';
class LocationPage extends StatefulWidget { class LocationPage extends StatefulWidget {
final Function(PickResult)? onPick; final Function(PickResult)? onPick;
// final double latitude; // final double latitude;
// final double longitude; // final double longitude;
final dynamic model; final dynamic model;
@ -76,7 +77,8 @@ class _LocationPageState extends State<LocationPage> {
//Changed By Aamir //Changed By Aamir
_kGooglePlex.toMap() as Map<dynamic, dynamic>, _kGooglePlex.toMap() as Map<dynamic, dynamic>,
onCameraMove: (camera) { onCameraMove: (camera) {
_updatePosition(camera as CameraPosition); print("Changed By Aamir");
_updatePosition(camera);
}, },
onMapCreated: () { onMapCreated: () {
currentPostion = LatLng(projectViewModel.latitude, projectViewModel.longitude); currentPostion = LatLng(projectViewModel.latitude, projectViewModel.longitude);

@ -508,7 +508,9 @@ class _H2oSettingState extends State<H2oSetting> {
child: PopupMenuButton( child: PopupMenuButton(
child: CommonDropDownView(TranslationBase.of(context).unit, unitTitle, (){}), child: CommonDropDownView(TranslationBase.of(context).unit, unitTitle, (){}),
onSelected: (value) { onSelected: (value) {
onUnitTap(value); print("Changed By Aamir");
// Changed By Aamir
/// onUnitTap(value);
}, },
itemBuilder: (context) => _list), itemBuilder: (context) => _list),
) )

@ -269,7 +269,9 @@ class _BMICalculatorState extends State<BMICalculator> {
child: PopupMenuButton( child: PopupMenuButton(
child: CommonDropDownView(TranslationBase.of(context).unit, unitTitle, (){}), child: CommonDropDownView(TranslationBase.of(context).unit, unitTitle, (){}),
onSelected: (value) { onSelected: (value) {
onUnitTap(value); // Changed By Aamir
print("Changed By Aamir");
// onUnitTap(value);
}, },
itemBuilder: (context) => _list), itemBuilder: (context) => _list),
) )

@ -609,7 +609,9 @@ class _BmrCalculatorState extends State<BmrCalculator> {
child: PopupMenuButton( child: PopupMenuButton(
child: CommonDropDownView(TranslationBase.of(context).unit, unitTitle, (){}), child: CommonDropDownView(TranslationBase.of(context).unit, unitTitle, (){}),
onSelected: (value) { onSelected: (value) {
onUnitTap(value); //Changed By Aamir
print("Changed By Aamir");
// onUnitTap(value);
}, },
itemBuilder: (context) => _list), itemBuilder: (context) => _list),
) )

@ -630,7 +630,8 @@ class _BodyFatState extends State<BodyFat> {
child: PopupMenuButton( child: PopupMenuButton(
child: CommonDropDownView(TranslationBase.of(context).unit, unitTitle, (){}), child: CommonDropDownView(TranslationBase.of(context).unit, unitTitle, (){}),
onSelected: (value) { onSelected: (value) {
onUnitTap(value); print("Changed By Aamir");
// onUnitTap(value);
}, },
itemBuilder: (context) => _list), itemBuilder: (context) => _list),
) )

@ -557,7 +557,8 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
child: PopupMenuButton( child: PopupMenuButton(
child: CommonDropDownView(TranslationBase.of(context).unit, unitTitle, (){}), child: CommonDropDownView(TranslationBase.of(context).unit, unitTitle, (){}),
onSelected: (value) { onSelected: (value) {
onUnitTap(value); print("Changed By Aamir");
// onUnitTap(value);
}, },
itemBuilder: (context) => _list), itemBuilder: (context) => _list),
) )

@ -478,7 +478,9 @@ class _IdealBodyState extends State<IdealBody> {
child: PopupMenuButton( child: PopupMenuButton(
child: CommonDropDownView(TranslationBase.of(context).unit, unitTitle, (){}), child: CommonDropDownView(TranslationBase.of(context).unit, unitTitle, (){}),
onSelected: (value) { onSelected: (value) {
onUnitTap(value);
print("Changed By Aamir");
// onUnitTap(value);
}, },
itemBuilder: (context) => _list), itemBuilder: (context) => _list),
) )

@ -12,6 +12,8 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../Blood/new_text_Field.dart';
class ChildVaccinesPage extends StatefulWidget { class ChildVaccinesPage extends StatefulWidget {
@override @override
_ChildVaccinesPageState createState() => _ChildVaccinesPageState(); _ChildVaccinesPageState createState() => _ChildVaccinesPageState();
@ -84,8 +86,8 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage> with SingleTicker
padding: const EdgeInsets.all(10.0), padding: const EdgeInsets.all(10.0),
child: Container( child: Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15), margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields( child: NewTextFields(
fillColor: Colors.red, // fillColor: Colors.red,
hintText: model.user != null ? model.user!.emailAddress : "", hintText: model.user != null ? model.user!.emailAddress : "",
controller: titleController, controller: titleController,
fontSize: 20, fontSize: 20,

@ -76,8 +76,9 @@ class _ChildVaccinesPageState extends State<ChildInitialPage> with SingleTickerP
SizedBox( SizedBox(
height: 20, height: 20,
), ),
TextFields( NewTextFields(
fillColor: Colors.red, /// fillColor: Colors.red,
//Changed By Aamir
hintText: model.user != null ? model.user!.emailAddress : "", hintText: model.user != null ? model.user!.emailAddress : "",
controller: titleController, controller: titleController,
fontSize: 14, fontSize: 14,

@ -235,7 +235,7 @@ class CovidDirveThruQuestionsState extends State<CovidDirveThruQuestions> {
height: 50, height: 50,
elevation: 0, elevation: 0,
color: all2 ? CustomColors.accentColor : CustomColors.grey, color: all2 ? CustomColors.accentColor : CustomColors.grey,
disabledColor: Theme.of(context).appBarTheme.color!.withOpacity(0.25), disabledColor: Theme.of(context).appBarTheme.backgroundColor!.withOpacity(0.25),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
child: Text( child: Text(
localize.next, localize.next,

@ -246,8 +246,8 @@ class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage
child: Container( child: Container(
width: size, width: size,
height: size, height: size,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20), border: Border.all(width: 2, color: Theme.of(context).appBarTheme.color!)), decoration: BoxDecoration(borderRadius: BorderRadius.circular(20), border: Border.all(width: 2, color: Theme.of(context).appBarTheme.backgroundColor!)),
child: Container(margin: EdgeInsets.all(margin), decoration: BoxDecoration(color: Theme.of(context).appBarTheme.color, borderRadius: BorderRadius.circular(20))), child: Container(margin: EdgeInsets.all(margin), decoration: BoxDecoration(color: Theme.of(context).appBarTheme.backgroundColor, borderRadius: BorderRadius.circular(20))),
), ),
); );
} }

@ -126,13 +126,13 @@ class RRTRequestPageState extends State<RRTRequestPage> {
), ),
priceTable(context), priceTable(context),
acceptPolicy(), acceptPolicy(),
Container(height: 0.5, color: Theme.of(context).appBarTheme.color), // Seperator Container(height: 0.5, color: Theme.of(context).appBarTheme.backgroundColor), // Seperator
Container( Container(
padding: EdgeInsets.only(top: 20, bottom: 5), padding: EdgeInsets.only(top: 20, bottom: 5),
alignment: Alignment.center, alignment: Alignment.center,
child: Text(TranslationBase.of(context).youCanPayByTheFollowingOptions, child: Text(TranslationBase.of(context).youCanPayByTheFollowingOptions,
style: TextStyle(fontSize: 13, color: Theme.of(context).appBarTheme.color, fontWeight: FontWeight.w500), maxLines: 2)), style: TextStyle(fontSize: 13, color: Theme.of(context).appBarTheme.backgroundColor, fontWeight: FontWeight.w500), maxLines: 2)),
Container(margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0), child: getPaymentMethods()) Container(margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0), child: getPaymentMethods())
], ],
@ -173,15 +173,15 @@ class RRTRequestPageState extends State<RRTRequestPage> {
children: [ children: [
Container( Container(
height: 30, height: 30,
decoration: BoxDecoration(color: Theme.of(context).appBarTheme.color, borderRadius: BorderRadius.only(topLeft: radius, topRight: radius)), decoration: BoxDecoration(color: Theme.of(context).appBarTheme.backgroundColor, borderRadius: BorderRadius.only(topLeft: radius, topRight: radius)),
child: Center(child: Text(TranslationBase.of(context).approximateServiceFee, style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w500, letterSpacing: 1))), child: Center(child: Text(TranslationBase.of(context).approximateServiceFee, style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w500, letterSpacing: 1))),
), ),
pricingRow(label: TranslationBase.of(context).patientShare, value: '$amount ${TranslationBase.of(context).sar}'), pricingRow(label: TranslationBase.of(context).patientShare, value: '$amount ${TranslationBase.of(context).sar}'),
Container(height: 0.5, color: Theme.of(context).appBarTheme.color), Container(height: 0.5, color: Theme.of(context).appBarTheme.backgroundColor),
pricingRow(label: TranslationBase.of(context).patientTaxToDo, value: '$vat ${TranslationBase.of(context).sar}'), pricingRow(label: TranslationBase.of(context).patientTaxToDo, value: '$vat ${TranslationBase.of(context).sar}'),
Container(height: 0.5, color: Theme.of(context).appBarTheme.color), Container(height: 0.5, color: Theme.of(context).appBarTheme.backgroundColor),
pricingRow(label: TranslationBase.of(context).patientShareWithTax, value: '$total ${TranslationBase.of(context).sar}', labelBold: true), pricingRow(label: TranslationBase.of(context).patientShareWithTax, value: '$total ${TranslationBase.of(context).sar}', labelBold: true),
Container(height: 0.5, color: Theme.of(context).appBarTheme.color), Container(height: 0.5, color: Theme.of(context).appBarTheme.backgroundColor),
], ],
); );
} }
@ -196,7 +196,7 @@ class RRTRequestPageState extends State<RRTRequestPage> {
Spacer(), Spacer(),
Container( Container(
height: 35, height: 35,
color: Theme.of(context).appBarTheme.color, color: Theme.of(context).appBarTheme.backgroundColor,
width: 0.5, width: 0.5,
), ),
Container( Container(

@ -77,7 +77,7 @@ class _LandingPagePharmacyState extends State<LandingPagePharmacy> {
PharmacyPage(), PharmacyPage(),
PharmacyCategorisePage(), PharmacyCategorisePage(),
PharmacyProfilePage(moveToOrder: false, changeTab: changeCurrentTab), PharmacyProfilePage(moveToOrder: false, changeTab: changeCurrentTab),
CartOrderPage(changeTab: changeCurrentTab), CartOrderPage(changeTab: changeCurrentTab),
], ],
), ),
), ),

@ -51,7 +51,7 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
showNewAppBar: true, showNewAppBar: true,
description: TranslationBase.of(context).erConsultation, description: TranslationBase.of(context).erConsultation,
onTap: () { onTap: () {
Navigator.pop(context); //Navigator.pop(context);
Navigator.pop(context); Navigator.pop(context);
}, },
body: Container( body: Container(

@ -19,9 +19,9 @@ class StepsTracker extends StatefulWidget {
} }
class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderStateMixin { class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderStateMixin {
TabController _tabController; late TabController _tabController;
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
int weeklyStatsAvgValue = 0; int weeklyStatsAvgValue = 0;
int monthlyStatsAvgValue = 0; int monthlyStatsAvgValue = 0;
@ -129,7 +129,7 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
res['Med_GetWeekStepsTransactionsStsList'].forEach((element) { res['Med_GetWeekStepsTransactionsStsList'].forEach((element) {
weekyStepsList.add(new WeeklyStepsResModel.fromJson(element)); weekyStepsList.add(new WeeklyStepsResModel.fromJson(element));
if (element['Value'] != null) { if (element['Value'] != null) {
num value = num.tryParse(element['Value'] ?? "0"); num value = num.tryParse(element['Value'] ?? "0")!;
avgWeeklyStepsValue += value.toInt(); avgWeeklyStepsValue += value.toInt();
weeklyDataLength++; weeklyDataLength++;
} }
@ -158,7 +158,7 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
res['Med_GetMonthStepsTransactionsStsList'].forEach((element) { res['Med_GetMonthStepsTransactionsStsList'].forEach((element) {
monthlyStepsList.add(new WeeklyStepsResModel.fromJson(element)); monthlyStepsList.add(new WeeklyStepsResModel.fromJson(element));
if (element['Value'] != null) { if (element['Value'] != null) {
num value = num.tryParse(element['Value'] ?? "0"); num value = num.tryParse(element['Value'] ?? "0")!;
avgMonthlyStepsValue += value.toInt(); avgMonthlyStepsValue += value.toInt();
monthlyDataLength++; monthlyDataLength++;
} }
@ -212,8 +212,8 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
(element) { (element) {
weeklyTimeSeriesData.add( weeklyTimeSeriesData.add(
TimeSeriesSales2( TimeSeriesSales2(
DateUtil.convertStringToDate(element.machineDate), DateUtil.convertStringToDate(element.machineDate!),
element.value != null ? element.value.toDouble() : 0.0, element.value != null ? element.value!.toDouble() : 0.0,
), ),
); );
}, },
@ -228,8 +228,8 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
(element) { (element) {
monthlyTimeSeriesData.add( monthlyTimeSeriesData.add(
TimeSeriesSales2( TimeSeriesSales2(
DateUtil.convertStringToDate(element.machineDate), DateUtil.convertStringToDate(element.machineDate!),
element.value != null ? element.value.toDouble() : 0.0, element.value != null ? element.value!.toDouble() : 0.0,
), ),
); );
}, },
@ -244,8 +244,8 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
(element) { (element) {
yearlyTimeSeriesData.add( yearlyTimeSeriesData.add(
TimeSeriesSales2( TimeSeriesSales2(
new DateTime(element.year, element.month, 1), DateTime(element.year!, element.month!, 1),
element.valueSum != null ? double.tryParse(element.valueSum.toString()) : 0.0, element.valueSum != null ? double.tryParse(element.valueSum.toString())! : 0.0,
), ),
); );
}, },
@ -497,7 +497,7 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
children: [ children: [
Utils.tableColumnValue( Utils.tableColumnValue(
'${DateUtil.getDayMonthYearDateFormatted( '${DateUtil.getDayMonthYearDateFormatted(
new DateTime(step.year, step.month, 1), new DateTime(step.year!, step.month!, 1),
)} ', )} ',
isCapitable: false, isCapitable: false,
mProjectViewModel: projectViewModel), mProjectViewModel: projectViewModel),
@ -527,7 +527,7 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
children: [ children: [
Utils.tableColumnValue( Utils.tableColumnValue(
'${DateUtil.getDayMonthYearDateFormatted( '${DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(step.machineDate), DateUtil.convertStringToDate(step.machineDate!),
)} ', )} ',
isCapitable: false, isCapitable: false,
mProjectViewModel: projectViewModel), mProjectViewModel: projectViewModel),
@ -557,7 +557,7 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
children: [ children: [
Utils.tableColumnValue( Utils.tableColumnValue(
'${DateUtil.getDayMonthYearDateFormatted( '${DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(step.machineDate), DateUtil.convertStringToDate(step.machineDate!),
)} ', )} ',
isCapitable: false, isCapitable: false,
mProjectViewModel: projectViewModel), mProjectViewModel: projectViewModel),

@ -17,8 +17,8 @@ import 'package:flutter_svg/svg.dart';
class VitalSignDetailsScreen extends StatelessWidget { class VitalSignDetailsScreen extends StatelessWidget {
static const String url = "assets/images/"; static const String url = "assets/images/";
int appointmentNo; int? appointmentNo;
int projectID; int? projectID;
bool isNotOneAppointment; bool isNotOneAppointment;
VitalSignDetailsScreen({this.appointmentNo, this.projectID, this.isNotOneAppointment = true}); VitalSignDetailsScreen({this.appointmentNo, this.projectID, this.isNotOneAppointment = true});
@ -44,7 +44,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
imagesInfo.add(ImagesInfo( imagesInfo.add(ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vital-signs/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vital-signs/ar/1.png')); imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vital-signs/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vital-signs/ar/1.png'));
return BaseView<VitalSignViewModel>( return BaseView<VitalSignViewModel>(
onModelReady: appointmentNo != null && projectID != null ? (model) => model.getPatientVitalSign(appointmentNo: appointmentNo, projectID: projectID) : (model) => model.getPatientVitalSign(), onModelReady: appointmentNo != null && projectID != null ? (model) => model.getPatientVitalSign(appointmentNo: appointmentNo, projectID: projectID!) : (model) => model.getPatientVitalSign(),
builder: (_, mode, widget) { builder: (_, mode, widget) {
initList(context, mode); initList(context, mode);
return AppScaffold( return AppScaffold(

@ -8,13 +8,13 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class VitalSignDetailsWidget extends StatefulWidget { class VitalSignDetailsWidget extends StatefulWidget {
final List<VitalSignResModel> vitalList; final List<VitalSignResModel>? vitalList;
final String title1; final String? title1;
final String title2; final String? title2;
final String viewKey; final String? viewKey;
VitalSignDetailsWidget( VitalSignDetailsWidget(
{Key key, this.vitalList, this.title1, this.title2, this.viewKey}); {Key? key, this.vitalList, this.title1, this.title2, this.viewKey});
@override @override
_VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState(); _VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState();
@ -39,7 +39,7 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
children: <Widget>[ children: <Widget>[
Table( Table(
border: TableBorder.symmetric( border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]), inside: BorderSide(width: 2.0, color: Colors.grey[300]!),
), ),
children: fullData(projectViewModel), children: fullData(projectViewModel),
), ),
@ -85,7 +85,7 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
height: 60), height: 60),
) )
])); ]));
widget.vitalList.forEach((vital) { widget.vitalList!.forEach((vital) {
var data = vital.toJson()[widget.viewKey]; var data = vital.toJson()[widget.viewKey];
if (data != 0) if (data != 0)
tableRow.add(TableRow(children: [ tableRow.add(TableRow(children: [
@ -95,7 +95,7 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
color: Colors.white, color: Colors.white,
child: Center( child: Center(
child: Texts( 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} ', '${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, textAlign: TextAlign.center,
), ),
), ),

@ -8,14 +8,14 @@ import 'package:flutter_svg/flutter_svg.dart';
class VitalSignItem extends StatelessWidget { class VitalSignItem extends StatelessWidget {
const VitalSignItem({ const VitalSignItem({
Key key, Key? key,
@required this.vitalSign, required this.vitalSign,
this.height, this.height,
this.width, this.width,
}) : super(key: key); }) : super(key: key);
final double height; final double? height;
final double width; final double? width;
final VitalSign vitalSign; final VitalSign vitalSign;
@override @override

@ -8,11 +8,11 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class VitalSignItemDetailsScreen extends StatelessWidget { class VitalSignItemDetailsScreen extends StatelessWidget {
final VitalSignDetails pageKey; final VitalSignDetails? pageKey;
final String pageTitle; final String pageTitle;
List<Map> VSchart; List<Map>? VSchart;
VitalSignItemDetailsScreen({this.vitalList, this.pageKey, this.pageTitle}); VitalSignItemDetailsScreen({required this.vitalList, this.pageKey, required this.pageTitle});
final List<VitalSignResModel> vitalList; final List<VitalSignResModel> vitalList;
@ -163,7 +163,7 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
showNewAppBar: true, showNewAppBar: true,
body: ListView( body: ListView(
children: VSchart.map((chartInfo) { children: VSchart!.map((chartInfo) {
var vitalListTemp = vitalList.where( var vitalListTemp = vitalList.where(
(element) => element.toJson()[chartInfo['viewKey']] != null, (element) => element.toJson()[chartInfo['viewKey']] != null,
); );

@ -14,12 +14,12 @@ import 'LineChartCurved.dart';
class VitalSingChartAndDetials extends StatefulWidget { class VitalSingChartAndDetials extends StatefulWidget {
VitalSingChartAndDetials({ VitalSingChartAndDetials({
Key key, Key? key,
@required this.vitalList, required this.vitalList,
@required this.name, required this.name,
@required this.viewKey, required this.viewKey,
@required this.title1, required this.title1,
@required this.title2, required this.title2,
}) : super(key: key); }) : super(key: key);
final List<VitalSignResModel> vitalList; final List<VitalSignResModel> vitalList;
@ -35,7 +35,7 @@ class VitalSingChartAndDetials extends StatefulWidget {
class _VitalSingChartAndDetialsState extends State<VitalSingChartAndDetials> { class _VitalSingChartAndDetialsState extends State<VitalSingChartAndDetials> {
List<TimeSeriesSales2> timeSeriesData = []; List<TimeSeriesSales2> timeSeriesData = [];
bool isExpended = true; bool isExpended = true;
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
@override @override
void initState() { void initState() {
@ -116,7 +116,7 @@ class _VitalSingChartAndDetialsState extends State<VitalSingChartAndDetials> {
TableRow( TableRow(
children: [ children: [
Utils.tableColumnValue( Utils.tableColumnValue(
"${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(labResultList[i].vitalSignDate.weekday) : DateUtil.getWeekDay(labResultList[i].vitalSignDate.weekday)}, ${labResultList[i].vitalSignDate.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(labResultList[i].vitalSignDate.month) : DateUtil.getMonth(labResultList[i].vitalSignDate.month)}, ${labResultList[i].vitalSignDate.year}", "${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(labResultList[i].vitalSignDate!.weekday) : DateUtil.getWeekDay(labResultList[i].vitalSignDate!.weekday)}, ${labResultList[i].vitalSignDate!.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(labResultList[i].vitalSignDate!.month) : DateUtil.getMonth(labResultList[i].vitalSignDate!.month)}, ${labResultList[i].vitalSignDate!.year}",
isLast: i == (labResultList.length - 1)), isLast: i == (labResultList.length - 1)),
Utils.tableColumnValue('${labResultList[i].toJson()[widget.viewKey]}', isLast: i == (labResultList.length - 1)), Utils.tableColumnValue('${labResultList[i].toJson()[widget.viewKey]}', isLast: i == (labResultList.length - 1)),
], ],
@ -134,7 +134,7 @@ class _VitalSingChartAndDetialsState extends State<VitalSingChartAndDetials> {
if (element.toJson()[widget.viewKey] != null && element.toJson()[widget.viewKey]?.toInt() != 0) if (element.toJson()[widget.viewKey] != null && element.toJson()[widget.viewKey]?.toInt() != 0)
timeSeriesData.add( timeSeriesData.add(
TimeSeriesSales2( TimeSeriesSales2(
new DateTime(element.vitalSignDate.year, element.vitalSignDate.month, element.vitalSignDate.day), DateTime(element.vitalSignDate!.year, element.vitalSignDate!.month, element.vitalSignDate!.day),
element.toJson()[widget.viewKey].toDouble(), element.toJson()[widget.viewKey].toDouble(),
), ),
); );

@ -12,14 +12,14 @@ import 'LineChartCurvedBloodPressure.dart';
class VitalSingChartBloodPressure extends StatelessWidget { class VitalSingChartBloodPressure extends StatelessWidget {
VitalSingChartBloodPressure({ VitalSingChartBloodPressure({
Key key, Key? key,
@required this.vitalList, required this.vitalList,
@required this.name, required this.name,
@required this.viewKey1, required this.viewKey1,
@required this.viewKey2, required this.viewKey2,
@required this.title1, required this.title1,
@required this.title2, required this.title2,
@required this.title3, required this.title3,
}) : super(key: key); }) : super(key: key);
final List<VitalSignResModel> vitalList; final List<VitalSignResModel> vitalList;
@ -31,7 +31,7 @@ class VitalSingChartBloodPressure extends StatelessWidget {
final String title3; final String title3;
List<TimeSeriesSales2> timeSeriesData1 = []; List<TimeSeriesSales2> timeSeriesData1 = [];
List<TimeSeriesSales2> timeSeriesData2 = []; List<TimeSeriesSales2> timeSeriesData2 = [];
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -112,7 +112,7 @@ class VitalSingChartBloodPressure extends StatelessWidget {
TableRow( TableRow(
children: [ children: [
Utils.tableColumnValue( Utils.tableColumnValue(
"${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(labResultList[i].vitalSignDate.weekday) : DateUtil.getWeekDay(labResultList[i].vitalSignDate.weekday)}, ${labResultList[i].vitalSignDate.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(labResultList[i].vitalSignDate.month) : DateUtil.getMonth(labResultList[i].vitalSignDate.month)}, ${labResultList[i].vitalSignDate.year}", "${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(labResultList[i].vitalSignDate!.weekday) : DateUtil.getWeekDay(labResultList[i].vitalSignDate!.weekday)}, ${labResultList[i].vitalSignDate!.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(labResultList[i].vitalSignDate!.month) : DateUtil.getMonth(labResultList[i].vitalSignDate!.month)}, ${labResultList[i].vitalSignDate!.year}",
isLast: i == (labResultList.length - 1)), isLast: i == (labResultList.length - 1)),
Utils.tableColumnValue('${labResultList[i].toJson()[viewKey1]}', isLast: i == (labResultList.length - 1)), Utils.tableColumnValue('${labResultList[i].toJson()[viewKey1]}', isLast: i == (labResultList.length - 1)),
Utils.tableColumnValue('${labResultList[i].toJson()[viewKey2]}', isLast: i == (labResultList.length - 1)), Utils.tableColumnValue('${labResultList[i].toJson()[viewKey2]}', isLast: i == (labResultList.length - 1)),
@ -131,14 +131,14 @@ class VitalSingChartBloodPressure extends StatelessWidget {
if (element.toJson()[viewKey1]?.toInt() != 0) if (element.toJson()[viewKey1]?.toInt() != 0)
timeSeriesData1.add( timeSeriesData1.add(
TimeSeriesSales2( TimeSeriesSales2(
new DateTime(element.vitalSignDate.year, element.vitalSignDate.month, element.vitalSignDate.day), new DateTime(element.vitalSignDate!.year, element.vitalSignDate!.month, element.vitalSignDate!.day),
element.toJson()[viewKey1].toDouble(), element.toJson()[viewKey1].toDouble(),
), ),
); );
if (element.toJson()[viewKey2]?.toInt() != 0) if (element.toJson()[viewKey2]?.toInt() != 0)
timeSeriesData2.add( timeSeriesData2.add(
TimeSeriesSales2( TimeSeriesSales2(
new DateTime(element.vitalSignDate.year, element.vitalSignDate.month, element.vitalSignDate.day), new DateTime(element.vitalSignDate!.year, element.vitalSignDate!.month, element.vitalSignDate!.day),
element.toJson()[viewKey2].toDouble(), element.toJson()[viewKey2].toDouble(),
), ),
); );

@ -19,7 +19,7 @@ class PackageOrderCompletedPage extends StatelessWidget {
String? subTitle; String? subTitle;
String? actionTitle; String? actionTitle;
PackageOrderCompletedPage({this.buttonWidth, this.buttonHeight, required this.heading, required this.title, required this.subTitle, this.actionTitle}); PackageOrderCompletedPage({this.buttonWidth, this.buttonHeight, this.heading, this.title, this.subTitle, this.actionTitle});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

@ -13,6 +13,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../Blood/new_text_Field.dart';
import '../base/base_view.dart'; import '../base/base_view.dart';
class MedicineSearch extends StatelessWidget { class MedicineSearch extends StatelessWidget {
@ -42,7 +43,7 @@ class MedicineSearch extends StatelessWidget {
), ),
child: Form( child: Form(
key: _formKey, key: _formKey,
child: TextFields( child: NewTextFields(
hintText: hintText:
TranslationBase.of(context).searchMedicineHere, TranslationBase.of(context).searchMedicineHere,
inputAction: TextInputAction.search, inputAction: TextInputAction.search,

@ -22,9 +22,9 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class CartOrderPage extends StatefulWidget { class CartOrderPage extends StatefulWidget {
final VoidCallbackAction? changeTab; final dynamic? changeTab;
const CartOrderPage({Key? key, this.changeTab}) : super(key: key); CartOrderPage({Key? key, this.changeTab}) : super(key: key);
@override @override
_CartOrderPageState createState() => _CartOrderPageState(); _CartOrderPageState createState() => _CartOrderPageState();

@ -12,6 +12,8 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../Blood/new_text_Field.dart';
class SearchBrandsPage extends StatefulWidget { class SearchBrandsPage extends StatefulWidget {
@override @override
_SearchBrandsPageState createState() => _SearchBrandsPageState(); _SearchBrandsPageState createState() => _SearchBrandsPageState();
@ -48,7 +50,7 @@ class _SearchBrandsPageState extends State<SearchBrandsPage> {
width: MediaQuery.of(context).size.width * 0.79, width: MediaQuery.of(context).size.width * 0.79,
child: Form( child: Form(
key: _formKey, key: _formKey,
child: TextFields( child: NewTextFields(
autoFocus: true, autoFocus: true,
hintText: TranslationBase.of(context).search, hintText: TranslationBase.of(context).search,
fontSize: 19.0, fontSize: 19.0,

@ -30,7 +30,7 @@ dynamic languageID;
class PharmacyProfilePage extends StatefulWidget { class PharmacyProfilePage extends StatefulWidget {
final bool moveToOrder; final bool moveToOrder;
final VoidCallbackAction? changeTab; final dynamic changeTab;
PharmacyProfilePage({required this.moveToOrder, this.changeTab}); PharmacyProfilePage({required this.moveToOrder, this.changeTab});

@ -18,6 +18,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'Blood/new_text_Field.dart';
import 'base/base_view.dart'; import 'base/base_view.dart';
import 'package:intl/intl.dart' as international; import 'package:intl/intl.dart' as international;
@ -58,7 +59,7 @@ class _SearchProductsPageState extends State<SearchProductsPage> {
width: MediaQuery.of(context).size.width * 0.70, width: MediaQuery.of(context).size.width * 0.70,
child: Form( child: Form(
key: _formKey, key: _formKey,
child: TextFields( child: NewTextFields(
autoFocus: true, autoFocus: true,
hintText: TranslationBase.of(context).search, hintText: TranslationBase.of(context).search,
fontSize: 14.5, fontSize: 14.5,

@ -40,9 +40,7 @@ class LocationUtils {
if (permission == LocationPermission.denied || permission == LocationPermission.deniedForever) { if (permission == LocationPermission.denied || permission == LocationPermission.deniedForever) {
if (Platform.isAndroid) { if (Platform.isAndroid) {
Utils.showPermissionConsentDialog(context, TranslationBase Utils.showPermissionConsentDialog(context, TranslationBase.of(context).locationPermissionDialog, () async {
.of(context)
.locationPermissionDialog, () async {
final hasPermission = await _handlePermission(); final hasPermission = await _handlePermission();
if (hasPermission) { if (hasPermission) {
Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.medium, timeLimit: Duration(seconds: 10)).then((value) { Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.medium, timeLimit: Duration(seconds: 10)).then((value) {
@ -54,9 +52,7 @@ class LocationUtils {
} }
}); });
} else { } else {
if (await Permission.location if (await Permission.location.request().isGranted) {
.request()
.isGranted) {
getCurrentLocation(callBack: callBack); getCurrentLocation(callBack: callBack);
} else { } else {
setZeroLocation(); setZeroLocation();
@ -122,7 +118,8 @@ class LocationUtils {
Location location = locationResult.lastLocation!; Location location = locationResult.lastLocation!;
locationService.removeLocationUpdatesCb(_locationUpdateCbId); locationService.removeLocationUpdatesCb(_locationUpdateCbId);
callBack(LatLng(location.latitude!, location.longitude!)); callBack(LatLng(location.latitude!, location.longitude!));
setLocation(Position( setLocation(
Position(
latitude: location.latitude!, latitude: location.latitude!,
longitude: location.longitude!, longitude: location.longitude!,
altitude: location.altitude!, altitude: location.altitude!,
@ -131,7 +128,11 @@ class LocationUtils {
heading: 0.0, heading: 0.0,
speed: 0.0, speed: 0.0,
speedAccuracy: 1, speedAccuracy: 1,
)); altitudeAccuracy: 0,
headingAccuracy: 0,
// Added by Aamir
),
);
}, onLocationAvailability: (locationAvailability) { }, onLocationAvailability: (locationAvailability) {
print("onLocationAvailability: $locationAvailability"); print("onLocationAvailability: $locationAvailability");
})); }));
@ -155,18 +156,10 @@ class LocationUtils {
showErrorLocationDialog(bool isPermissionError) { showErrorLocationDialog(bool isPermissionError) {
ConfirmDialog dialog = new ConfirmDialog( ConfirmDialog dialog = new ConfirmDialog(
context: context, context: context,
confirmMessage: TranslationBase confirmMessage: TranslationBase.of(context).locationDialogMessage,
.of(context) okText: TranslationBase.of(context).confirm,
.locationDialogMessage, cancelText: TranslationBase.of(context).cancel_nocaps,
okText: TranslationBase okFunction: () => {ConfirmDialog.closeAlertDialog(context), if (isPermissionError) Geolocator.openAppSettings() else Geolocator.openLocationSettings(), Navigator.of(context).canPop()},
.of(context)
.confirm,
cancelText: TranslationBase
.of(context)
.cancel_nocaps,
okFunction: () =>
{ConfirmDialog.closeAlertDialog(context), if (isPermissionError) Geolocator.openAppSettings() else
Geolocator.openLocationSettings(), Navigator.of(context).canPop()},
cancelFunction: () => {}); cancelFunction: () => {});
return dialog.showAlertDialog(context); return dialog.showAlertDialog(context);
} }

@ -10,7 +10,7 @@ import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
import 'package:huawei_map/huawei_map.dart' as hmsMap; import 'package:huawei_map/huawei_map.dart' as hmsMap;
class AppMap extends StatefulWidget { class AppMap extends StatefulWidget {
late VoidCallback onCameraMove; late dynamic onCameraMove;
late Map initialCamera; late Map initialCamera;
AppMapState? _state; AppMapState? _state;

@ -242,7 +242,7 @@ class _AppScaffoldState extends State<AppScaffold> {
dropDownList: widget.dropDownList! ?? [], dropDownList: widget.dropDownList! ?? [],
dropDownIndexChange: widget.dropDownIndexChange, dropDownIndexChange: widget.dropDownIndexChange,
appBarIcons: widget.appBarIcons!, appBarIcons: widget.appBarIcons!,
onTap: widget.onTap!, onTap:widget.onTap,
)) ))
: (widget.isShowAppBar! : (widget.isShowAppBar!
? widget.customAppBar != null ? widget.customAppBar != null
@ -338,6 +338,7 @@ class NewAppBarWidget extends StatelessWidget implements PreferredSizeWidget {
List<String>? dropDownList; List<String>? dropDownList;
final void Function(int?)? dropDownIndexChange; final void Function(int?)? dropDownIndexChange;
final List<Widget>? appBarIcons; final List<Widget>? appBarIcons;
VoidCallbackAction? onTap; VoidCallbackAction? onTap;
NewAppBarWidget({Key? key, this.showTitle = false, this.showDropDown = false, this.title = "", this.dropDownList, this.appBarIcons, this.dropdownIndexValue, this.dropDownIndexChange, this.onTap}) NewAppBarWidget({Key? key, this.showTitle = false, this.showDropDown = false, this.title = "", this.dropDownList, this.appBarIcons, this.dropdownIndexValue, this.dropDownIndexChange, this.onTap})

Loading…
Cancel
Save