diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 242c5995..35e7b332 100755 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -14,11 +14,12 @@ import 'package:doctor_app_flutter/utils/exception_report.dart'; import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:flutter/cupertino.dart'; import 'package:http/http.dart' as http; +import 'package:logger/logger.dart'; import 'package:provider/provider.dart'; import '../locator.dart'; import '../routes.dart'; - +import 'dart:developer'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); Utils helpers = new Utils(); @@ -132,8 +133,19 @@ class BaseAppClient { // print("ProjectID :"); // print(body['ProjectID']); - debugPrint("URL : $url"); - debugPrint("Body : ${json.encode(body)}"); + Logger logger = Logger( + printer: PrettyPrinter( + methodCount: 2, + errorMethodCount: 5, + lineLength: 1000, + colors: true, + printEmojis: true, + ), + ); + log("URL : $url"); + logger.d("URL : $url"); + log("Body : ${json.encode(body)}"); + logger.d("Body : ${json.encode(body)}"); var asd = json.encode(body); var asd2; if (await Utils.checkConnection()) { diff --git a/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart b/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart index 6382ce1f..c93a37b7 100644 --- a/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart +++ b/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart @@ -135,18 +135,18 @@ class PatientSickLeaveScreen extends StatelessWidget { ), Row( children: [ - ClipRRect( - borderRadius: BorderRadius.circular(50.0), - child: CachedNetworkImage( - imageUrl: item.doctorImageURL ?? "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", - height: 30, - width: 30, - errorWidget: (context, url, error) => AppText( - 'No Image', - fontSize: 10, - ), - ), - ), + // ClipRRect( + // borderRadius: BorderRadius.circular(50.0), + // child: CachedNetworkImage( + // imageUrl: item.doctorImageURL ?? "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + // height: 30, + // width: 30, + // errorWidget: (context, url, error) => AppText( + // 'No Image', + // fontSize: 10, + // ), + // ), + // ), SizedBox( width: 10, ), diff --git a/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart b/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart index 7be5c3d5..a361b814 100644 --- a/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart +++ b/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart @@ -163,60 +163,66 @@ class _DischargeSummaryWidgetState extends State { SizedBox( height: 5.0, ), - Container( - width: MediaQuery.of(context).size.width * 0.5, - child: RichText( - maxLines: 3, - overflow: TextOverflow.ellipsis, - text: new TextSpan( - style: new TextStyle(fontSize: 1.3 * SizeConfig.textMultiplier!, color: Color(0xFF575757)), - children: [ - new TextSpan( - text: TranslationBase.of(context).condition + ": ", - style: TextStyle( - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.8, - color: Color(0xFF575757), - //TranslationBase.of(context).doctorResponse + " : ", - )), - new TextSpan( - text: Utils.parseHtmlString(widget.dischargeSummary.conditionOnDischarge!), - style: TextStyle( - fontFamily: 'Poppins', - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3, - color: Color(0xFF2E303A), - fontWeight: FontWeight.w700, - )), - ], + Visibility( + visible: Utils.parseHtmlString(widget.dischargeSummary.conditionOnDischarge ?? "").isNotEmpty, + child: Container( + width: MediaQuery.of(context).size.width * 0.5, + child: RichText( + maxLines: 3, + overflow: TextOverflow.ellipsis, + text: new TextSpan( + style: new TextStyle(fontSize: 1.3 * SizeConfig.textMultiplier!, color: Color(0xFF575757)), + children: [ + new TextSpan( + text: TranslationBase.of(context).condition + ": ", + style: TextStyle( + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.8, + color: Color(0xFF575757), + //TranslationBase.of(context).doctorResponse + " : ", + )), + new TextSpan( + text: Utils.parseHtmlString(widget.dischargeSummary.conditionOnDischarge!), + style: TextStyle( + fontFamily: 'Poppins', + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3, + color: Color(0xFF2E303A), + fontWeight: FontWeight.w700, + )), + ], + ), ), ), ), SizedBox( height: 5.0, ), - Container( - width: MediaQuery.of(context).size.width * 0.5, - child: RichText( - maxLines: 3, - overflow: TextOverflow.ellipsis, - text: new TextSpan( - style: new TextStyle(fontSize: 1.3 * SizeConfig.textMultiplier!, color: Color(0xFF575757)), - children: [ - new TextSpan( - text: TranslationBase.of(context).planedProcedure + ": ", - style: TextStyle( - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.8, - color: Color(0xFF575757), - //TranslationBase.of(context).doctorResponse + " : ", - )), - new TextSpan( - text: Utils.parseHtmlString(widget.dischargeSummary.planedProcedure!), - style: TextStyle( - fontFamily: 'Poppins', - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3, - color: Color(0xFF2E303A), - fontWeight: FontWeight.w700, - )), - ], + Visibility( + visible: Utils.parseHtmlString(widget.dischargeSummary.planedProcedure ?? "").isNotEmpty, + child: Container( + width: MediaQuery.of(context).size.width * 0.5, + child: RichText( + maxLines: 3, + overflow: TextOverflow.ellipsis, + text: new TextSpan( + style: new TextStyle(fontSize: 1.3 * SizeConfig.textMultiplier!, color: Color(0xFF575757)), + children: [ + new TextSpan( + text: TranslationBase.of(context).planedProcedure + ": ", + style: TextStyle( + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.8, + color: Color(0xFF575757), + //TranslationBase.of(context).doctorResponse + " : ", + )), + new TextSpan( + text: Utils.parseHtmlString(widget.dischargeSummary.planedProcedure!), + style: TextStyle( + fontFamily: 'Poppins', + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3, + color: Color(0xFF2E303A), + fontWeight: FontWeight.w700, + )), + ], + ), ), ), ), diff --git a/pubspec.lock b/pubspec.lock index 3a3e313d..aaf98ac8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1029,6 +1029,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + logger: + dependency: "direct main" + description: + name: logger + sha256: a7967e31b703831a893bbc3c3dd11db08126fe5f369b5c648a36f821979f5be3 + url: "https://pub.dev" + source: hosted + version: "2.6.2" logging: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 74f668ad..fb5cd515 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -139,7 +139,7 @@ dependencies: dart_jsonwebtoken: ^2.14.0 two_dimensional_scrollables: ^0.3.3 timezone: ^0.10.1 - + logger: ^2.6.1 dependency_overrides: flutter_localizations: