I have a data class
and I am creating an object
of it. I am passing parameter values like this:
val leadDetails = AddLeadDetails(AgentId = agent.UserId,
Name = leadUserName.text.toString().trim(),
MobileNo = leadMobileNumber.text.toString().trim(),
ProductType = productTypeId,
LoanType = productTypeItem,
ApplicationStatus = //if condition to put value i.e if(string == "s") "One value" else "Second Value"
Amount = productAmountText.text.toString().trim(),
Pincode = pinCodeText.text.toString().trim(),
Remarks = customerRemarks.text.toString().trim(),
Type = referType!!)
I want to add a value to ApplicationStatus
based on if
condition. How can I achieve that?