Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
object UiTestTag

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The height of a screen, that's inside a route, excluding the BottomNavigationBarHeight

Link copied to clipboard

Gets the height of the system's navigation bar (recent items, home, back). Useful to setting the height of the app's bottomBar when using enableEdgeToEdge. And this method seems to be kinda blocking. In my Samsung it's 48.dp

Link copied to clipboard

Functions

Link copied to clipboard
fun <T> Modifier.addIfNotNull(value: T?, modifierOp: Modifier.(value: T) -> Modifier): Modifier

Util to only add changes to a Modifier is value is not null to avoid unused processing

Link copied to clipboard

Util to only apply a modifierOp if condition is true, in order to reduce lines and improve readability

Link copied to clipboard
fun Context.base64ToImageRequest(base64: String): ImageRequest
Link copied to clipboard
fun BoxWithBackground(resourceId: Int, boxModifier: Modifier = Modifier.fillMaxSize(), contentScale: ContentScale = ContentScale.FillBounds, invert: Boolean = false, content: @Composable BoxWithConstraintsScope.() -> Unit)
Link copied to clipboard
fun CenteredColumn(modifier: Modifier = Modifier.fillMaxSize(), content: @Composable ColumnScope.() -> Unit)
Link copied to clipboard
fun CenteredRow(modifier: Modifier = Modifier.fillMaxWidth(), horizontalPadding: Dp = HorizontalPadding, content: @Composable RowScope.() -> Unit)
Link copied to clipboard
Link copied to clipboard
fun Modifier.fadingEdge(transparencyGradient: Brush): Modifier

Shows the composable via drawContent, but only where the two images overlap according to transparencyGradient, which should be a black to white or white to black gradient.

Link copied to clipboard
fun ImageRequest?.hasError(ctx: Context): Boolean

This is useful in the case an image that was saved was deleted

Link copied to clipboard

Involves content with a Box with a light secondaryContainer background with a light outline border

Link copied to clipboard
Link copied to clipboard
fun Context.pathToImageRequest(path: Uri): ImageRequest
Link copied to clipboard
fun rainbowWith(hueShift: Float, saturation: Float = 1.0f, lightness: Float = 0.5f): Array<Pair<Float, Color>>

Defines colorStops, which is an array of Colors and their offset (ranges) throughout a gradient. Useful for Brush.linearGradient

Link copied to clipboard

Util function that creates a remembered value and that has a function to toggle the boolean state, thus avoiding doing:

Link copied to clipboard
Link copied to clipboard
fun SmoothHorizontalDivider(color: Color = Color.White, modifier: Modifier = Modifier, thickness: Dp = 1.dp, cornerRadius: Dp = 2.dp)
Link copied to clipboard
fun SmoothHorizontalDividerCustom(width: Dp, color: Color = Color.White, modifier: Modifier = Modifier, thickness: Dp = 1.dp, cornerRadius: Dp = 2.dp)
Link copied to clipboard

Gets Dp size of a text (considering the default text size)

Link copied to clipboard
fun Context.toast(@StringRes text: Int, param: String = "")

Creates a Toast that uses the Main/UI thread (as required when using Toast)

Link copied to clipboard
fun TransparencyGradient(position: TransparentGradientPosition = TransparentGradientPosition.Top, extraBottomPadding: Dp = 0.dp): Brush

Util function to create a Brush that can be passed to fadingEdge to create a fade in/out of a composable

Link copied to clipboard