Compare commits

...

3 Commits

@ -102,6 +102,9 @@ android {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
}

@ -1,69 +1,69 @@
package com.hmg.hmgDr.Service;
import android.app.Activity;
import android.app.Application;
import androidx.annotation.CallSuper;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.util.concurrent.TimeUnit;
import io.flutter.view.FlutterMain;
import okhttp3.ConnectionPool;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class AppRetrofit extends Application {
private static final int MY_SOCKET_TIMEOUT_MS = 20000;
@Override
@CallSuper
public void onCreate() {
super.onCreate();
FlutterMain.startInitialization(this);
}
private Activity mCurrentActivity = null;
public Activity getCurrentActivity() {
return mCurrentActivity;
}
public void setCurrentActivity(Activity mCurrentActivity) {
this.mCurrentActivity = mCurrentActivity;
}
public static Retrofit getRetrofit( String baseUrl) {
HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
Gson gson = new GsonBuilder().serializeNulls().create();
OkHttpClient okHttpClient = new OkHttpClient.Builder().addInterceptor(chain -> {
okhttp3.Request originalRequest = chain.request();
okhttp3.Request newRequest = originalRequest.newBuilder()
.addHeader("Content-Type","application/json")
.addHeader("Accept","application/json")
.build();
return chain.proceed(newRequest);
})
.addInterceptor(interceptor)
.callTimeout(MY_SOCKET_TIMEOUT_MS, TimeUnit.SECONDS)
.connectTimeout(MY_SOCKET_TIMEOUT_MS, TimeUnit.SECONDS)
.readTimeout(MY_SOCKET_TIMEOUT_MS, TimeUnit.SECONDS)
.connectionPool(new ConnectionPool(0, 5 * 60 * 1000, TimeUnit.SECONDS))
.retryOnConnectionFailure(false)
.build();
return new Retrofit.Builder()
.baseUrl(baseUrl)
.addConverterFactory(GsonConverterFactory.create(gson))
.client(okHttpClient)
.build();
}
}
//package com.hmg.hmgDr.Service;
//
//import android.app.Activity;
//import android.app.Application;
//
//import androidx.annotation.CallSuper;
//
//import com.google.gson.Gson;
//import com.google.gson.GsonBuilder;
//
//import java.util.concurrent.TimeUnit;
//
//import io.flutter.view.FlutterMain;
//import okhttp3.ConnectionPool;
//import okhttp3.OkHttpClient;
//import okhttp3.logging.HttpLoggingInterceptor;
//import retrofit2.Retrofit;
//import retrofit2.converter.gson.GsonConverterFactory;
//
//public class AppRetrofit extends Application {
// private static final int MY_SOCKET_TIMEOUT_MS = 20000;
//
// @Override
// @CallSuper
// public void onCreate() {
// super.onCreate();
// FlutterMain.startInitialization(this);
// }
//
// private Activity mCurrentActivity = null;
//
// public Activity getCurrentActivity() {
// return mCurrentActivity;
// }
//
// public void setCurrentActivity(Activity mCurrentActivity) {
// this.mCurrentActivity = mCurrentActivity;
// }
//
// public static Retrofit getRetrofit( String baseUrl) {
//
// HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
// interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
// Gson gson = new GsonBuilder().serializeNulls().create();
// OkHttpClient okHttpClient = new OkHttpClient.Builder().addInterceptor(chain -> {
// okhttp3.Request originalRequest = chain.request();
// okhttp3.Request newRequest = originalRequest.newBuilder()
// .addHeader("Content-Type","application/json")
// .addHeader("Accept","application/json")
// .build();
//
// return chain.proceed(newRequest);
// })
// .addInterceptor(interceptor)
// .callTimeout(MY_SOCKET_TIMEOUT_MS, TimeUnit.SECONDS)
// .connectTimeout(MY_SOCKET_TIMEOUT_MS, TimeUnit.SECONDS)
// .readTimeout(MY_SOCKET_TIMEOUT_MS, TimeUnit.SECONDS)
// .connectionPool(new ConnectionPool(0, 5 * 60 * 1000, TimeUnit.SECONDS))
// .retryOnConnectionFailure(false)
// .build();
//
//
// return new Retrofit.Builder()
// .baseUrl(baseUrl)
// .addConverterFactory(GsonConverterFactory.create(gson))
// .client(okHttpClient)
// .build();
// }
//}

