| Parameter | Type | Description |
|---|---|---|
| uiState | HomeUiState | |
| pokemonList | List<Pokemon> | |
| onLoadMore | () -> Unit,
onRetry: () -> Unit,
onCardClick: (Pokemon) -> Unit, |
| Parameter | Type | Description |
|---|---|---|
| uiState | HomeUiState | |
| pokemonList | List<Pokemon> | |
| onLoadMore | () -> Unit,
onRetry: () -> Unit,
onCardClick: (Pokemon) -> Unit, |
| Parameter | Type | Description |
|---|---|---|
| uiState | HomeUiState | |
| pokemonList | List<Pokemon> | |
| onLoadMore | () -> Unit,
onRetry: () -> Unit,
onCardClick: (Pokemon) -> Unit, |
| Parameter | Type | Description |
|---|---|---|
| pokemon | Pokemon | |
| uiState | DetailsUiState | |
| pokemonInfo | PokemonInfo? | |
| onRetry | () -> Unit = {}, |
| Parameter | Type | Description |
|---|---|---|
| pokemon | Pokemon | |
| uiState | DetailsUiState | |
| pokemonInfo | PokemonInfo? | |
| onRetry | () -> Unit = {}, |
| Parameter | Type | Description |
|---|---|---|
| pokemon | Pokemon | |
| uiState | DetailsUiState | |
| pokemonInfo | PokemonInfo? | |
| onRetry | () -> Unit = {}, |
| Parameter | Type | Description |
|---|---|---|
| uiState | SettingsUiState | |
| onChangeUiTheme | (UiTheme) -> Unit,
onDismiss: () -> Unit, |
| Parameter | Type | Description |
|---|---|---|
| uiState | SettingsUiState | |
| onChangeUiTheme | (UiTheme) -> Unit,
onDismiss: () -> Unit, |
| Parameter | Type | Description |
|---|---|---|
| modifier | Modifier Modifier | |
| onActionClick | () -> Unit = {} |
Text that substitutes [previewText] whenever it renders inside a preview or a screenshot test. Values like a Pokémon's id arrive from the network, so without this a golden image would either be blank or would have to wait on a fake. Swapping in a fixed string keeps every rendered image byte identical from run to run.
| Parameter | Type | Description |
|---|---|---|
| text | String | |
| modifier | Modifier Modifier | |
| previewText | String text | |
| color | Color Color.Unspecified | |
| fontSize | TextUnit TextUnit.Unspecified | |
| fontWeight | FontWeight? null | |
| textAlign | TextAlign? null | |
| overflow | TextOverflow TextOverflow.Clip | |
| maxLines | Int Int.MAX_VALUE | |
| style | TextStyle LocalTextStyle.current |
A stat bar that animates from empty to [progress] and prints its label inside the filled part when there is room, outside it when there is not. The original read `LocalConfiguration.screenWidthDp`, which only exists on Android. [BoxWithConstraints] gives the same measurement on every platform and, unlike a screen width, it reports the width this bar actually got rather than the width of the window.
| Parameter | Type | Description |
|---|---|---|
| progress | Float | |
| color | Color | |
| label | String | |
| modifier | Modifier Modifier |
Shown when a request fails. It always offers a retry, because the alternative the app had before was an indistinguishable spinner that never resolved.
| Parameter | Type | Description |
|---|---|---|
| message | String? | |
| onRetry | () -> Unit,
modifier: Modifier = Modifier, |
Text that substitutes [previewText] whenever it renders inside a preview or a screenshot test. Values like a Pokémon's id arrive from the network, so without this a golden image would either be blank or would have to wait on a fake. Swapping in a fixed string keeps every rendered image byte identical from run to run.
| Parameter | Type | Description |
|---|---|---|
| text | String | |
| modifier | Modifier Modifier | |
| previewText | String text | |
| color | Color Color.Unspecified | |
| fontSize | TextUnit TextUnit.Unspecified | |
| fontWeight | FontWeight? null | |
| textAlign | TextAlign? null | |
| overflow | TextOverflow TextOverflow.Clip | |
| maxLines | Int Int.MAX_VALUE | |
| style | TextStyle LocalTextStyle.current |