Storyteller Home
A Composable function that displays a Storyteller Home screen. The Home screen is a configurable vertical list capable of displaying various Storyteller list components, such as com.storyteller.ui.compose.components.lists.row.StorytellerStoriesRow, com.storyteller.ui.compose.components.lists.grid.StorytellerStoriesGrid, com.storyteller.ui.compose.components.lists.row.StorytellerClipsRow, and com.storyteller.ui.compose.components.lists.grid.StorytellerClipsGrid. The specific layout and content are determined by a "Home" configuration fetched from the Storyteller CMS using the provided homeId. For more information on using the Storyteller Home screen, see the Storyteller Home Screen Documentation.
This component includes a pull-to-refresh mechanism for reloading data. The state of the list, including scroll position and reload functionality, can be managed through the StorytellerHomeState instance.
Example Usage:
// Basic usage
StorytellerHome(
homeId = "your-home-screen-id",
modifier = Modifier.fillMaxSize()
)
// Usage with a custom state for external reloading
val homeState = rememberStorytellerHomeState()
StorytellerHome(
homeId = "your-home-screen-id",
state = homeState,
modifier = Modifier.fillMaxSize()
)
// Later, to reload data:
// LaunchedEffect(Unit) { homeState.reloadData() }Parameters
The unique identifier for the Home screen configuration to be loaded from the CMS. This is a mandatory parameter.
Optional UiTheme to apply to the Home screen and its child list components. If null (the default), the global theme set via Storyteller.theme will be used for all items. Individual list items within the Home configuration can also have their own themes, which would take precedence for that item.
The StorytellerListViewStyle (e.g., AUTO, LIGHT, DARK) to apply as a general style preference. Defaults to StorytellerListViewStyle.AUTO, which typically follows the system's light/dark mode setting. This can be overridden by themes applied at a more specific level (global theme or item-specific theme in CMS).
The StorytellerHomeState to manage the state of this Home screen, including scroll position and providing a reloadData function. Defaults to a new state remembered by rememberStorytellerHomeState.