diff --git a/lib/core/config/config.dart b/lib/core/config/config.dart index aca4a27..89bf1b2 100644 --- a/lib/core/config/config.dart +++ b/lib/core/config/config.dart @@ -4,9 +4,8 @@ const MAX_SMALL_SCREEN = 660; 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/'; diff --git a/lib/home/app_provider.dart b/lib/home/app_provider.dart index 1581fe4..9da8e25 100644 --- a/lib/home/app_provider.dart +++ b/lib/home/app_provider.dart @@ -32,7 +32,7 @@ class AppProvider extends ChangeNotifier { while (currentDeviceIp == "") { await getCurrentIP(); if (currentDeviceIp != "") { - callInitializations(); + await callInitializations(); } else { await Future.delayed(const Duration(seconds: 2)); } @@ -145,6 +145,7 @@ class AppProvider extends ChangeNotifier { WidgetsConfigModel? currentWidgetsConfigModel; Future getInfoWidgetsConfigurationsFromServer() async { + log(" errorHellpo:"); WidgetsConfigModel? widgetsConfigModel = await API.getWidgetConfigsFromServer(currentDeviceIp, onFailure: (error) { logger.i("Api call failed with this error: ${error.toString()}"); }); diff --git a/lib/main.dart b/lib/main.dart index 8623150..d4d7486 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -41,12 +41,8 @@ class MyApp extends StatelessWidget { builder: (context, constraints) { return OrientationBuilder(builder: (context, orientation) { SizeConfig().init(constraints, orientation); - SystemChrome.setPreferredOrientations([ - DeviceOrientation.portraitUp, - // DeviceOrientation.portraitDown, - // DeviceOrientation.landscapeLeft, - // DeviceOrientation.landscapeRight, - ]); + SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft]); + SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: []); return MultiProvider( providers: [ diff --git a/lib/utils/signalR_utils.dart b/lib/utils/signalR_utils.dart index 3ebd26e..cc2f82c 100644 --- a/lib/utils/signalR_utils.dart +++ b/lib/utils/signalR_utils.dart @@ -34,14 +34,16 @@ class SignalRHelper { required VoidCallback onConnecting, }) async { logger.i("Connecting Signal R with: $deviceIp"); - final url = hubBaseURL + "?IPAddress=$deviceIp"; + final url = "$hubBaseURL?IPAddress=$deviceIp"; // final url = hubBaseURL; connection = HubConnectionBuilder() .withUrl( url, HttpConnectionOptions( client: IOClient(HttpClient()..badCertificateCallback = (x, y, z) => true), - // transport: HttpTransportType.webSockets, + + //TODO: IT MUST BE WEB SOCKETS + transport: HttpTransportType.longPolling, logging: (level, message) => log(message), )) .withAutomaticReconnect()