diff --git a/assets/images/femaleIcon.svg b/assets/images/femaleIcon.svg new file mode 100644 index 00000000..c08fc259 --- /dev/null +++ b/assets/images/femaleIcon.svg @@ -0,0 +1,18 @@ + + + + + + + + + + diff --git a/assets/images/profile.svg b/assets/images/profile.svg new file mode 100644 index 00000000..02b2dc19 --- /dev/null +++ b/assets/images/profile.svg @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/assets/images/user_female.svg b/assets/images/user_female.svg new file mode 100644 index 00000000..4c9d8cd2 --- /dev/null +++ b/assets/images/user_female.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/assets/images/user_male.svg b/assets/images/user_male.svg new file mode 100644 index 00000000..bdf4987f --- /dev/null +++ b/assets/images/user_male.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 10164c4b..28c30e90 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -12,7 +12,7 @@ import 'package:http/http.dart'; *@Date:28/5/2020 *@param: url, onSuccess callBack, onFailure callBack *@return: - *@desc: convert DateTime to data formatted + *@desc: */ class BaseAppClient { static Client client = HttpInterceptor().getClient(); diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index d945e38d..87bc84a2 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -12,6 +12,7 @@ import 'package:doctor_app_flutter/models/patient/patient_model.dart'; import 'package:doctor_app_flutter/models/patient/topten_users_res_model.dart'; import 'package:doctor_app_flutter/providers/patients_provider.dart'; import 'package:doctor_app_flutter/routes.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; @@ -20,13 +21,13 @@ import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.d import 'package:doctor_app_flutter/widgets/shared/profile_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import '../../config/size_config.dart'; import 'package:hexcolor/hexcolor.dart'; import '../../widgets/shared/app_scaffold_widget.dart'; import '../../widgets/shared/card_with_bg_widget.dart'; - import 'package:doctor_app_flutter/config/config.dart'; class PatientsScreen extends StatefulWidget { @@ -45,6 +46,10 @@ class _PatientsScreenState extends State { Color sideColor = Colors.black; List responseModelList; List responseModelList2; + final String url = "assets/images/"; + final String avatarMale = "user_male.svg"; //'working_male.svg';//'user.svg'; + final String avatarFemale = 'user_female.svg'; + final String assetName = 'assets/image.svg'; // List _locations = ['Today', 'Old Date', 'YESTERDAY']; List _locations = ['Today', 'Tomorrow', 'Next Week']; @@ -372,12 +377,31 @@ class _PatientsScreenState extends State { mainAxisAlignment: MainAxisAlignment .start, - children: [ - Image.network( - "https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png", - height: 100, - width: 100), - ], + children: + item.genderDescription == + "Male" + ? [ + SvgPicture.asset( + url + + avatarMale, + height: + 100.0, + width: + 100.0, + semanticsLabel: + 'Male Logo') + ] + : [ + SvgPicture.asset( + url + + avatarFemale, + height: + 100.0, + width: + 100.0, + semanticsLabel: + 'Female Logo') + ], ), Column( crossAxisAlignment: diff --git a/lib/widgets/patients/vital_sign_details_wideget.dart b/lib/widgets/patients/vital_sign_details_wideget.dart new file mode 100644 index 00000000..35e85699 --- /dev/null +++ b/lib/widgets/patients/vital_sign_details_wideget.dart @@ -0,0 +1,118 @@ +import 'package:doctor_app_flutter/models/patient/vital_sign_res_model.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; +import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +class VitalSignDetailsWidget extends StatefulWidget { + final List vitalList; + final String title1; + final String title2; + final String viewKey; + + VitalSignDetailsWidget({Key key, this.vitalList, this.title1, this.title2,this.viewKey}); + + @override + _VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState(); +} + +class _VitalSignDetailsWidgetState extends State { + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + color: Colors.transparent, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(10.0), + ), + ), + margin: EdgeInsets.all(20), + child: Container( + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Expanded( + child: Container( + decoration: BoxDecoration( + color: Hexcolor('#515B5D'), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(10.0), + ), + ), + child: Center( + child: Texts( + widget.title1, + color: Colors.white, + ), + ), + height: 60, + ), + ), + Expanded( + child: Container( + decoration: BoxDecoration( + color: Hexcolor('#515B5D'), + borderRadius: BorderRadius.only( + topRight: Radius.circular(10.0), + ), + ), + child: Center( + child: Texts(widget.title2, color: Colors.white), + ), + height: 60), + ), + ], + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: widget.vitalList.map((vital) { + return Column( + children: [ + Row( + children: [ + Expanded( + child: Container( + height: 50, + color: Colors.white, + child: Center( + child: Texts( + '${Helpers.getWeekDay(vital.vitalSignDate.weekday)}, ${vital.vitalSignDate.day} ${Helpers.getMonth(vital.vitalSignDate.month)}, ${vital.vitalSignDate.year} ', + textAlign: TextAlign.center, + ), + ), + ), + ), + SizedBox( + width: 2, + ), + Expanded( + child: Container( + height: 50, + color: Colors.white, + child: Center( + child: Texts( + '${vital.toJson()[widget.viewKey]}', + textAlign: TextAlign.center, + ), + ), + ), + ), + ], + ), + SizedBox( + height: 2, + ), + ], + ); + }).toList(), + ), + ], + ), + ), + ); + } +} diff --git a/pubspec.lock b/pubspec.lock index 7cf1a612..afe0aa60 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -277,6 +277,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.7" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + url: "https://pub.dartlang.org" + source: hosted + version: "0.17.4" flutter_test: dependency: "direct dev" description: flutter @@ -462,6 +469,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.6.4" + path_drawing: + dependency: transitive + description: + name: path_drawing + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" pedantic: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index df33348e..4336bacd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -37,7 +37,7 @@ dependencies: url_launcher: ^5.4.5 charts_flutter: ^0.9.0 eva_icons_flutter: ^2.0.0 - + # Qr code Scanner barcode_scan: ^3.0.1 # permissions @@ -49,6 +49,8 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.2 + # SVG + flutter_svg: ^0.17.4 percent_indicator: "^2.1.1" dev_dependencies: