Skip to content

Package-level declarations

Functions

Name

Summary

rememberFontIconPainter

Common

kotlin
@Composable
fun rememberFontIconPainter(icon: Char, tint: Color = LocalIconTintProvider.current?.current ?: LocalIconTint.current, weight: FontWeight = LocalIconWeight.current, iconFont: IconFont = LocalIconFont.current, size: Dp = LocalIconSize.current): Painter

Returns a Painter that draws the icon icon using iconFont (with a default value of LocalIconFont). The painter's intrinsic size will be size × size dp, and will be tinted with tint. If iconFont is a variable font, weight will be applied as a variation setting, or else the font with the nearest weight will be picked.

kotlin
@Composable
fun rememberFontIconPainter(iconName: String, tint: Color = LocalIconTintProvider.current?.current ?: LocalIconTint.current, weight: FontWeight = LocalIconWeight.current, iconFont: IconFont = LocalIconFont.current, size: Dp = LocalIconSize.current): Painter

Returns a Painter that draws the icon iconName using iconFont (with a default value of LocalIconFont). The painter's intrinsic size will be size × size dp, and will be tinted with tint. If iconFont is a variable font, weight will be applied as a variation setting, or else the font with the nearest weight will be picked.