Kotlin: mutableMap doesn't recognise put()
This is part of a recipe app. I am in the Recipe class which I have written. Ingredient is another class I have written. The idea is to store the ingredient and its amount (as an Int) in a map.
In the class body I have declared the map as:
var ingredients: Map
And in the init{} body:
ingredients = mutableMapOf()
Here is the problem - this function is to add an ingredient. It updates the quantity if the ingredient is already in the map. the put()method should do this but Android Studio is...