Package-level declarations

Types

Link copied to clipboard
data class AsyncTextButton(val title: String, val enabled: Boolean = true, shape: ComposeValue<Shape> = { ButtonDefaults.shape }, containerColor: ComposeValue<Color> = { ButtonDefaults.buttonColors().containerColor }, textColor: ComposeValue<Color> = { ButtonDefaults.buttonColors().contentColor }, contentPadding: PaddingValues = ButtonDefaults.ContentPadding, coroutineScope: ComposeValue<CoroutineScope> = { rememberCoroutineScope() }, val action: suspend () -> Unit = {}) : ComposableContent
Link copied to clipboard
typealias ComposableBlock = @Composable () -> Unit

A type alias for a composable lambda function with no parameters and no return value.

Link copied to clipboard

An interface for types with the capability to render themselves in compose

Link copied to clipboard
typealias ComposeValue<T> = @Composable () -> T

A type alias for a composable lambda function with no parameters and a return value of type T. Useful for types of properties of a ComposableContent where a compose scope is needed

Link copied to clipboard

A ComposableContent with additional capability to render itself in as a model dialog

Link copied to clipboard

A sealed class to represent an image resource. It can be either a vector image or a drawable. This is useful to abstract the image resource type and use it in a composable function. The identifier can be used for tests.

Link copied to clipboard
interface OperationState
Link copied to clipboard
data class PendingActions<T : Any>(actions: List<T> = emptyList())

An immutable action holder data class to be used in UiStates and to be consumed in Compose to indicate pending loading async states.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface StringResource
Link copied to clipboard
typealias TestIdentifier = Enum<*>

A type alias on any enum type. Useful to set test tag on composable of a Screen to ensure uniqueness of the tags

Link copied to clipboard
sealed interface ViewState

Functions

Link copied to clipboard
fun AppTopAppBar(modifier: Modifier = Modifier, title: @Composable () -> Unit, navigationIcon: @Composable () -> Unit = {}, actions: @Composable RowScope.() -> Unit = {})
Link copied to clipboard
fun AsyncButton(modifier: Modifier = Modifier, isLoading: Boolean = false, enabled: Boolean = isLoading.not(), shape: Shape = ButtonDefaults.shape, containerColor: Color = ButtonDefaults.buttonColors().containerColor, contentColor: Color = ButtonDefaults.buttonColors().contentColor, contentPadding: PaddingValues = ButtonDefaults.ContentPadding, onClick: () -> Unit = {}, content: @Composable RowScope.() -> Unit)

A button that renders a circular progress CircularProgressIndicator in case of loading or content otherwise

Link copied to clipboard
Link copied to clipboard
fun AsyncImageResource(url: String?, modifier: Modifier = Modifier, contentDescription: String = "", contentScale: ContentScale = ContentScale.Fit, loading: @Composable BoxScope.() -> Unit = { }, error: @Composable BoxScope.() -> Unit = { })

Composable function to display an image from a remote url

Link copied to clipboard
fun AsyncSwitch(modifier: Modifier = Modifier, isLoading: Boolean = false, checked: Boolean, onCheckedChange: (Boolean) -> Unit, enabled: Boolean = isLoading.not())
Link copied to clipboard
fun AsyncTextButton(text: String, modifier: Modifier = Modifier, isLoading: Boolean = false, enabled: Boolean = isLoading.not(), shape: Shape = ButtonDefaults.shape, containerColor: Color = ButtonDefaults.buttonColors().containerColor, textColor: Color = ButtonDefaults.buttonColors().contentColor, contentPadding: PaddingValues = ButtonDefaults.ContentPadding, onClick: () -> Unit = {})

A button that renders a circular progress CircularProgressIndicator in case of loading or text otherwise

Link copied to clipboard
Link copied to clipboard
fun CircleShimmerEffect(modifier: Modifier, duration: Int = ShimmerEffectDefaults.durationMillis, color: Color = ShimmerEffectDefaults.color)

Renders a circle Compose Box with a shimmer loading effect

