IngredientFileManager

object to load, store and delete the ingredients in your fridge

Properties

Link copied to clipboard
open override val FILENAME: String

Functions

Link copied to clipboard
open override fun deleteData(context: Context): () -> Unit

Deletes the ingredients file from internal storage. Use with caution!

Link copied to clipboard
open override fun loadData(context: Context): List<Ingredient>

loads a list of ingredients from a JSON file in internal storage.

Link copied to clipboard
open override fun saveData(context: Context, ingredients: List<Ingredient>)

Saves a list of ingredients to internal storage as a JSON file.