From 3a8d8f9aa7456b2f25c2e047ec59682feea3de99 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Tue, 23 Nov 2021 14:58:26 +0200 Subject: [PATCH] fix the last errors --- .../not_replaied_doctor_questions.dart | 3 +- .../profile/UCAF/page-stepper-widget.dart | 2 +- .../line_chart_for_diabetic.dart | 6 +- .../patient_profile_screen.dart | 2 +- .../reschedule-leaves/reschedule_leave.dart | 182 +++++++++--------- pubspec.lock | 10 +- 6 files changed, 103 insertions(+), 102 deletions(-) diff --git a/lib/screens/doctor/doctor_replay/not_replaied_doctor_questions.dart b/lib/screens/doctor/doctor_replay/not_replaied_doctor_questions.dart index 1416e70a..743240e2 100644 --- a/lib/screens/doctor/doctor_replay/not_replaied_doctor_questions.dart +++ b/lib/screens/doctor/doctor_replay/not_replaied_doctor_questions.dart @@ -12,9 +12,8 @@ import 'package:flutter/material.dart'; import 'doctor_repaly_chat.dart'; class NotRepliedDoctorQuestions extends StatefulWidget { - final Function changeCurrentTab; - const NotRepliedDoctorQuestions({Key? key, required this.changeCurrentTab}) + const NotRepliedDoctorQuestions({Key? key}) : super(key: key); @override diff --git a/lib/screens/patients/profile/UCAF/page-stepper-widget.dart b/lib/screens/patients/profile/UCAF/page-stepper-widget.dart index a5b11fc0..8b85a492 100644 --- a/lib/screens/patients/profile/UCAF/page-stepper-widget.dart +++ b/lib/screens/patients/profile/UCAF/page-stepper-widget.dart @@ -16,7 +16,7 @@ class PageStepperWidget extends StatelessWidget { final int stepsCount; final int currentStepIndex; final Size screenSize; - final List stepsTitles; + final List ?stepsTitles; PageStepperWidget( {required this.stepsCount, diff --git a/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart b/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart index 914226fe..2298af4c 100644 --- a/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart +++ b/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart @@ -96,10 +96,10 @@ class LineChartForDiabetic extends StatelessWidget { titlesData: FlTitlesData( bottomTitles: SideTitles( showTitles: true, - getTextStyles: (value) => TextStyle( + getTextStyles: (context, value) { return TextStyle( color: Colors.black, fontSize: 10, - ), + );}, rotateAngle: -65, //rotateAngle:-65, interval: 100, @@ -124,7 +124,7 @@ class LineChartForDiabetic extends StatelessWidget { ), leftTitles: SideTitles( showTitles: true, - getTextStyles: (value) => TextStyle( + getTextStyles: (context, value) => TextStyle( color: Colors.black, fontWeight: FontWeight.bold, fontSize: 10, diff --git a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart index ffea7c78..0a9997e1 100644 --- a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart +++ b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart @@ -395,7 +395,7 @@ class _PatientProfileScreenState extends State with Single patient, model.startCallRes != null ? model.startCallRes - .isRecording + .isRecording! : true, callConnected, callDisconnected); diff --git a/lib/screens/reschedule-leaves/reschedule_leave.dart b/lib/screens/reschedule-leaves/reschedule_leave.dart index f7f2ee31..29795239 100644 --- a/lib/screens/reschedule-leaves/reschedule_leave.dart +++ b/lib/screens/reschedule-leaves/reschedule_leave.dart @@ -193,7 +193,7 @@ class _RescheduleLeaveScreen extends State { }, onChanged: (newValue) { setState(() { - offTime = newValue; + offTime = newValue.toString(); }); if (offTime == '1') { model2.getReasons(18); @@ -206,7 +206,7 @@ class _RescheduleLeaveScreen extends State { model2 .getReasons(102); setState(() { - offTime = newValue; + offTime = newValue.toString(); }); } }, @@ -564,94 +564,96 @@ class _RescheduleLeaveScreen extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( - mainAxisSize: MainAxisSize.max, - children: [ - if (model2.coveringDoctors.length > - 0) - Expanded( - // add Expanded to have your dropdown button fill remaining space - child: DropdownSearch( - mode: Mode.BOTTOM_SHEET, - - dropdownSearchDecoration: - InputDecoration( - contentPadding: - EdgeInsets.all(0), - border: - InputBorder.none), - //maxHeight: 300, - items: model2.coveringDoctors - .map((item) { - return projectsProvider - .isArabic - ? item['doctorNameN'] - : item['doctorName']; - }).toList(), - // label: "Doctor List", - onChanged: (item) { - model2.coveringDoctors - .forEach((newVal) => { - if (newVal[ - 'doctorName'] == - item) - doctorID = newVal[ - 'DoctorID'] - }); - }, - selectedItem: - getSelectedDoctor(model2), - showSearchBox: true, - searchBoxDecoration: - InputDecoration( - border: - OutlineInputBorder(), - contentPadding: - EdgeInsets.fromLTRB( - 12, 12, 8, 0), - labelText: "Search Doctor", - ), - popupTitle: Container( - height: 50, - decoration: BoxDecoration( - color: Theme.of(context) - .primaryColorDark, - borderRadius: - BorderRadius.only( - topLeft: - Radius.circular(20), - topRight: - Radius.circular(20), - ), - ), - child: Center( - child: Text( - '', - style: TextStyle( - fontSize: 24, - fontWeight: - FontWeight.bold, - color: Colors.white, - ), - ), - ), - ), - popupShape: - RoundedRectangleBorder( - borderRadius: - BorderRadius.only( - topLeft: - Radius.circular(24), - topRight: - Radius.circular(24), - ), - ), - ), - ) - else - SizedBox(), - ], - ) + /// TODO Elham*2 fix it + // Row( + // mainAxisSize: MainAxisSize.max, + // children: [ + // if (model2.coveringDoctors.length > + // 0) + // Expanded( + // // add Expanded to have your dropdown button fill remaining space + // child: DropdownSearch( + // mode: Mode.BOTTOM_SHEET, + // + // dropdownSearchDecoration: + // InputDecoration( + // contentPadding: + // EdgeInsets.all(0), + // border: + // InputBorder.none), + // //maxHeight: 300, + // items: model2.coveringDoctors + // .map((item) { + // return projectsProvider + // .isArabic + // ? item['doctorNameN'] + // : item['doctorName']; + // }).toList(), + // // label: "Doctor List", + // onChanged: (_item) { + // model2.coveringDoctors + // .forEach((newVal) => { + // if (newVal[ + // 'doctorName'] == + // _item) + // doctorID = newVal[ + // 'DoctorID'] + // }); + // }, + // selectedItem: + // getSelectedDoctor(model2), + // showSearchBox: true, + // // TODO Elham*2 fix + // // searchBoxDecoration: + // // InputDecoration( + // // border: + // // OutlineInputBorder(), + // // contentPadding: + // // EdgeInsets.fromLTRB( + // // 12, 12, 8, 0), + // // labelText: "Search Doctor", + // // ), + // popupTitle: Container( + // height: 50, + // decoration: BoxDecoration( + // color: Theme.of(context) + // .primaryColorDark, + // borderRadius: + // BorderRadius.only( + // topLeft: + // Radius.circular(20), + // topRight: + // Radius.circular(20), + // ), + // ), + // child: Center( + // child: Text( + // '', + // style: TextStyle( + // fontSize: 24, + // fontWeight: + // FontWeight.bold, + // color: Colors.white, + // ), + // ), + // ), + // ), + // popupShape: + // RoundedRectangleBorder( + // borderRadius: + // BorderRadius.only( + // topLeft: + // Radius.circular(24), + // topRight: + // Radius.circular(24), + // ), + // ), + // ), + // ) + // else + // SizedBox(), + // ], + // ) ], ), )), diff --git a/pubspec.lock b/pubspec.lock index 764ad2dd..972d2116 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -35,7 +35,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.8.1" autocomplete_textfield: dependency: "direct main" description: @@ -154,7 +154,7 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.1.0" charcode: dependency: transitive description: @@ -769,7 +769,7 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.12.10" meta: dependency: transitive description: @@ -1173,7 +1173,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.3" + version: "0.4.2" timing: dependency: transitive description: @@ -1257,7 +1257,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.0" video_player: dependency: transitive description: