From f1721b686d774fbd65166a49b66cea0e9b4d9a90 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Wed, 14 Oct 2020 11:48:39 +0300 Subject: [PATCH] fix loader inside pharmacies_list --- lib/providers/medicine_provider.dart | 2 +- lib/screens/medicine/pharmacies_list_screen.dart | 4 ++-- lib/screens/patients/profile/insurance_approvals_screen.dart | 2 +- lib/screens/patients/profile/patient_orders_screen.dart | 2 +- lib/screens/patients/profile/progress_note_screen.dart | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/providers/medicine_provider.dart b/lib/providers/medicine_provider.dart index 8a0bef74..935529ca 100644 --- a/lib/providers/medicine_provider.dart +++ b/lib/providers/medicine_provider.dart @@ -50,7 +50,7 @@ class MedicineProvider with ChangeNotifier { resetDefaultValues(); try { _listRequestModel.itemID = itemId; - isFinished = true; + isFinished = false; await BaseAppClient.post(PHARMACY_LIST_URL, onSuccess: (dynamic response, int statusCode) { pharmaciesList = response['PharmList']; diff --git a/lib/screens/medicine/pharmacies_list_screen.dart b/lib/screens/medicine/pharmacies_list_screen.dart index c35959c1..04e60d58 100644 --- a/lib/screens/medicine/pharmacies_list_screen.dart +++ b/lib/screens/medicine/pharmacies_list_screen.dart @@ -6,15 +6,15 @@ import 'package:doctor_app_flutter/providers/medicine_provider.dart'; import 'package:doctor_app_flutter/providers/project_provider.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.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/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; import 'package:maps_launcher/maps_launcher.dart'; +import 'package:provider/provider.dart'; import 'package:url_launcher/url_launcher.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; DrAppSharedPreferances sharedPref = DrAppSharedPreferances(); diff --git a/lib/screens/patients/profile/insurance_approvals_screen.dart b/lib/screens/patients/profile/insurance_approvals_screen.dart index a171a0e9..d1ba1726 100644 --- a/lib/screens/patients/profile/insurance_approvals_screen.dart +++ b/lib/screens/patients/profile/insurance_approvals_screen.dart @@ -85,7 +85,7 @@ class _InsuranceApprovalsState extends State { ? DrAppCircularProgressIndeicator() : patientsProv.isError ? DrAppEmbeddedError(error: patientsProv.error) - : patientsProv.insuranceApporvalsList == null + : patientsProv.insuranceApporvalsList == null || patientsProv.insuranceApporvalsList.length == 0 ? DrAppEmbeddedError( error: TranslationBase.of(context).errorNoInsuranceApprovals) diff --git a/lib/screens/patients/profile/patient_orders_screen.dart b/lib/screens/patients/profile/patient_orders_screen.dart index 8effd1f9..05cdbfea 100644 --- a/lib/screens/patients/profile/patient_orders_screen.dart +++ b/lib/screens/patients/profile/patient_orders_screen.dart @@ -83,7 +83,7 @@ class _PatientsOrdersState extends State { ? DrAppCircularProgressIndeicator() : patientsProv.isError ? DrAppEmbeddedError(error: patientsProv.error) - : notesList == null + : notesList == null || notesList.length == 0 ? DrAppEmbeddedError( error: TranslationBase.of(context).errorNoOrders) : Column( diff --git a/lib/screens/patients/profile/progress_note_screen.dart b/lib/screens/patients/profile/progress_note_screen.dart index 90640c59..aba49d7b 100644 --- a/lib/screens/patients/profile/progress_note_screen.dart +++ b/lib/screens/patients/profile/progress_note_screen.dart @@ -83,7 +83,7 @@ class _ProgressNoteState extends State { ? DrAppCircularProgressIndeicator() : patientsProv.isError ? DrAppEmbeddedError(error: patientsProv.error) - : notesList == null + : notesList == null || notesList.length == 0 ? DrAppEmbeddedError( error: TranslationBase.of(context).errorNoProgressNote) : Column(