diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 51b33a46..fdd8f424 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -14,7 +14,8 @@ + android:roundIcon="@mipmap/ic_launcher_round" + android:label="Doctors app"> + + + + \ No newline at end of file diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 00000000..036d09bc --- /dev/null +++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index db77bb4b..11e35ed2 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..a032e3d4 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 00000000..4d0b9bac Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-ldpi/ic_launcher.png b/android/app/src/main/res/mipmap-ldpi/ic_launcher.png new file mode 100644 index 00000000..675dfb3a Binary files /dev/null and b/android/app/src/main/res/mipmap-ldpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index 17987b79..13a8a4aa 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..12301f4a Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 00000000..bf0d6d1d Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 09d43914..caf1fc21 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..d3ae924e Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 00000000..e7d996be Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index d5f1c8d3..f0ba70b5 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..9133b963 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..9605dda8 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 4d6372ee..0fce1189 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..67f0120e Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..de8b067e Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/values/ic_launcher_background.xml b/android/app/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 00000000..ab983282 --- /dev/null +++ b/android/app/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #ffffff + \ No newline at end of file diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json index d36b1fab..e83c3bf5 100644 --- a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,122 +1,128 @@ { - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" + "images":[ + { + "idiom":"iphone", + "size":"20x20", + "scale":"2x", + "filename":"Icon-App-20x20@2x.png" + }, + { + "idiom":"iphone", + "size":"20x20", + "scale":"3x", + "filename":"Icon-App-20x20@3x.png" + }, + { + "idiom":"iphone", + "size":"29x29", + "scale":"1x", + "filename":"Icon-App-29x29@1x.png" + }, + { + "idiom":"iphone", + "size":"29x29", + "scale":"2x", + "filename":"Icon-App-29x29@2x.png" + }, + { + "idiom":"iphone", + "size":"29x29", + "scale":"3x", + "filename":"Icon-App-29x29@3x.png" + }, + { + "idiom":"iphone", + "size":"40x40", + "scale":"2x", + "filename":"Icon-App-40x40@2x.png" + }, + { + "idiom":"iphone", + "size":"40x40", + "scale":"3x", + "filename":"Icon-App-40x40@3x.png" + }, + { + "idiom":"iphone", + "size":"60x60", + "scale":"2x", + "filename":"Icon-App-60x60@2x.png" + }, + { + "idiom":"iphone", + "size":"60x60", + "scale":"3x", + "filename":"Icon-App-60x60@3x.png" + }, + { + "idiom":"iphone", + "size":"76x76", + "scale":"2x", + "filename":"Icon-App-76x76@2x.png" + }, + { + "idiom":"ipad", + "size":"20x20", + "scale":"1x", + "filename":"Icon-App-20x20@1x.png" + }, + { + "idiom":"ipad", + "size":"20x20", + "scale":"2x", + "filename":"Icon-App-20x20@2x.png" + }, + { + "idiom":"ipad", + "size":"29x29", + "scale":"1x", + "filename":"Icon-App-29x29@1x.png" + }, + { + "idiom":"ipad", + "size":"29x29", + "scale":"2x", + "filename":"Icon-App-29x29@2x.png" + }, + { + "idiom":"ipad", + "size":"40x40", + "scale":"1x", + "filename":"Icon-App-40x40@1x.png" + }, + { + "idiom":"ipad", + "size":"40x40", + "scale":"2x", + "filename":"Icon-App-40x40@2x.png" + }, + { + "idiom":"ipad", + "size":"76x76", + "scale":"1x", + "filename":"Icon-App-76x76@1x.png" + }, + { + "idiom":"ipad", + "size":"76x76", + "scale":"2x", + "filename":"Icon-App-76x76@2x.png" + }, + { + "idiom":"ipad", + "size":"83.5x83.5", + "scale":"2x", + "filename":"Icon-App-83.5x83.5@2x.png" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "scale" : "1x", + "filename" : "ItunesArtwork@2x.png" + } + ], + "info":{ + "version":1, + "author":"easyappicon" } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } } diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada47..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png index 28c6bf03..a506606c 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png index 2ccbfd96..002322b4 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png index f091b6b0..c4197e69 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png index 4cde1211..61d2e737 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png index d0ef06e7..3c9f4819 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png index dcdc2306..5b6d4029 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png index 2ccbfd96..002322b4 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png index c8f9ed8f..049de742 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png index a6d6b860..f47f5fa2 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png index a6d6b860..f47f5fa2 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png index 75b2d164..1f53454b 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png index c4df70d3..9a3d0236 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png index 6a84f41e..cbec330f 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png index d0e1f585..832249a6 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png new file mode 100644 index 00000000..b51b90aa Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png differ diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index cec5693c..240f235f 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -386,6 +386,7 @@ const Map> localizedValues = { 'bmiHealthy': {'en': "Healthy", 'ar': 'صحي'}, 'bmiOverWeight': {'en': "OverWeight", 'ar': 'فوق الوزن'}, 'bmiObese': {'en': "Obese", 'ar': 'سمين'}, + 'bmiObeseExtreme': {'en': "Extreme Obese", 'ar': 'سمنة مفرطة'}, 'method': {'en': "Method", 'ar': 'الطريقة'}, 'pulseBeats': {'en': 'Pulse(beats/minute)', 'ar': ' (دقة/دقيقة)النبض'}, 'rhythm': {'en': "Rhythm", 'ar': 'الإيقاع'}, diff --git a/lib/core/service/base/base_service.dart b/lib/core/service/base/base_service.dart index c97fdea9..719b1465 100644 --- a/lib/core/service/base/base_service.dart +++ b/lib/core/service/base/base_service.dart @@ -50,10 +50,12 @@ class BaseService { onSuccess: (dynamic response, int statusCode) { patientArrivalList.clear(); - response['patientArrivalList']['entityList'].forEach((v) { - PatiantInformtion item = PatiantInformtion.fromJson(v); - patientArrivalList.add(item); - }); + if(response['patientArrivalList']['entityList'] != null){ + response['patientArrivalList']['entityList'].forEach((v) { + PatiantInformtion item = PatiantInformtion.fromJson(v); + patientArrivalList.add(item); + }); + } }, onFailure: (String error, int statusCode) { hasError = true; diff --git a/lib/core/viewModel/patient-vital-sign-viewmodel.dart b/lib/core/viewModel/patient-vital-sign-viewmodel.dart index 0a51f7f5..652bfed7 100644 --- a/lib/core/viewModel/patient-vital-sign-viewmodel.dart +++ b/lib/core/viewModel/patient-vital-sign-viewmodel.dart @@ -101,14 +101,16 @@ class VitalSignsViewModel extends BaseViewModel { int getBMIStatus() { var bodyMassIndex = double.parse(bodyMax); - if (bodyMassIndex <= 18.5) { + if (bodyMassIndex < 18.5) { return 1; - } else if (bodyMassIndex <= 25.0) { + } else if (bodyMassIndex >= 18.5 && bodyMassIndex <= 24.9) { return 2; - } else if (bodyMassIndex <= 30) { + } else if (bodyMassIndex >= 25 && bodyMassIndex <= 29.9) { return 3; - } else { + } else if (bodyMassIndex >= 30 && bodyMassIndex <= 34.9) { return 4; + } else { + return 5; } } diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index b645100d..8714aaf8 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -1386,7 +1386,7 @@ class DashboardItem extends StatelessWidget { height: height != null ? height : MediaQuery.of(context).orientation == Orientation.portrait - ? MediaQuery.of(context).size.height * 0.16 + ? MediaQuery.of(context).size.height * 0.18 : MediaQuery.of(context).size.height * 0.36, decoration: BoxDecoration( color: !hasBorder diff --git a/lib/screens/medical-file/medical_file_details.dart b/lib/screens/medical-file/medical_file_details.dart index b52fabed..1e2bc1f8 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/patient_profile_screen.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -73,6 +74,8 @@ class _MedicalFileDetailsState extends State { builder: (BuildContext context, MedicalFileViewModel model, Widget child) => AppScaffold( + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patient.patientType.toString(), patient.arrivedOn), isShowAppBar: true, appBarTitle: TranslationBase.of(context).medicalReport.toUpperCase(), body: NetworkBaseView( @@ -82,8 +85,8 @@ class _MedicalFileDetailsState extends State { child: Container( child: Column( children: [ - PatientProfileHeaderNewDesign(patient, - patient.patientType.toString(), patient.arrivedOn), + // PatientProfileHeaderNewDesign(patient, + // patient.patientType.toString(), patient.arrivedOn), model.medicalFileList.length != 0 && model .medicalFileList[0] @@ -488,28 +491,62 @@ class _MedicalFileDetailsState extends State { FontWeight .w700, ), - AppText( - model - .medicalFileList[ - 0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[ - 0] - .consulations[ - 0] - .lstAssessments[ - index] - .condition - .trim(), + Expanded( + child: AppText( + model + .medicalFileList[ + 0] + .entityList[ + 0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[ + 0] + .lstAssessments[ + index] + .condition + .trim(), + ), ), ], ), + Row( + children: [ + Expanded( + child: AppText( + model + .medicalFileList[ + 0] + .entityList[ + 0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[ + 0] + .lstAssessments[ + index] + .description, + fontWeight: + FontWeight + .w700, + ), + ) + ], + ), Row( children: [ AppText( - model + 'Type: ', + fontWeight: + FontWeight + .w700, + ), + Expanded( + child: AppText(model .medicalFileList[ 0] .entityList[0] @@ -521,33 +558,8 @@ class _MedicalFileDetailsState extends State { 0] .lstAssessments[ index] - .description, - fontWeight: - FontWeight - .w700, - ) - ], - ), - Row( - children: [ - AppText( - 'Type: ', - fontWeight: - FontWeight - .w700, + .type), ), - AppText(model - .medicalFileList[ - 0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[ - 0] - .consulations[0] - .lstAssessments[ - index] - .type), ], ), SizedBox( diff --git a/lib/screens/medical-file/medical_file_page.dart b/lib/screens/medical-file/medical_file_page.dart index 5f53c2b9..c5ef8bf8 100644 --- a/lib/screens/medical-file/medical_file_page.dart +++ b/lib/screens/medical-file/medical_file_page.dart @@ -10,9 +10,12 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -36,6 +39,8 @@ class _MedicalFilePageState extends State { builder: (BuildContext context, MedicalFileViewModel model, Widget child) => AppScaffold( + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patientType.toString() ?? "0", patientType), isShowAppBar: true, appBarTitle: TranslationBase.of(context).medicalReport.toUpperCase(), body: NetworkBaseView( @@ -48,8 +53,8 @@ class _MedicalFilePageState extends State { // ? MainAxisAlignment.start // : MainAxisAlignment.center, children: [ - PatientProfileHeaderNewDesign( - patient, patient.patientType.toString(), arrivalType), + // PatientProfileHeaderNewDesign( + // patient, patient.patientType.toString(), arrivalType), Padding( padding: EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0), @@ -92,181 +97,215 @@ class _MedicalFilePageState extends State { itemCount: model.medicalFileList[0].entityList[0] .timelines.length, itemBuilder: (BuildContext ctxt, int index) { - return Padding( - padding: EdgeInsets.symmetric( - horizontal: 12.0, vertical: 8.0), - child: InkWell( - child: Container( - width: double.infinity, - margin: EdgeInsets.only( - top: 10, left: 10, right: 10), - padding: EdgeInsets.all(8.0), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(10.0), - ), - border: Border.all( - color: Colors.grey[200], width: 0.5), - ), - child: Column( - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .doctorName, - fontWeight: FontWeight.w700, - fontSize: 17.0, - fontFamily: 'Poppins', - ) - ], - ), - Row( - children: [ - AppText( - Helpers.convertStringToDate(model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .date) - .day - .toString() + - "/", - ), - AppText( - Helpers.convertStringToDate(model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .date) - .month - .toString() + - "/", - ), - AppText( - Helpers.convertStringToDate( - model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .date) - .year - .toString(), - ), - ], - ) - ], - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - ClipRRect( - borderRadius: - BorderRadius.all( - Radius.circular(30)), - child: Image.network( - 'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg', - fit: BoxFit.cover, - width: 60, - height: 70, - ), - ), - ], - ), - ), - Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Row( - children: [ - AppText( - TranslationBase.of(context) - .clinic + - ": ", - ), - AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .clinicName, - fontWeight: FontWeight.w600, - ), - ], - ), - Row( - mainAxisAlignment: - MainAxisAlignment - .spaceBetween, - children: [ - AppText( - TranslationBase.of(context) - .branch + - ": ", - ), - AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .projectName, - fontWeight: FontWeight.w600, - ), - ], - ), - ], - ), - ], - ), - Row( - mainAxisAlignment: - MainAxisAlignment.end, - children: [ - Column( - children: [ - Icon( - Icons.remove_red_eye, - size: 30.0, - ) - ], - ) - ], - ), - ], - ), + return InkWell( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => MedicalFileDetails( + age: patient.age, + firstName: patient.firstName, + lastName: patient.lastName, + gender: patient.genderDescription, + encounterNumber: index, + pp: patient.patientId, + patient: patient, + )), + ); + }, + child: DoctorCard( + doctorName: model.medicalFileList[0] + .entityList[0].timelines[index].doctorName, + clinic: model.medicalFileList[0].entityList[0] + .timelines[index].clinicName, + branch: model.medicalFileList[0].entityList[0] + .timelines[index].projectName, + profileUrl: + 'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg', + appointmentDate: + DateUtils.getDateTimeFromServerFormat( + model.medicalFileList[0].entityList[0] + .timelines[index].date, ), - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - MedicalFileDetails( - age: patient.age, - firstName: patient.firstName, - lastName: patient.lastName, - gender: patient.genderDescription, - encounterNumber: index, - pp: patient.patientId, - patient: patient, - )), - ); - }, + isPrescriptions: true, ), ); + + // return Padding( + // padding: EdgeInsets.symmetric( + // horizontal: 12.0, vertical: 8.0), + // child: InkWell( + // child: Container( + // width: double.infinity, + // margin: EdgeInsets.only( + // top: 10, left: 10, right: 10), + // padding: EdgeInsets.all(8.0), + // decoration: BoxDecoration( + // color: Colors.white, + // borderRadius: BorderRadius.all( + // Radius.circular(10.0), + // ), + // border: Border.all( + // color: Colors.grey[200], width: 0.5), + // ), + // child: Column( + // children: [ + // Row( + // mainAxisAlignment: + // MainAxisAlignment.spaceBetween, + // children: [ + // Row( + // children: [ + // AppText( + // model + // .medicalFileList[0] + // .entityList[0] + // .timelines[index] + // .doctorName, + // fontWeight: FontWeight.w700, + // fontSize: 17.0, + // fontFamily: 'Poppins', + // ) + // ], + // ), + // Row( + // children: [ + // AppText( + // Helpers.convertStringToDate(model + // .medicalFileList[0] + // .entityList[0] + // .timelines[index] + // .date) + // .day + // .toString() + + // "/", + // ), + // AppText( + // Helpers.convertStringToDate(model + // .medicalFileList[0] + // .entityList[0] + // .timelines[index] + // .date) + // .month + // .toString() + + // "/", + // ), + // AppText( + // Helpers.convertStringToDate( + // model + // .medicalFileList[0] + // .entityList[0] + // .timelines[index] + // .date) + // .year + // .toString(), + // ), + // ], + // ) + // ], + // ), + // Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // children: [ + // Padding( + // padding: const EdgeInsets.all(8.0), + // child: Column( + // children: [ + // ClipRRect( + // borderRadius: + // BorderRadius.all( + // Radius.circular(30)), + // child: Image.network( + // 'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg', + // fit: BoxFit.cover, + // width: 60, + // height: 70, + // ), + // ), + // ], + // ), + // ), + // Column( + // crossAxisAlignment: + // CrossAxisAlignment.start, + // children: [ + // Row( + // children: [ + // AppText( + // TranslationBase.of(context) + // .clinic + + // ": ", + // ), + // AppText( + // model + // .medicalFileList[0] + // .entityList[0] + // .timelines[index] + // .clinicName, + // fontWeight: FontWeight.w600, + // ), + // ], + // ), + // Row( + // mainAxisAlignment: + // MainAxisAlignment + // .spaceBetween, + // children: [ + // AppText( + // TranslationBase.of(context) + // .branch + + // ": ", + // ), + // AppText( + // model + // .medicalFileList[0] + // .entityList[0] + // .timelines[index] + // .projectName, + // fontWeight: FontWeight.w600, + // ), + // ], + // ), + // ], + // ), + // ], + // ), + // Row( + // mainAxisAlignment: + // MainAxisAlignment.end, + // children: [ + // Column( + // children: [ + // Icon( + // Icons.remove_red_eye, + // size: 30.0, + // ) + // ], + // ) + // ], + // ), + // ], + // ), + // ), + // onTap: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => + // MedicalFileDetails( + // age: patient.age, + // firstName: patient.firstName, + // lastName: patient.lastName, + // gender: patient.genderDescription, + // encounterNumber: index, + // pp: patient.patientId, + // patient: patient, + // )), + // ); + // }, + // ), + // ); }) : Column( children: [ diff --git a/lib/screens/patients/profile/lab_result/labs_home_page.dart b/lib/screens/patients/profile/lab_result/labs_home_page.dart index bdc001fb..23f40f06 100644 --- a/lib/screens/patients/profile/lab_result/labs_home_page.dart +++ b/lib/screens/patients/profile/lab_result/labs_home_page.dart @@ -66,7 +66,7 @@ class LabsHomePage extends StatelessWidget { ], ), ), - if (patientType != null && patientType == '7') + if (patientType != null && patientType == '7' && patient.patientStatusType == 43) InkWell( onTap: () { addSelectedLabOrder(context, model, patient); diff --git a/lib/screens/patients/profile/radiology/radiology_details_page.dart b/lib/screens/patients/profile/radiology/radiology_details_page.dart index 72d75f89..6b54dec7 100644 --- a/lib/screens/patients/profile/radiology/radiology_details_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_details_page.dart @@ -48,7 +48,7 @@ class RadiologyDetailsPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( - + margin: EdgeInsets.all(8), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(12), @@ -62,17 +62,19 @@ class RadiologyDetailsPage extends StatelessWidget { Padding( padding: const EdgeInsets.all(8.0), child: Texts( - '${finalRadiology.reportData}', + '${finalRadiology.reportData.trim()}', textAlign: TextAlign.start, fontSize: 17, color: Colors.grey, ), ), SizedBox(height: 25,), + if(model.radImageURL.isNotEmpty) Center( child: Container( width: MediaQuery.of(context).size.width * 0.8, child: Button( + color: Colors.red, onTap: () { launch(model.radImageURL); diff --git a/lib/screens/patients/profile/radiology/radiology_home_page.dart b/lib/screens/patients/profile/radiology/radiology_home_page.dart index 51330bb1..27c58e99 100644 --- a/lib/screens/patients/profile/radiology/radiology_home_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_home_page.dart @@ -62,7 +62,7 @@ class RadiologyHomePage extends StatelessWidget { ], ), ), - if (patientType != null && patientType == '7') + if (patientType != null && patientType == '7' && patient.patientStatusType == 43) InkWell( onTap: () { addSelectedRadiologyOrder(context, model, patient); diff --git a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart index 3c2197f3..d828ec23 100644 --- a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart @@ -73,7 +73,7 @@ class MyReferralDetailScreen extends StatelessWidget { Expanded( child: AppText( (Helpers.capitalize(model.patientArrivalList[0].patientDetails.fullName)), - fontSize: SizeConfig.textMultiplier * 3, + fontSize: SizeConfig.textMultiplier * 2.5, fontWeight: FontWeight.bold, backGroundcolor: Colors.white, fontFamily: 'Poppins', @@ -139,12 +139,15 @@ class MyReferralDetailScreen extends StatelessWidget { referredOn: pendingReferral.referredOn, patientInfo: pendingReferral, ), - SizedBox( - child: ProfileMedicalInfoWidgetSearch( - patient: model.patientArrivalList[0], - patientType: "7", - from: null, - to: null, + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: SizedBox( + child: ProfileMedicalInfoWidgetSearch( + patient: model.patientArrivalList[0], + patientType: "7", + from: null, + to: null, + ), ), ), ], diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart index ffe08225..f43975ec 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart @@ -72,7 +72,7 @@ class VitalSignDetailsScreen extends StatelessWidget { ), ), Container( - height: MediaQuery.of(context).size.height * 0.21, + height: MediaQuery.of(context).size.height * 0.23, width: double.infinity, padding: EdgeInsets.all(12.0), margin: EdgeInsets.symmetric(horizontal: 16.0), @@ -114,16 +114,16 @@ class VitalSignDetailsScreen extends StatelessWidget { AppText( "${TranslationBase.of(context).bmiUnderWeight}", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.4, + fontSize: SizeConfig.textMultiplier * 1.15, color: mode.getBMIStatus() == 1 ? Color(0XFFD02127) : null, fontWeight: FontWeight.w700, ), AppText( - "(1-10)", + "(<18.5)", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.4, + fontSize: SizeConfig.textMultiplier * 1.15, color: mode.getBMIStatus() == 1 ? Color(0XFFD02127) : null, @@ -145,19 +145,21 @@ class VitalSignDetailsScreen extends StatelessWidget { const SizedBox( height: 4, ), - AppText( - "${TranslationBase.of(context).bmiHealthy}", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.4, - fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 2 - ? Color(0XFFD02127) - : null, + Container( + child: AppText( + "${TranslationBase.of(context).normal}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.15, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 2 + ? Color(0XFFD02127) + : null, + ), ), AppText( - "(11-20)", + "(18.5-24.9)", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.4, + fontSize: SizeConfig.textMultiplier * 1.15, fontWeight: FontWeight.w700, color: mode.getBMIStatus() == 2 ? Color(0XFFD02127) @@ -182,16 +184,16 @@ class VitalSignDetailsScreen extends StatelessWidget { AppText( "${TranslationBase.of(context).bmiOverWeight}", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.4, + fontSize: SizeConfig.textMultiplier * 1.155, fontWeight: FontWeight.w700, color: mode.getBMIStatus() == 3 ? Color(0XFFD02127) : null, ), AppText( - "(21-30)", + "(25-29.9)", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.4, + fontSize: SizeConfig.textMultiplier * 1.155, fontWeight: FontWeight.w700, color: mode.getBMIStatus() == 3 ? Color(0XFFD02127) @@ -201,38 +203,75 @@ class VitalSignDetailsScreen extends StatelessWidget { )), Expanded( child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - mode.getBMIStatus() != 4 - ? '${assetBasePath}Obese_BMI.png' - : '${assetBasePath}Obese_BMI-r.png', - height: - MediaQuery.of(context).size.height * 0.10, - ), - const SizedBox( - height: 4, - ), - AppText( - "${TranslationBase.of(context).bmiObese}", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.4, - fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 4 - ? Color(0XFFD02127) - : null, - ), - AppText( - "(31-40>)", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.4, - fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 4 - ? Color(0XFFD02127) - : null, - ), - ], - )), + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + mode.getBMIStatus() != 4 + ? '${assetBasePath}Obese_BMI.png' + : '${assetBasePath}Obese_BMI-r.png', + height: + MediaQuery.of(context).size.height * 0.10, + ), + const SizedBox( + height: 4, + ), + AppText( + "${TranslationBase.of(context).bmiObese}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.15, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 4 + ? Color(0XFFD02127) + : null, + ), + AppText( + "(30-34.9)", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.15, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 4 + ? Color(0XFFD02127) + : null, + ), + ], + )), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + mode.getBMIStatus() != 5 + ? '${assetBasePath}Obese_BMI.png' + : '${assetBasePath}Obese_BMI-r.png', + height: + MediaQuery.of(context).size.height * 0.10, + ), + const SizedBox( + height: 4, + ), + FittedBox( + fit: BoxFit.fitWidth, + child: AppText( + "${TranslationBase.of(context).bmiObeseExtreme} fdsd", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.15, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 4 + ? Color(0XFFD02127) + : null, + ), + ), + AppText( + "(35<)", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.15, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 4 + ? Color(0XFFD02127) + : null, + ), + ], + )), ], ) ], diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_item.dart b/lib/screens/patients/profile/vital_sign/vital_sign_item.dart index e99e7bad..e838affa 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_item.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_item.dart @@ -50,17 +50,19 @@ class VitalSignItem extends StatelessWidget { AppText( "$lastVal", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.6, + fontSize: SizeConfig.textMultiplier * 1.4, fontWeight: FontWeight.w800, margin: 0, ), - AppText( - "$unit", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.3, - fontWeight: FontWeight.w700, - color: HexColor('#B8382C'), - margin: 0, + Expanded( + child: AppText( + "$unit", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.2, + fontWeight: FontWeight.w700, + color: HexColor('#B8382C'), + margin: 0, + ), ), ], ), @@ -85,7 +87,7 @@ class VitalSignItem extends StatelessWidget { child: AppText( "$des", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.5, + fontSize: SizeConfig.textMultiplier * 1.3, fontWeight: FontWeight.w600, ), ), diff --git a/lib/screens/prescription/prescription_items_page.dart b/lib/screens/prescription/prescription_items_page.dart index 0a26a708..fa665aff 100644 --- a/lib/screens/prescription/prescription_items_page.dart +++ b/lib/screens/prescription/prescription_items_page.dart @@ -11,6 +11,7 @@ import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_head import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/dialogs/ShowImageDialog.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -74,11 +75,21 @@ class PrescriptionItemsPage extends StatelessWidget { ), height: 55, width: 55, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Image.network( - model.prescriptionReportList[index].imageSRCUrl, - fit: BoxFit.cover, + child: InkWell( + onTap: (){ + showDialog( + context: context, + child: ShowImageDialog( + imageUrl: model.prescriptionReportEnhList[index].imageSRCUrl, + ) + ); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.network( + model.prescriptionReportList[index].imageSRCUrl, + fit: BoxFit.cover, + ), ), ), ), @@ -141,12 +152,22 @@ class PrescriptionItemsPage extends StatelessWidget { ), height: 55, width: 55, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Image.network( - model.prescriptionReportEnhList[index].imageSRCUrl, - fit: BoxFit.cover, + child: InkWell( + onTap: (){ + showDialog( + context: context, + child: ShowImageDialog( + imageUrl: model.prescriptionReportEnhList[index].imageSRCUrl, + ) + ); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.network( + model.prescriptionReportEnhList[index].imageSRCUrl, + fit: BoxFit.cover, + ), ), ), ), @@ -190,3 +211,6 @@ class PrescriptionItemsPage extends StatelessWidget { ); } } + + + diff --git a/lib/screens/prescription/prescriptions_page.dart b/lib/screens/prescription/prescriptions_page.dart index 478d364b..0c33c6e5 100644 --- a/lib/screens/prescription/prescriptions_page.dart +++ b/lib/screens/prescription/prescriptions_page.dart @@ -60,7 +60,7 @@ class PrescriptionsPage extends StatelessWidget { ], ), ), - if (patientType != null && patientType == '7') + if (patientType != null && patientType == '7' && patient.patientStatusType == 43) InkWell( onTap: () { addPrescriptionForm( diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 09bc7e06..389c35f3 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -661,6 +661,7 @@ class TranslationBase { String get bmiOverWeight => localizedValues['bmiOverWeight'][locale.languageCode]; String get bmiObese => localizedValues['bmiObese'][locale.languageCode]; + String get bmiObeseExtreme => localizedValues['bmiObeseExtreme'][locale.languageCode]; String get method => localizedValues['method'][locale.languageCode]; diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart index ca8d6a4e..195f6447 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart @@ -44,11 +44,8 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred onPressed: () => Navigator.pop(context), ), AppText( - (Helpers.capitalize(patient.firstName) + - " " + - Helpers.capitalize( - patient.lastName)), - fontSize: SizeConfig.textMultiplier * 3, + patient.firstName!=null? (Helpers.capitalize(patient.firstName) + " " + Helpers.capitalize(patient.lastName)):'', + fontSize: SizeConfig.textMultiplier * 2.5, fontWeight: FontWeight.bold, backGroundcolor: Colors.white, fontFamily: 'Poppins', diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design.dart b/lib/widgets/patients/profile/patient-profile-header-new-design.dart index 93069432..de0302a2 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design.dart @@ -41,16 +41,18 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { color: Colors.black, //Colors.black, onPressed: () => Navigator.pop(context), ), - AppText( - patient.firstName != null ? - (Helpers.capitalize(patient.firstName) + - " " + - Helpers.capitalize( - patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), - fontSize: SizeConfig.textMultiplier * 3, - fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, - fontFamily: 'Poppins', + Expanded( + child: AppText( + patient.firstName != null ? + (Helpers.capitalize(patient.firstName) + + " " + + Helpers.capitalize( + patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), + fontSize: SizeConfig.textMultiplier *2.5, + fontWeight: FontWeight.bold, + backGroundcolor: Colors.white, + fontFamily: 'Poppins', + ), ), patient.gender == 1 ? Icon( diff --git a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart index 7a499010..274d2264 100644 --- a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart +++ b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart @@ -69,7 +69,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre " " + Helpers.capitalize( patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), - fontSize: SizeConfig.textMultiplier * 3, + fontSize: SizeConfig.textMultiplier * 2.5, fontWeight: FontWeight.bold, backGroundcolor: Colors.white, fontFamily: 'Poppins', @@ -369,7 +369,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre '${TranslationBase.of(context).dr}$doctorName', color: Colors.black, fontWeight: FontWeight.w600, - fontSize: 14, + fontSize: 12, ), if (orderNo != null && !isPrescriptions) Row( @@ -377,10 +377,10 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre Texts( 'Order No: ', color: Colors.grey[800], - fontSize: 14 + fontSize: 12 ), Texts( - orderNo ?? '',fontSize: 14 + orderNo ?? '',fontSize: 12 ) ], ), @@ -390,11 +390,11 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre Texts( 'Invoice: ', color: Colors.grey[800], - fontSize: 14 + fontSize: 12 ), Texts( invoiceNO, - fontSize: 14 + fontSize: 12 ) ], ), @@ -404,11 +404,11 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre Texts( 'Branch: ', color: Colors.grey[800], - fontSize: 14 + fontSize: 12 ), Texts( branch?? '', - fontSize: 14 + fontSize: 12 ) ], ), @@ -418,25 +418,25 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre Texts( 'Clinic: ', color: Colors.grey[800], - fontSize: 14 + fontSize: 12 ), Texts( clinic?? '', - fontSize: 14 + fontSize: 12 ) ], ), Row( children: [ - Texts( - !isPrescriptions? 'Result Date: ': 'Prescriptions Date ', - color: Colors.grey[800], - fontSize: 14, - ), Expanded( child: Texts( - '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}',fontSize: 14, + !isPrescriptions? 'Result Date: ': 'Prescriptions Date ', + color: Colors.grey[800], + fontSize: 12, ), + ), + Texts( + '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}',fontSize: 14, ) ], ) @@ -495,5 +495,5 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre } @override - Size get preferredSize => Size(double.maxFinite,270); + Size get preferredSize => Size(double.maxFinite,290); } diff --git a/lib/widgets/shared/app_scaffold_widget.dart b/lib/widgets/shared/app_scaffold_widget.dart index 81fc59e8..60aa5415 100644 --- a/lib/widgets/shared/app_scaffold_widget.dart +++ b/lib/widgets/shared/app_scaffold_widget.dart @@ -25,7 +25,10 @@ class AppScaffold extends StatelessWidget { this.body, this.isLoading = false, this.isShowAppBar = true, - this.baseViewModel, this.bottomSheet, this.backgroundColor, this.appBar}); + this.baseViewModel, + this.bottomSheet, + this.backgroundColor, + this.appBar}); @override Widget build(BuildContext context) { @@ -36,30 +39,35 @@ class AppScaffold extends StatelessWidget { FocusScope.of(context).requestFocus(new FocusNode()); }, child: Scaffold( - backgroundColor: backgroundColor??Colors.white, + backgroundColor: backgroundColor ?? Colors.white, appBar: isShowAppBar - ? appBar ?? AppBar( - elevation: 0, - backgroundColor: HexColor('#515B5D'), - textTheme: TextTheme(headline6: TextStyle(color: Colors.white)), - title: Text(appBarTitle.toUpperCase()), - leading: Builder(builder: (BuildContext context) { - return IconButton( - icon: Icon(Icons.arrow_back_ios), - color: Colors.white, //Colors.black, - onPressed: () => Navigator.pop(context), - ); - }), - centerTitle: true, - actions: [ - IconButton( - icon: Icon(DoctorApp.home_icon_active), - color: Colors.white, //Colors.black, - onPressed: () => Navigator.pushNamedAndRemoveUntil( - context, HOME, (r) => false), - ), - ], - ) + ? appBar ?? + AppBar( + elevation: 0, + backgroundColor: Colors.white, //HexColor('#515B5D'), + textTheme: TextTheme( + headline6: TextStyle( + color: Colors.black87, + fontSize: 16.8, + )), + title: Text(appBarTitle.toUpperCase()), + leading: Builder(builder: (BuildContext context) { + return IconButton( + icon: Icon(Icons.arrow_back_ios), + color: Colors.black, //Colors.black, + onPressed: () => Navigator.pop(context), + ); + }), + centerTitle: true, + actions: [ + IconButton( + icon: Icon(DoctorApp.home_icon_active), + color: Colors.black, //Colors.black, + onPressed: () => Navigator.pushNamedAndRemoveUntil( + context, HOME, (r) => false), + ), + ], + ) : null, bottomSheet: bottomSheet, body: projectProvider.isInternetConnection diff --git a/lib/widgets/shared/dialogs/ShowImageDialog.dart b/lib/widgets/shared/dialogs/ShowImageDialog.dart new file mode 100644 index 00000000..302366b7 --- /dev/null +++ b/lib/widgets/shared/dialogs/ShowImageDialog.dart @@ -0,0 +1,26 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class ShowImageDialog extends StatelessWidget { + final String imageUrl; + + const ShowImageDialog({Key key, this.imageUrl}) : super(key: key); + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Container( + width: 340, + height: 340, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12) + ), + child: Image.network( + imageUrl, + fit: BoxFit.fill, + ), + ) + ], + ); + } +} \ No newline at end of file diff --git a/lib/widgets/shared/doctor_card.dart b/lib/widgets/shared/doctor_card.dart index 9cb1ab21..9ba055fc 100644 --- a/lib/widgets/shared/doctor_card.dart +++ b/lib/widgets/shared/doctor_card.dart @@ -105,9 +105,11 @@ class DoctorCard extends StatelessWidget { Texts( 'order No:', color: Colors.grey[500], + fontSize: 14, ), Texts( orderNo ?? '', + fontSize: 14, ) ], ), @@ -116,10 +118,12 @@ class DoctorCard extends StatelessWidget { children: [ Texts( 'Invoice:', + fontSize: 14, color: Colors.grey[500], ), Texts( invoiceNO, + fontSize: 14, ) ], ), @@ -129,9 +133,11 @@ class DoctorCard extends StatelessWidget { Texts( 'Clinic: ', color: Colors.grey[500], + fontSize: 14, ), Texts( clinic, + fontSize: 14, ) ], ), @@ -140,10 +146,12 @@ class DoctorCard extends StatelessWidget { children: [ Texts( 'Branch: ', + fontSize: 14, color: Colors.grey[500], ), Texts( branch, + fontSize: 14, ) ], ) diff --git a/lib/widgets/shared/drawer_item_widget.dart b/lib/widgets/shared/drawer_item_widget.dart index fefea780..248123a6 100644 --- a/lib/widgets/shared/drawer_item_widget.dart +++ b/lib/widgets/shared/drawer_item_widget.dart @@ -35,13 +35,13 @@ class _DrawerItemState extends State { color: widget.color ?? Colors.black87, size: SizeConfig.imageSizeMultiplier * 5, ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - width: MediaQuery.of(context).size.width *0.45, - child: Expanded( + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + width: MediaQuery.of(context).size.width *0.45, child: AppText( widget.title, marginLeft: 5, @@ -52,15 +52,15 @@ class _DrawerItemState extends State { fontWeight: FontWeight.bold, ), ), - ), - AppText( - widget.subTitle, - visibility: !widget.subTitle.isNullOrEmpty(), - color: widget.color ?? Colors.black, - marginLeft: 5, - fontSize: SizeConfig.textMultiplier * 2.5, - ), - ], + AppText( + widget.subTitle, + visibility: !widget.subTitle.isNullOrEmpty(), + color: widget.color ?? Colors.black, + marginLeft: 5, + fontSize: SizeConfig.textMultiplier * 2.5, + ), + ], + ), ), ], )); diff --git a/pubspec.lock b/pubspec.lock index e15e02c9..46eca7cf 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -608,7 +608,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.4" + version: "1.3.0-nullsafety.3" mime: dependency: transitive description: @@ -900,7 +900,7 @@ packages: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.2" + version: "1.10.0-nullsafety.1" stream_channel: dependency: transitive description: @@ -1084,5 +1084,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=2.10.0 <=2.11.0-213.1.beta" + dart: ">=2.10.0 <2.11.0" flutter: ">=1.22.0 <2.0.0"