login apis and models added.
							parent
							
								
									8cbc0a93ab
								
							
						
					
					
						commit
						bf08417bfa
					
				| @ -0,0 +1,35 @@ | ||||
| import 'dart:async'; | ||||
| 
 | ||||
| import 'package:mohem_flutter_app/classes/consts.dart'; | ||||
| import 'package:mohem_flutter_app/models/check_mobile_app_version_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/generic_response_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/member_login_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/surah_model.dart'; | ||||
| 
 | ||||
| import 'api_client.dart'; | ||||
| 
 | ||||
| class LoginApiClient { | ||||
|   static final LoginApiClient _instance = LoginApiClient._internal(); | ||||
| 
 | ||||
|   LoginApiClient._internal(); | ||||
| 
 | ||||
|   factory LoginApiClient() => _instance; | ||||
| 
 | ||||
|   Future<CheckMobileAppVersionModel> checkMobileAppVersion() async { | ||||
|     String url = "${ApiConsts.rest}CheckMobileAppVersion"; | ||||
|     var postParams = {}; | ||||
|     return await ApiClient().postJsonForObject((json) => CheckMobileAppVersionModel.fromJson(json), url, postParams); | ||||
|   } | ||||
| 
 | ||||
|   Future<MemberLoginListModel?> memberLogin() async { | ||||
|     String url = "${ApiConsts.rest}MemberLogin"; | ||||
|     var postParams = {}; | ||||
|     return await ApiClient().postJsonForObject((json) => GenericResponseModel.fromJson(json).memberLoginList, url, postParams); | ||||
|   } | ||||
| 
 | ||||
|   Future<GenericResponseModel?> mohemmSendActivationCodeByOTPNotificationType() async { | ||||
|     String url = "${ApiConsts.rest}Mohemm_SendActivationCodebyOTPNotificationType"; | ||||
|     var postParams = {}; | ||||
|     return await ApiClient().postJsonForObject((json) => GenericResponseModel.fromJson(json), url, postParams); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,32 @@ | ||||
| class BasicMemberInformationModel { | ||||
|   String? pEMAILADDRESS; | ||||
|   String? pLEGISLATIONCODE; | ||||
|   String? pMOBILENUMBER; | ||||
|   String? pRETURNMSG; | ||||
|   String? pRETURNSTATUS; | ||||
| 
 | ||||
|   BasicMemberInformationModel( | ||||
|       {this.pEMAILADDRESS, | ||||
|         this.pLEGISLATIONCODE, | ||||
|         this.pMOBILENUMBER, | ||||
|         this.pRETURNMSG, | ||||
|         this.pRETURNSTATUS}); | ||||
| 
 | ||||
|   BasicMemberInformationModel.fromJson(Map<String, dynamic> json) { | ||||
|     pEMAILADDRESS = json['P_EMAIL_ADDRESS']; | ||||
|     pLEGISLATIONCODE = json['P_LEGISLATION_CODE']; | ||||
|     pMOBILENUMBER = json['P_MOBILE_NUMBER']; | ||||
|     pRETURNMSG = json['P_RETURN_MSG']; | ||||
|     pRETURNSTATUS = json['P_RETURN_STATUS']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['P_EMAIL_ADDRESS'] = this.pEMAILADDRESS; | ||||
|     data['P_LEGISLATION_CODE'] = this.pLEGISLATIONCODE; | ||||
|     data['P_MOBILE_NUMBER'] = this.pMOBILENUMBER; | ||||
|     data['P_RETURN_MSG'] = this.pRETURNMSG; | ||||
|     data['P_RETURN_STATUS'] = this.pRETURNSTATUS; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,191 @@ | ||||
| class CheckMobileAppVersionModel { | ||||
|   String? date; | ||||
|   int? languageID; | ||||
|   int? serviceName; | ||||
|   String? time; | ||||
|   String? androidLink; | ||||
|   String? authenticationTokenID; | ||||
|   String? data; | ||||
|   bool? dataw; | ||||
|   int? dietType; | ||||
|   int? dietTypeID; | ||||
|   int? errorCode; | ||||
|   String? errorEndUserMessage; | ||||
|   String? errorEndUserMessageN; | ||||
|   String? errorMessage; | ||||
|   int? errorType; | ||||
|   int? foodCategory; | ||||
|   String? iOSLink; | ||||
|   bool? isAuthenticated; | ||||
|   int? mealOrderStatus; | ||||
|   int? mealType; | ||||
|   int? messageStatus; | ||||
|   int? numberOfResultRecords; | ||||
|   String? patientBlodType; | ||||
|   String? successMsg; | ||||
|   String? successMsgN; | ||||
|   String? vidaUpdatedResponse; | ||||
|   String? encryprURL; | ||||
|   bool? kioskHelp; | ||||
|   List<Null>? listRssItems; | ||||
|   List<Null>? listKioskFingerPrint; | ||||
|   List<Null>? listKioskFingerPrintGetByID; | ||||
|   List<Null>? listKioskGetLastTransaction; | ||||
|   List<Null>? listRegKioskFingerPrint; | ||||
|   String? message; | ||||
|   String? ramadanTimeObj; | ||||
|   String? habibTwitterList; | ||||
| 
 | ||||
|   CheckMobileAppVersionModel( | ||||
|       {this.date, | ||||
|       this.languageID, | ||||
|       this.serviceName, | ||||
|       this.time, | ||||
|       this.androidLink, | ||||
|       this.authenticationTokenID, | ||||
|       this.data, | ||||
|       this.dataw, | ||||
|       this.dietType, | ||||
|       this.dietTypeID, | ||||
|       this.errorCode, | ||||
|       this.errorEndUserMessage, | ||||
|       this.errorEndUserMessageN, | ||||
|       this.errorMessage, | ||||
|       this.errorType, | ||||
|       this.foodCategory, | ||||
|       this.iOSLink, | ||||
|       this.isAuthenticated, | ||||
|       this.mealOrderStatus, | ||||
|       this.mealType, | ||||
|       this.messageStatus, | ||||
|       this.numberOfResultRecords, | ||||
|       this.patientBlodType, | ||||
|       this.successMsg, | ||||
|       this.successMsgN, | ||||
|       this.vidaUpdatedResponse, | ||||
|       this.encryprURL, | ||||
|       this.kioskHelp, | ||||
|       this.listRssItems, | ||||
|       this.listKioskFingerPrint, | ||||
|       this.listKioskFingerPrintGetByID, | ||||
|       this.listKioskGetLastTransaction, | ||||
|       this.listRegKioskFingerPrint, | ||||
|       this.message, | ||||
|       this.ramadanTimeObj, | ||||
|       this.habibTwitterList}); | ||||
| 
 | ||||
|   CheckMobileAppVersionModel.fromJson(Map<String, dynamic> json) { | ||||
|     date = json['Date']; | ||||
|     languageID = json['LanguageID']; | ||||
|     serviceName = json['ServiceName']; | ||||
|     time = json['Time']; | ||||
|     androidLink = json['AndroidLink']; | ||||
|     authenticationTokenID = json['AuthenticationTokenID']; | ||||
|     data = json['Data']; | ||||
|     dataw = json['Dataw']; | ||||
|     dietType = json['DietType']; | ||||
|     dietTypeID = json['DietTypeID']; | ||||
|     errorCode = json['ErrorCode']; | ||||
|     errorEndUserMessage = json['ErrorEndUserMessage']; | ||||
|     errorEndUserMessageN = json['ErrorEndUserMessageN']; | ||||
|     errorMessage = json['ErrorMessage']; | ||||
|     errorType = json['ErrorType']; | ||||
|     foodCategory = json['FoodCategory']; | ||||
|     iOSLink = json['IOSLink']; | ||||
|     isAuthenticated = json['IsAuthenticated']; | ||||
|     mealOrderStatus = json['MealOrderStatus']; | ||||
|     mealType = json['MealType']; | ||||
|     messageStatus = json['MessageStatus']; | ||||
|     numberOfResultRecords = json['NumberOfResultRecords']; | ||||
|     patientBlodType = json['PatientBlodType']; | ||||
|     successMsg = json['SuccessMsg']; | ||||
|     successMsgN = json['SuccessMsgN']; | ||||
|     vidaUpdatedResponse = json['VidaUpdatedResponse']; | ||||
|     encryprURL = json['EncryprURL']; | ||||
|     kioskHelp = json['KioskHelp']; | ||||
|     if (json['ListRssItems'] != null) { | ||||
|       listRssItems = <Null>[]; | ||||
|       json['ListRssItems'].forEach((v) { | ||||
|         //listRssItems!.add(new Null.fromJson(v)); | ||||
|       }); | ||||
|     } | ||||
|     if (json['List_Kiosk_FingerPrint'] != null) { | ||||
|       listKioskFingerPrint = <Null>[]; | ||||
|       json['List_Kiosk_FingerPrint'].forEach((v) { | ||||
|         // listKioskFingerPrint!.add(new Null.fromJson(v)); | ||||
|       }); | ||||
|     } | ||||
|     if (json['List_Kiosk_FingerPrintGetByID'] != null) { | ||||
|       listKioskFingerPrintGetByID = <Null>[]; | ||||
|       json['List_Kiosk_FingerPrintGetByID'].forEach((v) { | ||||
|         // listKioskFingerPrintGetByID!.add(new Null.fromJson(v)); | ||||
|       }); | ||||
|     } | ||||
|     if (json['List_Kiosk_GetLastTransaction'] != null) { | ||||
|       listKioskGetLastTransaction = <Null>[]; | ||||
|       json['List_Kiosk_GetLastTransaction'].forEach((v) { | ||||
|         // listKioskGetLastTransaction!.add(new Null.fromJson(v)); | ||||
|       }); | ||||
|     } | ||||
|     if (json['List_RegKiosk_FingerPrint'] != null) { | ||||
|       listRegKioskFingerPrint = <Null>[]; | ||||
|       json['List_RegKiosk_FingerPrint'].forEach((v) { | ||||
|         //  listRegKioskFingerPrint!.add(new Null.fromJson(v)); | ||||
|       }); | ||||
|     } | ||||
|     message = json['Message']; | ||||
|     ramadanTimeObj = json['RamadanTimeObj']; | ||||
|     habibTwitterList = json['habibTwitterList']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['Date'] = this.date; | ||||
|     data['LanguageID'] = this.languageID; | ||||
|     data['ServiceName'] = this.serviceName; | ||||
|     data['Time'] = this.time; | ||||
|     data['AndroidLink'] = this.androidLink; | ||||
|     data['AuthenticationTokenID'] = this.authenticationTokenID; | ||||
|     data['Data'] = this.data; | ||||
|     data['Dataw'] = this.dataw; | ||||
|     data['DietType'] = this.dietType; | ||||
|     data['DietTypeID'] = this.dietTypeID; | ||||
|     data['ErrorCode'] = this.errorCode; | ||||
|     data['ErrorEndUserMessage'] = this.errorEndUserMessage; | ||||
|     data['ErrorEndUserMessageN'] = this.errorEndUserMessageN; | ||||
|     data['ErrorMessage'] = this.errorMessage; | ||||
|     data['ErrorType'] = this.errorType; | ||||
|     data['FoodCategory'] = this.foodCategory; | ||||
|     data['IOSLink'] = this.iOSLink; | ||||
|     data['IsAuthenticated'] = this.isAuthenticated; | ||||
|     data['MealOrderStatus'] = this.mealOrderStatus; | ||||
|     data['MealType'] = this.mealType; | ||||
|     data['MessageStatus'] = this.messageStatus; | ||||
|     data['NumberOfResultRecords'] = this.numberOfResultRecords; | ||||
|     data['PatientBlodType'] = this.patientBlodType; | ||||
|     data['SuccessMsg'] = this.successMsg; | ||||
|     data['SuccessMsgN'] = this.successMsgN; | ||||
|     data['VidaUpdatedResponse'] = this.vidaUpdatedResponse; | ||||
|     data['EncryprURL'] = this.encryprURL; | ||||
|     data['KioskHelp'] = this.kioskHelp; | ||||
|     if (this.listRssItems != null) { | ||||
|       //data['ListRssItems'] = this.listRssItems!.map((v) => v.toJson()).toList(); | ||||
|     } | ||||
|     if (this.listKioskFingerPrint != null) { | ||||
|       // data['List_Kiosk_FingerPrint'] = this.listKioskFingerPrint!.map((v) => v.toJson()).toList(); | ||||
|     } | ||||
|     if (this.listKioskFingerPrintGetByID != null) { | ||||
|       //data['List_Kiosk_FingerPrintGetByID'] = this.listKioskFingerPrintGetByID!.map((v) => v.toJson()).toList(); | ||||
|     } | ||||
|     if (this.listKioskGetLastTransaction != null) { | ||||
|       //data['List_Kiosk_GetLastTransaction'] = this.listKioskGetLastTransaction!.map((v) => v.toJson()).toList(); | ||||
|     } | ||||
|     if (this.listRegKioskFingerPrint != null) { | ||||
|       //data['List_RegKiosk_FingerPrint'] = this.listRegKioskFingerPrint!.map((v) => v.toJson()).toList(); | ||||
|     } | ||||
|     data['Message'] = this.message; | ||||
|     data['RamadanTimeObj'] = this.ramadanTimeObj; | ||||
|     data['habibTwitterList'] = this.habibTwitterList; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
											
												
													File diff suppressed because it is too large
													Load Diff
												
											
										
									
								| @ -0,0 +1,48 @@ | ||||
| class MemberLoginListModel { | ||||
|   String? pEMAILADDRESS; | ||||
|   String? pINVALIDLOGINMSG; | ||||
|   String? pLEGISLATIONCODE; | ||||
|   String? pMOBILENUMBER; | ||||
|   String? pPASSOWRDEXPIRED; | ||||
|   String? pPASSWORDEXPIREDMSG; | ||||
|   String? pRETURNMSG; | ||||
|   String? pRETURNSTATUS; | ||||
|   int? pSESSIONID; | ||||
| 
 | ||||
|   MemberLoginListModel( | ||||
|       {this.pEMAILADDRESS, | ||||
|         this.pINVALIDLOGINMSG, | ||||
|         this.pLEGISLATIONCODE, | ||||
|         this.pMOBILENUMBER, | ||||
|         this.pPASSOWRDEXPIRED, | ||||
|         this.pPASSWORDEXPIREDMSG, | ||||
|         this.pRETURNMSG, | ||||
|         this.pRETURNSTATUS, | ||||
|         this.pSESSIONID}); | ||||
| 
 | ||||
|   MemberLoginListModel.fromJson(Map<String, dynamic> json) { | ||||
|     pEMAILADDRESS = json['P_EMAIL_ADDRESS']; | ||||
|     pINVALIDLOGINMSG = json['P_INVALID_LOGIN_MSG']; | ||||
|     pLEGISLATIONCODE = json['P_LEGISLATION_CODE']; | ||||
|     pMOBILENUMBER = json['P_MOBILE_NUMBER']; | ||||
|     pPASSOWRDEXPIRED = json['P_PASSOWRD_EXPIRED']; | ||||
|     pPASSWORDEXPIREDMSG = json['P_PASSWORD_EXPIRED_MSG']; | ||||
|     pRETURNMSG = json['P_RETURN_MSG']; | ||||
|     pRETURNSTATUS = json['P_RETURN_STATUS']; | ||||
|     pSESSIONID = json['P_SESSION_ID']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['P_EMAIL_ADDRESS'] = this.pEMAILADDRESS; | ||||
|     data['P_INVALID_LOGIN_MSG'] = this.pINVALIDLOGINMSG; | ||||
|     data['P_LEGISLATION_CODE'] = this.pLEGISLATIONCODE; | ||||
|     data['P_MOBILE_NUMBER'] = this.pMOBILENUMBER; | ||||
|     data['P_PASSOWRD_EXPIRED'] = this.pPASSOWRDEXPIRED; | ||||
|     data['P_PASSWORD_EXPIRED_MSG'] = this.pPASSWORDEXPIREDMSG; | ||||
|     data['P_RETURN_MSG'] = this.pRETURNMSG; | ||||
|     data['P_RETURN_STATUS'] = this.pRETURNSTATUS; | ||||
|     data['P_SESSION_ID'] = this.pSESSIONID; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -1,62 +0,0 @@ | ||||
| class MemberModel { | ||||
|   int? totalItemsCount; | ||||
|   int? statusCode; | ||||
|   String? message; | ||||
|   List<MemberDataModel>? data; | ||||
| 
 | ||||
|   MemberModel({this.totalItemsCount, this.statusCode, this.message, this.data}); | ||||
| 
 | ||||
|   MemberModel.fromJson(Map<String, dynamic> json) { | ||||
|     totalItemsCount = json['totalItemsCount']; | ||||
|     statusCode = json['statusCode']; | ||||
|     message = json['message']; | ||||
|     if (json['data'] != null) { | ||||
|       data = []; | ||||
|       json['data'].forEach((v) { | ||||
|         data?.add(new MemberDataModel.fromJson(v)); | ||||
|       }); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['totalItemsCount'] = this.totalItemsCount; | ||||
|     data['statusCode'] = this.statusCode; | ||||
|     data['message'] = this.message; | ||||
|     if (this.data != null) { | ||||
|       data['data'] = this.data?.map((v) => v.toJson()).toList(); | ||||
|     } | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| class MemberDataModel { | ||||
|   int? committeeId; | ||||
|   String? firstName; | ||||
|   String? lastName; | ||||
|   String? description; | ||||
|   String? picture; | ||||
|   int? orderNo; | ||||
| 
 | ||||
|   MemberDataModel({this.committeeId, this.firstName, this.lastName, this.description, this.picture, this.orderNo}); | ||||
| 
 | ||||
|   MemberDataModel.fromJson(Map<String, dynamic> json) { | ||||
|     committeeId = json['committeeId']; | ||||
|     firstName = json['firstName']; | ||||
|     lastName = json['lastName']; | ||||
|     description = json['description']; | ||||
|     picture = json['picture']; | ||||
|     orderNo = json['orderNo']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['committeeId'] = this.committeeId; | ||||
|     data['firstName'] = this.firstName; | ||||
|     data['lastName'] = this.lastName; | ||||
|     data['description'] = this.description; | ||||
|     data['picture'] = this.picture; | ||||
|     data['orderNo'] = this.orderNo; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
					Loading…
					
					
				
		Reference in New Issue