Link copied to clipboard
fun CommonScaffold(title: String, modifier: Modifier = Modifier, navigationIcon: @Composable () -> Unit = {}, actions: @Composable RowScope.() -> Unit = {}, content: @Composable ColumnScope.() -> Unit)
Link copied to clipboard
fun DefaultElevatedCard(modifier: Modifier = Modifier, shape: Shape = CardDefaults.shape, content: @Composable ColumnScope.() -> Unit)

Default Material Design elevated card.

Link copied to clipboard
fun DescriptionGridRow(description: @Composable BoxScope.() -> Unit, modifier: Modifier = Modifier, content: @Composable BoxScope.() -> Unit)
Link copied to clipboard
Link copied to clipboard

Applies the height of the font size, useful when declaring shimmer effects to replicate a loading text

Link copied to clipboard

A composable that notifies the lifecycle events of the current lifecycle owner

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <State : OperationState> OperationStateAlert(state: State, modifier: Modifier = Modifier, onClose: () -> Unit)
fun <State : OperationState> OperationStateAlert(state: MutableState<State>, modifier: Modifier = Modifier, onClose: () -> Unit = {})
Link copied to clipboard
fun PermissionRequester(missingPermissions: Set<String>, onResult: (Boolean, String) -> Unit)
Link copied to clipboard
fun ProcessingOverlay(viewState: ViewState, modifier: Modifier = Modifier, processingContent: @Composable BoxScope.() -> Unit = { CircularProgressIndicator() }, content: @Composable BoxScope.() -> Unit)
fun ProcessingOverlay(isProcessing: Boolean, modifier: Modifier = Modifier, processingContent: @Composable BoxScope.() -> Unit = { CircularProgressIndicator() }, content: @Composable BoxScope.() -> Unit)
Link copied to clipboard
fun RectangleShimmerEffect(modifier: Modifier, duration: Int = ShimmerEffectDefaults.durationMillis, color: Color = ShimmerEffectDefaults.color)

Renders a rectangle Compose Box with a shimmer loading effect

Link copied to clipboard
fun RepeatingLazyColumn(modifier: Modifier = Modifier, itemCount: Int = DEFAULT_REPEATING_ITEMS_COUNT, content: @Composable LazyItemScope.() -> Unit)

Renders a lazy column with itemCount same contents. Helpful when rendering loading list items

Link copied to clipboard
fun ShimmerEffectBox(modifier: Modifier = Modifier, shape: Shape = ShimmerEffectDefaults.shape, duration: Int = ShimmerEffectDefaults.durationMillis, color: Color = ShimmerEffectDefaults.color)

Renders a Compose Box with a shimmer loading effect

Link copied to clipboard
Link copied to clipboard
fun SuspendButton(title: String, state: MutableState<ViewState> = remember { mutableStateOf(ViewState.Idle) }, action: suspend () -> Unit)
fun SuspendButton(processingDebounceDuration: Duration = 150.milliseconds, state: MutableState<ViewState> = remember { mutableStateOf(ViewState.Idle) }, action: suspend () -> Unit, label: @Composable () -> Unit)
Link copied to clipboard
fun TestIdentifier.tag(suffix: String? = null): String

Constructs the test tag of an enum as EnumTypeName:EnumCaseName

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Modifier.testIdentifier(identifier: TestIdentifier, suffix: String? = null): Modifier

Sets the test tag of a composable to the tag of the enum case.

Link copied to clipboard
fun ValidatedOutlinedTextField(modifier: Modifier = Modifier, value: String = "", onValueChange: (String) -> Unit, labelText: String = "", errorText: String? = null, singleLine: Boolean = true, keyboardOptions: KeyboardOptions = KeyboardOptions.Default.copy(imeAction = ImeAction.Next), visualTransformation: VisualTransformation = VisualTransformation.None, readOnly: Boolean = false, trailingIcon: ComposableBlock? = null, keyboardActions: KeyboardActions = KeyboardActions.Default)
Link copied to clipboard
fun VerticalSpacer(height: Dp = Spacings.medium)
Link copied to clipboard
fun ViewStateAlert(state: MutableState<ViewState>, modifier: Modifier = Modifier)
fun ViewStateAlert(state: ViewState, modifier: Modifier = Modifier, onClose: () -> Unit)