@ -3,7 +3,7 @@ package com.hmg.hmgDr.ui;
import com.hmg.hmgDr.Model.ChangeCallStatusRequestModel;
import com.hmg.hmgDr.Model.GetSessionStatusModel;
import com.hmg.hmgDr.Model.SessionStatusModel;
import com.hmg.hmgDr.Service.AppRetrofit;
//import com.hmg.hmgDr.Service.AppRetrofit;
import com.hmg.hmgDr.Service.SessionStatusAPI;
import org.jetbrains.annotations.NotNull;
@ -27,7 +27,7 @@ public class VideoCallPresenterImpl implements VideoCallContract.VideoCallPresen
public void callClintConnected(GetSessionStatusModel statusModel) {
sessionStatusAPI = AppRetrofit.getRetrofit(baseUrl).create(SessionStatusAPI.class);
// sessionStatusAPI = AppRetrofit.getRetrofit(baseUrl).create(SessionStatusAPI.class);
Call<SessionStatusModel> call = sessionStatusAPI.getSessionStatusModelData(statusModel);
@ -50,7 +50,7 @@ public class VideoCallPresenterImpl implements VideoCallContract.VideoCallPresen
@Override
public void callChangeCallStatus(ChangeCallStatusRequestModel statusModel) {
sessionStatusAPI = AppRetrofit.getRetrofit(baseUrl).create(SessionStatusAPI.class);
// sessionStatusAPI = AppRetrofit.getRetrofit(baseUrl).create(SessionStatusAPI.class);
Call<SessionStatusModel> call = sessionStatusAPI.changeCallStatus(statusModel);

@ -3,3 +3,4 @@
android.useAndroidX=true
android.enableJetifier=true
org.gradle.jvmargs=-Xmx4608m
kotlin.jvm.target.validation.mode = IGNORE

@ -35,16 +35,49 @@ target 'Runner' do
pod 'OpenTok'
pod 'Alamofire', '~> 5.2'
pod 'AADraggableView'
# pod 'Firebase', '~> 11.11.0'
# Plugin Pods
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
pod 'DKImagePickerController/PhotoGallery', :git => 'https://github.com/miguelpruivo/DKImagePickerController.git'
end
# $deployment_target = '13.0'
# pre_install do |installer|
# installer.pod_targets.each do |pod|
# pod.platform = :ios, $deployment_target
# end
# end
# post_install do |installer|
# installer.pods_project.targets.each do |target|
# target.build_configurations.each do |config|
# config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17'
# config.build_settings['CLANG_CXX_LIBRARY'] = 'libc++'
# config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
# config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64' # For Apple Silicon
# end
# flutter_additional_ios_build_settings(target)
# end
# end
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'BoringSSL-GRPC'
target.source_build_phase.files.each do |file|
if file.settings && file.settings['COMPILER_FLAGS']
flags = file.settings['COMPILER_FLAGS'].split
flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' }
file.settings['COMPILER_FLAGS'] = flags.join(' ')
end
end
end
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |build_configuration|
build_configuration.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17'
build_configuration.build_settings['CLANG_CXX_LIBRARY'] = 'libc++'
build_configuration.build_settings['OTHER_CPLUSPLUSFLAGS'] = '-std=c++17'
build_configuration.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',
## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
@ -56,6 +89,8 @@ post_install do |installer|
if build_configuration.build_settings['WRAPPER_EXTENSION'] == 'bundle'
build_configuration.build_settings['DEVELOPMENT_TEAM'] = '3A359E86ZF'
end
build_configuration.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17' # or 'c++17'
build_configuration.build_settings['CLANG_CXX_LIBRARY'] = 'libc++'
end
end
end

@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
@ -46,6 +48,13 @@
<string>Need to upload image</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>This permission is not needed by the app, but it is required by an underlying API. If you see this dialog, contact us.</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
<string>fetch</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
@ -65,9 +74,5 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>

@ -4,14 +4,14 @@ 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_LIVE_CARE = 'https://uat.hmgwebservices.com/';
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
// const BASE_URL_LIVE_CARE = 'https://uat.hmgwebservices.com/';
const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'http://10.20.200.111:1010/';
const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
@ -413,7 +413,7 @@ const TRANSACTION_NO = 0;
const LANGUAGE_ID = 2;
const STAMP = '2020-04-27T12:17:17.721Z';
const IP_ADDRESS = '9.9.9.9';
const VERSION_ID = 9.8;
const VERSION_ID = 9.9;
const CHANNEL = 9;
const SESSION_ID = 'BlUSkYymTt';
const IS_LOGIN_FOR_DOCTOR_APP = true;

@ -115,7 +115,7 @@ class SickLeaveService extends BaseService {
Future getSickLeavePatient(patientMRN) async {
_sickLeavePatientRequestModel = SickLeavePatientRequestModel(
patientID: patientMRN, patientTypeID: 2, patientType: 1);
patientID: patientMRN, patientTypeID: 2, patientType: 1, patientMRN: patientMRN);
hasError = false;
getAllSickLeavePatient = [];
getAllSickLeavePatient.clear();

@ -30,12 +30,11 @@ void main() async {
//clearing all the shared pref on the inital start to avoid any profile issue
Future<void> clearPrefsOnFirstLaunch() async {
SharedPreferences prefs = await SharedPreferences. getInstance();
SharedPreferences prefs = await SharedPreferences.getInstance();
bool isFirstLaunch = prefs.getBool('isFirstLaunch') ?? true;
await prefs.clear(); // Clear all prefs
await prefs.clear(); // Clear all prefs
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@ -60,37 +59,41 @@ class MyApp extends StatelessWidget {
)
],
child: Consumer<ProjectViewModel>(
builder: (context, projectProvider, child) => MaterialApp(
showSemanticsDebugger: false,
title: 'Doctors App',
locale: projectProvider.appLocal,
localizationsDelegates: [
TranslationBaseDelegate(),
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
DefaultCupertinoLocalizations.delegate
],
supportedLocales: [
const Locale('ar', ''), // Arabic
const Locale('en', ''), // English
],
theme: ThemeData(
primarySwatch: Colors.grey,
primaryColor: Colors.grey,
//buttonColor: HexColor('#D02127'),
fontFamily: 'Poppins',
dividerColor: Colors.grey[350],
builder: (context, projectProvider, child) => SafeArea(
top: false,
bottom: Platform.isAndroid ? true : false,
child: MaterialApp(
showSemanticsDebugger: false,
title: 'Doctors App',
locale: projectProvider.appLocal,
localizationsDelegates: [
TranslationBaseDelegate(),
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
DefaultCupertinoLocalizations.delegate
],
supportedLocales: [
const Locale('ar', ''), // Arabic
const Locale('en', ''), // English
],
theme: ThemeData(
primarySwatch: Colors.grey,
primaryColor: Colors.grey,
//buttonColor: HexColor('#D02127'),
fontFamily: 'Poppins',
dividerColor: Colors.grey[350],
// backgroundColor: Color.fromRGBO(255, 255, 255, 1),
useMaterial3: false),
navigatorKey: locator<NavigationService>().navigatorKey,
navigatorObservers: [
locator<AnalyticsService>().getAnalyticsObserver(),
],
initialRoute: INIT_ROUTE,
routes: routes,
debugShowCheckedModeBanner: false,
// backgroundColor: Color.fromRGBO(255, 255, 255, 1),
useMaterial3: false),
navigatorKey: locator<NavigationService>().navigatorKey,
navigatorObservers: [
locator<AnalyticsService>().getAnalyticsObserver(),
],
initialRoute: INIT_ROUTE,
routes: routes,
debugShowCheckedModeBanner: false,
),
),
),
);

@ -11,11 +11,11 @@ description: A new Flutter project.
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.4.24+1
version: 1.4.26+1
environment:
sdk: ">=3.5.0 <4.0.0"
sdk: ">=3.6.0 <4.0.0"
#dependency_overrides:
@ -41,8 +41,9 @@ dependencies:
# connectivity: ^3.0.6
connectivity_plus: ^6.1.4
maps_launcher: ^3.0.0+1
url_launcher: ^6.3.1
url_launcher: ^6.3.2
url_launcher_ios: ^6.3.2
url_launcher_android: ^6.3.17
charts_flutter: ^0.12.0
#flutter_charts: ^0.5.2
#gelin: ^0.1.6
@ -144,6 +145,7 @@ dependency_overrides:
intl: ^0.18.1
flutter_plugin_android_lifecycle: 2.0.27
#hijri_picker: ^3.0.0
path_provider: ^2.1.5
dev_dependencies:

Loading…
Cancel
Save