logins apis

master-Api2.0_update3.29
Aamir Muhammad 4 months ago
parent 953553fb3c
commit 0e8512597c

@ -8,8 +8,7 @@
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" tools:node="remove" />
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
<!-- Required only if your app needs to access videos
that other apps created. -->
@ -19,8 +18,7 @@
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />-->
<!-- Chat Web RTC Calling -->
<!-- Chat Web RTC Calling -->
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
@ -40,33 +38,22 @@
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileProvider"
android:exported="false"
android:grantUriPermissions="true"
tools:replace="android:authorities">
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/filepaths"
tools:replace="android:resource" />
android:resource="@xml/filepaths" />
</provider>
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:name="hmg.cloudSolutions.mohem.MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:exported="true"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background" />
@ -80,11 +67,8 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
</manifest>

@ -1,4 +1,5 @@
package com.mohem_flutter_app
//package com.mohem_flutter_app
package hmg.cloudSolutions.mohem
//import io.flutter.embedding.android.FlutterActivity
//

@ -47,10 +47,10 @@ pluginManagement {
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version '8.10.0' apply false
id "com.android.application" version '8.10.1' apply false
id("org.jetbrains.kotlin.android") version "2.1.10" apply false
id("com.google.gms.google-services") version "4.4.2" apply false
id("com.google.firebase.crashlytics") version "3.0.3" apply false
id("com.google.firebase.crashlytics") version "3.0.4" apply false
id ("com.huawei.agconnect.agcp") version "1.7.3.302" apply false
id ("com.huawei.agconnect.apms") version "1.6.1.300" apply false

@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
@ -43,6 +44,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"

@ -13,6 +13,7 @@ import 'package:mohem_flutter_app/models/dashboard/itg_forms_model.dart';
import 'package:mohem_flutter_app/models/eit/get_eit_transaction_model.dart';
import 'package:mohem_flutter_app/models/generic_mapper_model.dart';
import 'package:mohem_flutter_app/models/generic_response_model.dart';
import 'package:mohem_flutter_app/models/get_mobile_login_info_list_model.dart';
import 'package:mohem_flutter_app/models/itg/itg_main_response.dart';
import 'package:mohem_flutter_app/models/itg/itg_response_model.dart';
import 'package:mohem_flutter_app/models/member_login_list_model.dart';
@ -51,13 +52,13 @@ class ApiClassMapper {
} else {
return false;
}
return;
case 'Mohemm_GetMobileLoginInfo_NEW':
return;
GetMobileLoginInfoListModel response = GetMobileLoginInfoListModel.fromJson(jsonData);
return response;
case 'ChangePassword_FromActiveSession':
return;
case 'Get_BasicUserInformation':
return;
case 'SendPublicActivationCode':
return;

@ -1,4 +1,5 @@
import 'dart:async';
import 'dart:convert';
import 'package:mohem_flutter_app/api/api_client.dart';
import 'package:mohem_flutter_app/api/api_mapper_class.dart';
@ -25,13 +26,21 @@ class LoginApiClient {
postParams["DeviceToken"] = deviceToken;
postParams["DeviceType"] = deviceType;
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
return (responseData.mohemmGetMobileLoginInfoList?.length ?? 0) > 0 ? (responseData.mohemmGetMobileLoginInfoList!.first) : null;
// GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
print(jsonDecode(json["Data"].first));
GetMobileLoginInfoListModel? modelData= GetMobileLoginInfoListModel.fromRawJson(jsonDecode(json["Data"].first));
print("getMobileLoginInfoNEW: ${modelData.toJson()}");
// return (responseData.mohemmGetMobileLoginInfoList?.length ?? 0) > 0 ? (responseData.mohemmGetMobileLoginInfoList!.first) : null;
return modelData;
}, url, postParams);
// dynamic response = await ApiClient().postJsonForObject((json) => json, url, postParams, token: AppState().postParamsObject!.tokenID);
// ApiResponse res = ApiResponse.fromJson(response);
// dynamic ress = await ApiClassMapper().handleApiEndpoint(endpoint: "Mohemm_GetMobileLoginInfo_NEW", jsonData: res.data);
// return ress;
}
Future<bool?> insertMobileLoginInfoNEW(
String email, int sessionId, String employeeName, int loginType, String mobileNumber, String userName, String deviceToken, String deviceType) async {
Future<bool?> insertMobileLoginInfoNEW(String email, int sessionId, String employeeName, int loginType, String mobileNumber, String userName, String deviceToken, String deviceType) async {
String url = "${ApiConsts.authRest}Mohemm_Insert_MobileDeviceInfo";
// String url = "${ApiConsts.authRest}Mohemm_InsertMobileLoginInfo";
Map<String, dynamic> postParams = {
@ -51,11 +60,10 @@ class LoginApiClient {
dynamic response = await ApiClient().postJsonForObject((json) => json, url, postParams, token: AppState().postParamsObject!.tokenID);
ApiResponse res = ApiResponse.fromJson(response);
dynamic ress = await ApiClassMapper().handleApiEndpoint(endpoint: "Mohemm_Insert_MobileDeviceInfo", jsonData: res);
if(ress == true){
if (ress == true) {
AppState().setLogged = true;
}
return ress;
}
Future<CheckMobileAppVersionModel?> checkMobileAppVersion() async {
@ -110,7 +118,10 @@ class LoginApiClient {
String url = "${ApiConsts.authRest}Get_BasicUserInformation";
Map<String, dynamic> postParams = {"P_APP_VERSION": pAppVersion, "P_USER_NAME": pUsername};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) => GenericResponseModel.fromJson(json).basicMemberInformation, url, postParams);
dynamic response = await ApiClient().postJsonForObject((json) => json, url, postParams);
ApiResponse res = ApiResponse.fromJson(response);
return await ApiClassMapper().handleApiEndpoint(endpoint: "Get_BasicUserInformation", jsonData: res.data);
// return await ApiClient().postJsonForObject((json) => GenericResponseModel.fromJson(json).basicMemberInformation, url, postParams);
}
Future<GenericResponseModel?> sendPublicActivationCode(String? mobileNumber, String? pUsername) async {

@ -1,3 +1,5 @@
import 'dart:convert';
class GetMobileLoginInfoListModel {
int? iD;
int? employeeID;
@ -61,4 +63,10 @@ class GetMobileLoginInfoListModel {
data['BusinessCardPrivilege'] = businessCardPrivilege;
return data;
}
factory GetMobileLoginInfoListModel.fromRawJson(String str) => GetMobileLoginInfoListModel.fromJson(json.decode(str));
}

@ -59,6 +59,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
@override
Widget build(BuildContext context) {
if (ModalRoute.of(context)!.settings.arguments != null) {
print("Arguments: ${ModalRoute.of(context)!.settings.arguments}");
mobileLoginInfoListModel ??= ModalRoute.of(context)!.settings.arguments as GetMobileLoginInfoListModel;
// String empName = AppState().isArabic(context) ? AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEAr! : AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEEn!;
String empName = mobileLoginInfoListModel!.employeeName!;

@ -120,7 +120,8 @@ dependencies:
# saf: ^1.0.3+4
#dependency_overrides:
dependency_overrides:
intl: ^0.19.0
dev_dependencies:

Loading…
Cancel
Save