https://kotlinlang.org logo
#android
Title
# android
s

Sudhir Singh Khanger

01/01/2018, 8:19 PM
Model class
Copy code
class Recipe(id: Int,
             name: String,
             ingredients: MutableList<Ingredients>,
             steps: MutableList<Steps>,
             servings: Int,
             image: String)
Usage
Copy code
val recipe = Recipe(recipeId, name, ingredients, steps, servings, image)
Log.e("MainActivityFragment", recipe.id)
The
recipe.id
says
unresolved reference: id
. I am not sure why I am unable to access the
id
property from the
recipe
object.