From ea2a635925dc976091a72cb9b9e70e5dc5147268 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Sun, 13 Jun 2021 12:48:30 +0300 Subject: [PATCH] hot fix --- lib/client/base_app_client.dart | 28 ++++++++++--------- lib/core/viewModel/project_view_model.dart | 2 +- lib/widgets/shared/app_loader_widget.dart | 1 - pubspec.lock | 31 +++++++++------------- pubspec.yaml | 2 +- 5 files changed, 29 insertions(+), 35 deletions(-) diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index e2de1f86..5d55c03e 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -33,20 +33,22 @@ class BaseAppClient { try { Map profile = await sharedPref.getObj(DOCTOR_PROFILE); String token = await sharedPref.getString(TOKEN); - DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); - if (body['DoctorID'] == null) body['DoctorID'] = doctorProfile?.doctorID; - if (body['DoctorID'] == "") body['DoctorID'] = null; - if (body['EditedBy'] == null) body['EditedBy'] = doctorProfile?.doctorID; - if (body['ProjectID'] == null) { - body['ProjectID'] = doctorProfile?.projectID; - } + DoctorProfileModel ? doctorProfile = DoctorProfileModel.fromJson(profile); + if (doctorProfile!=null) { + if (body['DoctorID'] == null) body['DoctorID'] = doctorProfile.doctorID; + if (body['DoctorID'] == "") body['DoctorID'] = null; + if (body['EditedBy'] == null) body['EditedBy'] = doctorProfile.doctorID; + if (body['ProjectID'] == null) { + body['ProjectID'] = doctorProfile?.projectID; + } - if (body['ClinicID'] == null) body['ClinicID'] = doctorProfile?.clinicID; - if (body['DoctorID'] == '') { - body['DoctorID'] = null; - } - if (body['EditedBy'] == '') { - body.remove("EditedBy"); + if (body['ClinicID'] == null) body['ClinicID'] = doctorProfile?.clinicID; + if (body['DoctorID'] == '') { + body['DoctorID'] = null; + } + if (body['EditedBy'] == '') { + body.remove("EditedBy"); + } } if (body['TokenID'] == null) { body['TokenID'] = token ?? ''; diff --git a/lib/core/viewModel/project_view_model.dart b/lib/core/viewModel/project_view_model.dart index e8e5a4fe..75eecbc6 100644 --- a/lib/core/viewModel/project_view_model.dart +++ b/lib/core/viewModel/project_view_model.dart @@ -17,7 +17,7 @@ Helpers helpers = Helpers(); class ProjectViewModel with ChangeNotifier { DrAppSharedPreferances sharedPref = DrAppSharedPreferances(); - late Locale _appLocale; + late Locale _appLocale = Locale(currentLanguage ); String currentLanguage = 'ar'; bool _isArabic = false; bool isInternetConnection = true; diff --git a/lib/widgets/shared/app_loader_widget.dart b/lib/widgets/shared/app_loader_widget.dart index 789f1cd2..40f87654 100644 --- a/lib/widgets/shared/app_loader_widget.dart +++ b/lib/widgets/shared/app_loader_widget.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:progress_hud_v2/progress_hud.dart'; import 'loader/gif_loader_container.dart'; diff --git a/pubspec.lock b/pubspec.lock index fc0e350b..859b1ad7 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -126,7 +126,7 @@ packages: name: built_collection url: "https://pub.dartlang.org" source: hosted - version: "5.0.0" + version: "5.1.0" built_value: dependency: transitive description: @@ -175,7 +175,7 @@ packages: name: chewie url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.2" chewie_audio: dependency: transitive description: @@ -301,7 +301,7 @@ packages: name: dropdown_search url: "https://pub.dartlang.org" source: hosted - version: "0.6.1" + version: "0.6.2" equatable: dependency: transitive description: @@ -357,7 +357,7 @@ packages: name: firebase_core url: "https://pub.dartlang.org" source: hosted - version: "1.2.1" + version: "1.3.0" firebase_core_platform_interface: dependency: transitive description: @@ -378,21 +378,21 @@ packages: name: firebase_messaging url: "https://pub.dartlang.org" source: hosted - version: "10.0.1" + version: "10.0.2" firebase_messaging_platform_interface: dependency: transitive description: name: firebase_messaging_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "3.0.2" firebase_messaging_web: dependency: transitive description: name: firebase_messaging_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.2" fixnum: dependency: transitive description: @@ -545,7 +545,7 @@ packages: name: font_awesome_flutter url: "https://pub.dartlang.org" source: hosted - version: "9.0.0" + version: "9.1.0" frontend_server_client: dependency: transitive description: @@ -797,14 +797,14 @@ packages: name: permission_handler url: "https://pub.dartlang.org" source: hosted - version: "8.0.1" + version: "8.1.0" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "3.5.1" + version: "3.6.0" petitparser: dependency: transitive description: @@ -847,13 +847,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.2.1" - progress_hud_v2: - dependency: "direct main" - description: - name: progress_hud_v2 - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" protobuf: dependency: transitive description: @@ -1110,7 +1103,7 @@ packages: name: video_player url: "https://pub.dartlang.org" source: hosted - version: "2.1.5" + version: "2.1.6" video_player_platform_interface: dependency: transitive description: @@ -1194,7 +1187,7 @@ packages: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.1.3" + version: "2.1.5" xdg_directories: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 0953574e..bc205213 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -36,7 +36,7 @@ dependencies: flutter_flexible_toast: ^0.1.4 local_auth: ^1.1.6 http_interceptor: ^0.4.1 - progress_hud_v2: ^2.0.0 + connectivity: ^3.0.6 maps_launcher: ^2.0.0 url_launcher: ^6.0.6