code update in progress

merge-update-with-lab-changes
Sultan khan 2 years ago
parent 1c34843bc5
commit 0c534cffae

@ -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) {

@ -74,9 +74,8 @@ class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage
appMap = AppMap( appMap = AppMap(
cameraPosition.toMap() as Map<dynamic, dynamic>, cameraPosition.toMap() as Map<dynamic, dynamic>,
//Changed by Aamir //Changed by Aamir
onCameraMove: (camera) { onCameraMove: _updatePosition!,
_updatePosition(camera as CameraPosition);
},
onMapCreated: () { onMapCreated: () {
_getUserLocation(); _getUserLocation();
setState(() {}); setState(() {});
@ -233,9 +232,9 @@ class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage
))); )));
} }
void _updatePosition(CameraPosition _position) { void _updatePosition() {
latitude = _position.target.latitude; latitude = cameraPosition.target.latitude;
longitude = _position.target.longitude; longitude = cameraPosition.target.longitude;
selectedAddress.latLong = latitude.toString() + "," + longitude.toString(); selectedAddress.latLong = latitude.toString() + "," + longitude.toString();
} }

@ -54,7 +54,7 @@ class ToDo extends StatefulWidget {
late MyInAppBrowser browser; late MyInAppBrowser browser;
bool isShowAppBar = true; bool isShowAppBar = true;
Function? onBackClick; VoidCallbackAction? onBackClick;
ToDo({required this.isShowAppBar, this.onBackClick}); ToDo({required this.isShowAppBar, this.onBackClick});

@ -50,10 +50,10 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
showNewAppBarTitle: true, showNewAppBarTitle: true,
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(
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,

@ -13,7 +13,7 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class MedicalProfilePageNew extends StatefulWidget { class MedicalProfilePageNew extends StatefulWidget {
Function? onTap; VoidCallbackAction? onTap;
String? a; String? a;
MedicalProfilePageNew({this.onTap}); MedicalProfilePageNew({this.onTap});
@override @override

@ -19,9 +19,9 @@ class StepsTracker extends StatefulWidget {
} }
class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderStateMixin { class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderStateMixin {
TabController _tabController; TabController? _tabController;
ProjectViewModel projectViewModel; ProjectViewModel? projectViewModel;
int weeklyStatsAvgValue = 0; int weeklyStatsAvgValue = 0;
int monthlyStatsAvgValue = 0; int monthlyStatsAvgValue = 0;
@ -76,13 +76,13 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
unselectedLabelColor: Color(0xff575757), unselectedLabelColor: Color(0xff575757),
labelPadding: EdgeInsets.only(top: 0, bottom: 0, left: 20, right: 20), labelPadding: EdgeInsets.only(top: 0, bottom: 0, left: 20, right: 20),
labelStyle: TextStyle( labelStyle: TextStyle(
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', fontFamily: projectViewModel!.isArabic ? 'Cairo' : 'Poppins',
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: -0.48, letterSpacing: -0.48,
), ),
unselectedLabelStyle: TextStyle( unselectedLabelStyle: TextStyle(
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', fontFamily: projectViewModel!.isArabic ? 'Cairo' : 'Poppins',
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: -0.48, letterSpacing: -0.48,
@ -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.parse(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.parse(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), new DateTime(element.year!, element.month!, 1),
element.valueSum != null ? double.tryParse(element.valueSum.toString()) : 0.0, element.valueSum! != null ? double.parse(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,13 +8,13 @@ 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({this.vitalList, this.pageKey, this.pageTitle});
final List<VitalSignResModel> vitalList; final List<VitalSignResModel>? vitalList;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -157,20 +157,20 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
default: default:
} }
return AppScaffold( return AppScaffold(
appBarTitle: pageTitle, appBarTitle: pageTitle!,
isShowAppBar: true, isShowAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
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,
); );
if (vitalListTemp.length != 0 && chartInfo['viewKey'] == 'BloodPressure') { if (vitalListTemp.length != 0 && chartInfo['viewKey'] == 'BloodPressure') {
return VitalSingChartBloodPressure( return VitalSingChartBloodPressure(
vitalList: vitalList, vitalList: vitalList!,
name: projectViewModel.isArabic ? chartInfo['nameAr'] : chartInfo['name'], name: projectViewModel.isArabic ? chartInfo['nameAr'] : chartInfo['name'],
title1: chartInfo['title1'], title1: chartInfo['title1'],
title2: projectViewModel.isArabic ? chartInfo['title2Ar'] : chartInfo['title2'], title2: projectViewModel.isArabic ? chartInfo['title2Ar'] : chartInfo['title2'],
@ -182,7 +182,7 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
return vitalListTemp.length != 0 return vitalListTemp.length != 0
? VitalSingChartAndDetials( ? VitalSingChartAndDetials(
vitalList: vitalList, vitalList: vitalList!,
name: projectViewModel.isArabic ? chartInfo['nameAr'] : chartInfo['name'], name: projectViewModel.isArabic ? chartInfo['nameAr'] : chartInfo['name'],
title1: chartInfo['title1'], title1: chartInfo['title1'],
title2: projectViewModel.isArabic ? chartInfo['title2Ar'] : chartInfo['title2'], title2: projectViewModel.isArabic ? chartInfo['title2Ar'] : chartInfo['title2'],

@ -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; 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), new 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; 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) {

@ -37,262 +37,262 @@ class NumberTextInputFormatter extends TextInputFormatter {
final _mobileFormatter = NumberTextInputFormatter(); final _mobileFormatter = NumberTextInputFormatter();
// class TextFields extends StatefulWidget { class TextFields extends StatefulWidget {
// TextFields( TextFields(
// {Key? key, {Key? key,
// this.type, this.type,
// this.hintText, this.hintText,
// this.suffixIcon, this.suffixIcon,
// this.autoFocus, this.autoFocus,
// this.onChanged, this.onChanged,
// this.initialValue, this.initialValue,
// this.minLines, this.minLines,
// this.maxLines, this.maxLines,
// this.inputFormatters, this.inputFormatters,
// this.padding, this.padding,
// this.focus = false, this.focus = false,
// this.maxLengthEnforced = true, this.maxLengthEnforced = true,
// this.suffixIconColor, this.suffixIconColor,
// this.inputAction, this.inputAction,
// this.onSubmit, this.onSubmit,
// this.keepPadding = true, this.keepPadding = true,
// this.textCapitalization = TextCapitalization.none, this.textCapitalization = TextCapitalization.none,
// this.controller, this.controller,
// this.keyboardType, this.keyboardType,
// this.validator, this.validator,
// this.borderOnlyError = false, this.borderOnlyError = false,
// this.onSaved, this.onSaved,
// this.onSuffixTap, this.onSuffixTap,
// this.readOnly= false, this.readOnly= false,
// this.maxLength, this.maxLength,
// this.prefixIcon, this.prefixIcon,
// this.bare = false, this.bare = false,
// this.onTap, this.onTap,
// this.fontSize = 16.0, this.fontSize = 16.0,
// this.fontWeight = FontWeight.w700, this.fontWeight = FontWeight.w700,
// this.fillColor, this.fillColor,
// this.hintColor}) this.hintColor})
// : super(key: key); : super(key: key);
//
// final String? hintText; final String? hintText;
// final String? initialValue; final String? initialValue;
// final String? type; final String? type;
// final bool? autoFocus; final bool? autoFocus;
// final IconData? suffixIcon; final IconData? suffixIcon;
// final Color? suffixIconColor; final Color? suffixIconColor;
// final Icon? prefixIcon; final Icon? prefixIcon;
// final VoidCallback? onTap; final VoidCallback? onTap;
// final TextEditingController? controller; final TextEditingController? controller;
// final TextInputType? keyboardType; final TextInputType? keyboardType;
// final FormFieldValidator? validator; final FormFieldValidator? validator;
// final Function? onSaved; final Function(String?)? onSaved;
// final Function? onSuffixTap; final VoidCallback? onSuffixTap;
// final Function? onChanged; final Function(String?)? onChanged;
// final Function? onSubmit; final Function(String?)? onSubmit;
// final bool? readOnly; final bool? readOnly;
// final int? maxLength; final int? maxLength;
// final int? minLines; final int? minLines;
// final int? maxLines; final int? maxLines;
// final bool? maxLengthEnforced; final bool? maxLengthEnforced;
// final bool? bare; final bool? bare;
// final TextInputAction? inputAction; final TextInputAction? inputAction;
// final double? fontSize; final double? fontSize;
// final FontWeight? fontWeight; final FontWeight? fontWeight;
// final bool? keepPadding; final bool? keepPadding;
// final TextCapitalization? textCapitalization; final TextCapitalization? textCapitalization;
// final List<TextInputFormatter>? inputFormatters; final List<TextInputFormatter>? inputFormatters;
// final EdgeInsets? padding; final EdgeInsets? padding;
// final bool? focus; final bool? focus;
// final bool? borderOnlyError; final bool? borderOnlyError;
// final Color? hintColor; final Color? hintColor;
// final Color? fillColor; final Color? fillColor;
//
// @override @override
// _TextFieldsState createState() => _TextFieldsState(); _TextFieldsState createState() => _TextFieldsState();
// } }
//
// class _TextFieldsState extends State<TextFields> { class _TextFieldsState extends State<TextFields> {
// final FocusNode _focusNode = FocusNode(); final FocusNode _focusNode = FocusNode();
// bool? focus = false; bool? focus = false;
// bool? view = false; bool? view = false;
//
// @override @override
// void initState() { void initState() {
// super.initState(); super.initState();
// _focusNode.addListener(() { _focusNode.addListener(() {
// setState(() { setState(() {
// focus = _focusNode.hasFocus; focus = _focusNode.hasFocus;
// }); });
// }); });
// } }
//
// @override @override
// void didUpdateWidget(TextFields oldWidget) { void didUpdateWidget(TextFields oldWidget) {
// if (widget.focus != null) _focusNode.requestFocus(); if (widget.focus != null) _focusNode.requestFocus();
// super.didUpdateWidget(oldWidget); super.didUpdateWidget(oldWidget);
// } }
//
// @override @override
// void dispose() { void dispose() {
// _focusNode.dispose(); _focusNode.dispose();
// super.dispose(); super.dispose();
// } }
//
// Widget _buildSuffixIcon() { Widget _buildSuffixIcon() {
// switch (widget.type) { switch (widget.type) {
// case "password": case "password":
// return Padding( return Padding(
// padding: const EdgeInsets.only(right: 8.0), padding: const EdgeInsets.only(right: 8.0),
// child: view! child: view!
// ? InkWell( ? InkWell(
// onTap: () { onTap: () {
// this.setState( this.setState(
// () { () {
// view = false; view = false;
// }, },
// ); );
// }, },
// child: Icon( child: Icon(
// Icons.remove_red_eye_sharp, Icons.remove_red_eye_sharp,
// size: 24.0, size: 24.0,
// color: Color.fromRGBO(78, 62, 253, 1.0), color: Color.fromRGBO(78, 62, 253, 1.0),
// ), ),
// ) )
// : InkWell( : InkWell(
// onTap: () { onTap: () {
// this.setState(() { this.setState(() {
// view = true; view = true;
// }); });
// }, },
// child: Icon(Icons.remove_red_eye_sharp, child: Icon(Icons.remove_red_eye_sharp,
// size: 24.0, color: Colors.grey[500]), size: 24.0, color: Colors.grey[500]),
// ), ),
// ); );
// default: default:
// if (widget.suffixIcon != null) if (widget.suffixIcon != null)
// return InkWell( return InkWell(
// onTap: widget.onSuffixTap, onTap: widget.onSuffixTap,
// child: Icon(widget.suffixIcon, child: Icon(widget.suffixIcon,
// size: 22.0, size: 22.0,
// color: widget.suffixIconColor != null color: widget.suffixIconColor != null
// ? widget.suffixIconColor ? widget.suffixIconColor
// : Colors.grey[500]), : Colors.grey[500]),
// ); );
// else else
// return null; return SizedBox();
// } }
// } }
//
// bool _determineReadOnly() { bool _determineReadOnly() {
// if (widget.readOnly != null && widget.readOnly!) { if (widget.readOnly != null && widget.readOnly!) {
// _focusNode.unfocus(); _focusNode.unfocus();
// return true; return true;
// } else { } else {
// return false; return false;
// } }
// } }
//
// @override @override
// Widget build(BuildContext context) { Widget build(BuildContext context) {
// return (AnimatedContainer( return (AnimatedContainer(
// duration: Duration(milliseconds: 300), duration: Duration(milliseconds: 300),
// decoration: widget.bare! decoration: widget.bare!
// ? null ? null
// : BoxDecoration(boxShadow: [ : BoxDecoration(boxShadow: [
// // BoxShadow( // BoxShadow(
// // color: Color.fromRGBO(70, 68, 167, focus ? 0.20 : 0), // color: Color.fromRGBO(70, 68, 167, focus ? 0.20 : 0),
// // offset: Offset(0.0, 13.0), // offset: Offset(0.0, 13.0),
// // blurRadius: focus ? 34.0 : 12.0) // blurRadius: focus ? 34.0 : 12.0)
// BoxShadow( BoxShadow(
// color: Color.fromRGBO(110, 68, 80, focus ? 0.20 : 0), color: Color.fromRGBO(110, 68, 80, focus! ? 0.20 : 0),
// offset: Offset(0.0, 13.0), offset: Offset(0.0, 13.0),
// blurRadius: focus ? 34.0 : 12.0) blurRadius: focus! ? 34.0 : 12.0)
// ]), ]),
// child: TextFormField( child: TextFormField(
// keyboardAppearance: Theme.of(context).brightness, keyboardAppearance: Theme.of(context).brightness,
// scrollPhysics: BouncingScrollPhysics(), scrollPhysics: BouncingScrollPhysics(),
// textCapitalization: widget.textCapitalization, textCapitalization: widget.textCapitalization!,
// onFieldSubmitted: widget.inputAction == TextInputAction.next onFieldSubmitted: widget.inputAction! == TextInputAction.next!
// ? (widget.onSubmit != null ? (widget.onSubmit! != null
// ? widget.onSubmit ? widget.onSubmit!
// : (val) { : (val) {
// _focusNode.nextFocus(); _focusNode.nextFocus!();
// }) })
// : widget.onSubmit, : widget.onSubmit!,
// textInputAction: widget.inputAction, textInputAction: widget.inputAction,
// minLines: widget.minLines ?? 1, minLines: widget.minLines ?? 1,
// maxLines: widget.maxLines ?? 1, maxLines: widget.maxLines ?? 1,
// // maxLengthEnforcement: widget.maxLengthEnforced, // maxLengthEnforcement: widget.maxLengthEnforced,
// initialValue: widget.initialValue, initialValue: widget.initialValue,
// onChanged: widget.onChanged, onChanged: widget.onChanged!,
// focusNode: _focusNode, focusNode: _focusNode,
// maxLength: widget.maxLength ?? null, maxLength: widget.maxLength ?? null,
// controller: widget.controller, controller: widget.controller,
// keyboardType: widget.keyboardType, keyboardType: widget.keyboardType,
// readOnly: _determineReadOnly(), readOnly: _determineReadOnly(),
// obscureText: widget.type == "password" && !view ? true : false, obscureText: widget.type == "password" && !view! ? true : false,
// autofocus: widget.autoFocus ?? false, autofocus: widget.autoFocus ?? false,
// validator: widget.validator, validator: widget.validator,
// onSaved: widget.onSaved, onSaved: widget.onSaved,
// style: Theme.of(context) style: Theme.of(context)
// .textTheme .textTheme
// .bodyText1 .bodyText1!
// .copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight), .copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight),
// inputFormatters: widget.keyboardType == TextInputType.phone inputFormatters: widget.keyboardType == TextInputType.phone
// ? <TextInputFormatter>[ ? <TextInputFormatter>[
// FilteringTextInputFormatter.digitsOnly, FilteringTextInputFormatter.digitsOnly,
// _mobileFormatter, _mobileFormatter,
// ] ]
// : widget.inputFormatters, : widget.inputFormatters,
// decoration: InputDecoration( decoration: InputDecoration(
// counterText: "", counterText: "",
// hintText: widget.hintText, hintText: widget.hintText,
// hintStyle: TextStyle( hintStyle: TextStyle(
// fontSize: widget.fontSize, fontSize: widget.fontSize,
// fontWeight: widget.fontWeight, fontWeight: widget.fontWeight,
// color: widget.hintColor ?? Theme.of(context).hintColor, color: widget.hintColor ?? Theme.of(context).hintColor,
// ), ),
// contentPadding: widget.padding != null contentPadding: widget.padding != null
// ? widget.padding ? widget.padding
// : EdgeInsets.symmetric( : EdgeInsets.symmetric(
// vertical: (widget.bare && !widget.keepPadding) ? 0.0 : 10.0, vertical: (widget.bare! && !widget.keepPadding!) ? 0.0 : 10.0,
// horizontal: 16.0), horizontal: 16.0),
// filled: true, filled: true,
// fillColor: widget.bare fillColor: widget.bare!
// ? Colors.transparent ? Colors.transparent
// : Theme.of(context).backgroundColor, : Theme.of(context).backgroundColor,
// suffixIcon: _buildSuffixIcon(), suffixIcon: _buildSuffixIcon(),
// prefixIcon: widget.prefixIcon, prefixIcon: widget.prefixIcon,
// errorStyle: TextStyle( errorStyle: TextStyle(
// fontSize: 14.0, fontSize: 14.0,
// fontWeight: widget.fontWeight, fontWeight: widget.fontWeight,
// height: widget.borderOnlyError ? 0.0 : null), height: widget.borderOnlyError! ? 0.0 : null),
// errorBorder: OutlineInputBorder( errorBorder: OutlineInputBorder(
// borderSide: BorderSide( borderSide: BorderSide(
// color: Theme.of(context) color: Theme.of(context)
// .errorColor .errorColor
// .withOpacity(widget.bare ? 0.0 : 0.5), .withOpacity(widget.bare! ? 0.0 : 0.5),
// width: 1.0), width: 1.0),
// borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)), borderRadius: BorderRadius.circular(widget.bare! ? 0.0 : 8.0)),
// focusedErrorBorder: OutlineInputBorder( focusedErrorBorder: OutlineInputBorder(
// borderSide: BorderSide( borderSide: BorderSide(
// color: Theme.of(context) color: Theme.of(context)
// .errorColor .errorColor
// .withOpacity(widget.bare ? 0.0 : 0.5), .withOpacity(widget.bare! ? 0.0 : 0.5),
// width: 1.0), width: 1.0),
// borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)), borderRadius: BorderRadius.circular(widget.bare! ? 0.0 : 8.0)),
// focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
// borderSide: BorderSide(color: Colors.grey, width: 1.0), borderSide: BorderSide(color: Colors.grey, width: 1.0),
// borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)), borderRadius: BorderRadius.circular(widget.bare! ? 0.0 : 8.0)),
// disabledBorder: OutlineInputBorder( disabledBorder: OutlineInputBorder(
// borderSide: BorderSide(color: Colors.grey, width: 1.0), borderSide: BorderSide(color: Colors.grey, width: 1.0),
// borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)), borderRadius: BorderRadius.circular(widget.bare! ? 0.0 : 8.0)),
// enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
// borderSide: BorderSide(color: Colors.grey, width: 1.0), borderSide: BorderSide(color: Colors.grey, width: 1.0),
// borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0), borderRadius: BorderRadius.circular(widget.bare! ? 0.0 : 8.0),
// ), ),
// ), ),
// ), ),
// )); ));
// } }
// } }

@ -76,7 +76,7 @@ class AppScaffold extends StatefulWidget {
final int? dropdownIndexValue; final int? dropdownIndexValue;
List<String>? dropDownList; List<String>? dropDownList;
final void Function(int?)? dropDownIndexChange; final void Function(int?)? dropDownIndexChange;
final Function? onTap; final VoidCallbackAction? onTap;
final bool isMainPharmacyPages; final bool isMainPharmacyPages;
final bool extendBody; final bool extendBody;
final ValueChanged<int>? changeCurrentTab; final ValueChanged<int>? changeCurrentTab;

Loading…
Cancel
Save