https://kotlinlang.org logo
Title
u

user

07/09/2022, 1:31 PM
Model Class response issue I have a Model class data class OtpVerifyModel( val result: Int? = null, val msg: String? = null, val data: Datas? = null) in the response success stage, result is equal to 1 and we get Object in data where as if result is -1. we get string in data part. I used Datas class for data but app crashes in a case when data is a string. How can I handle two different type of data in same variable in different cases? here is my retrofit method @FormUrlEncoded @POST("Api/login") suspend fun...