Package-level declarations

Types

Link copied to clipboard
interface RecipeApiState

Sealed interface representing the state of the Recipe API.

Link copied to clipboard
data class RecipeListState(val recipeList: List<Recipe> = listOf())

Data class representing the state of the Recipe list.

Link copied to clipboard
class RecipeViewModel(recipeRepository: RecipeRepository) : ViewModel

ViewModel for managing Recipe data.

Functions

Link copied to clipboard
fun RecipesScreen(recipeViewModel: RecipeViewModel = viewModel(factory = RecipeViewModel.Factory), onRecipeClick: (Long, String) -> Unit)

Composable function for the RecipesScreen. It displays a list of recipes and handles user interactions such as refreshing the list and clicking on a recipe.