Till the Khobar Team Demo

master
Faiz Hashmi 2 years ago
parent 3982491386
commit 07b337ba70

@ -5,8 +5,8 @@ const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
// const BASE_URL = 'https://ms.hmg.com/nscapi'; // UAT
const BASE_URL = 'https://qline.hmg.com'; // LIVE
const BASE_URL = 'https://ms.hmg.com/nscapi'; // UAT
//const BASE_URL = 'https://qline.hmg.com'; // LIVE
const apiKey = 'EE17D21C7943485D9780223CCE55DCE5'; // UAT
// const BASE_URL = 'http://10.200.204.11:2222/Services/Nurses.svc/REST';
// const BASE_URL = 'https://hmgwebservices.com/';

@ -18,6 +18,7 @@ import 'package:queuing_system/utils/call_by_voice.dart';
import 'package:queuing_system/utils/call_type.dart';
import 'package:queuing_system/utils/signalR_utils.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:signalr_core/signalr_core.dart';
bool isVoiceActualCompletedGlobally = false;
@ -87,7 +88,7 @@ class AppProvider extends ChangeNotifier {
log("Api call failed with this error: ${error.toString()}");
});
currentWidgetsConfigModel = widgetsConfigModel;
if (widgetsConfigModel != null) currentWidgetsConfigModel = widgetsConfigModel;
notifyListeners();
}
@ -162,8 +163,7 @@ class AppProvider extends ChangeNotifier {
RssFeedModel currentRssFeedModel = RssFeedModel();
Future<void> getRssFeedDetailsFromServer() async {
RssFeedModel? rssFeedModel =
await API.getRssFeedDetailsFromServer(languageId: 0, onFailure: (error) => log("Api call failed with this error: ${error.toString()}"));
RssFeedModel? rssFeedModel = await API.getRssFeedDetailsFromServer(languageId: 0, onFailure: (error) => log("Api call failed with this error: ${error.toString()}"));
if (rssFeedModel != null) {
currentRssFeedModel = rssFeedModel;
@ -173,7 +173,7 @@ class AppProvider extends ChangeNotifier {
}
Future<void> getInfoWidgetsDetailsFromServer() async {
if (currentWidgetsConfigModel == null) return;
// if (currentWidgetsConfigModel == null) return;
await getInfoWidgetsConfigurationsFromServer().whenComplete(() async {
if (currentWidgetsConfigModel!.isWeatherReq!) {
@ -471,7 +471,7 @@ class AppProvider extends ChangeNotifier {
updatePatientTicket(PatientTicketModel patientTicket) {
if (!patientTicket.isQueue) {
API.callUpdateNotIsQueueRecordByIDAsync(currentDeviceIp, ticket: patientTicket, onSuccess: (ticketsUpdated) {
API.callUpdateNotIsQueueRecordByIDAsync(currentDeviceIp, ticket: patientTicket, onSuccess: (ticketsUpdated) {
log("[${patientTicket.callNoStr}] Ticket Updated: $ticketsUpdated");
}, onFailure: (e) {
log(" Tickets Update ${patientTicket.callNoStr} Failed with Error : ${e.toString()}");
@ -485,8 +485,7 @@ class AppProvider extends ChangeNotifier {
onDisconnect(exception) {
log("SignalR: onDisconnect");
signalRHelper.startSignalRConnection(currentDeviceIp,
onUpdateAvailable: onPingReceived, onConnect: onConnect, onConnecting: onConnecting, onDisconnect: onDisconnect);
signalRHelper.startSignalRConnection(currentDeviceIp, onUpdateAvailable: onPingReceived, onConnect: onConnect, onConnecting: onConnecting, onDisconnect: onDisconnect);
}
onConnecting() {
@ -499,8 +498,8 @@ class AppProvider extends ChangeNotifier {
case ConnectivityResult.wifi:
updateInternetConnection(true);
await getCurrentIP();
if (signalRHelper.connection == null || signalRHelper.connection!.state != ConnectionState.active) {
signalRHelper.connection!.start();
if (signalRHelper.connection != null) {
if (signalRHelper.connection!.state != HubConnectionState.connected) signalRHelper.connection!.start();
}
break;
case ConnectivityResult.none:

@ -22,8 +22,6 @@ class SignalRHelper {
// String hubBaseURL = "https://vcallapi.hmg.com/PatientCallingHub";
String hubBaseURL = "$BASE_URL/PatientCallingHub";
// String hubBaseURL = "https://vcallapi.hmg.com/PatientCallingHub?IPAddress=10.10.14.20";
// "https://VCallApi.hmg.com/WebRTCHub?source=mobile&username=2001273";
HubConnection? connection;
@ -72,10 +70,10 @@ class SignalRHelper {
}
}
startConnection(BuildContext context) async {
if (connection!.state == HubConnectionState.connected || connection!.state == HubConnectionState.connecting) {
connection!.off('addChatMessage');
await connection!.start();
}
}
// startConnection(BuildContext context) async {
// if (connection!.state == HubConnectionState.connected || connection!.state == HubConnectionState.connecting) {
// connection!.off('addChatMessage');
// await connection!.start();
// }
// }
}

Loading…
Cancel
Save