Ingredient

@Serializable
data class Ingredient(val id: String = UUID.randomUUID().toString(), val name: String, var isSelected: MutableState<Boolean> = mutableStateOf(false), val filePath: String = "file:///android_asset/default-ingredient.png")

data class to represent the ingredients in the fridge

Parameters

id

UUID to parse it to the LazyVerticalGrid

name

given by the user or added from the recipes, can have typos or be in plural

isSelected

which ingredients to use for the query, cannot be more than 10

filePath

of the image. There will be an algorithm to map the word to the closest image

Constructors

Link copied to clipboard
constructor(id: String = UUID.randomUUID().toString(), name: String, isSelected: MutableState<Boolean> = mutableStateOf(false), filePath: String = "file:///android_asset/default-ingredient.png")

Properties

Link copied to clipboard
Link copied to clipboard
val id: String
Link copied to clipboard
Link copied to clipboard