MiddleEllipsisText

fun MiddleEllipsisText(text: String, modifier: Modifier = Modifier, color: Color = Color.Unspecified, fontSize: TextUnit = TextUnit.Unspecified, fontStyle: FontStyle? = null, fontWeight: FontWeight? = null, fontFamily: FontFamily? = null, letterSpacing: TextUnit = TextUnit.Unspecified, textDecoration: TextDecoration? = null, textAlign: TextAlign? = null, lineHeight: TextUnit = TextUnit.Unspecified, softWrap: Boolean = true, onTextLayout: (TextLayoutResult) -> Unit = {}, style: TextStyle = LocalTextStyle.current, ellipsisChar: Char = '.', ellipsisCharCount: Int = 3)

A Text composable that shows the middle part of the text if the text is too long to fit in the given constraints.

Note: Middle ellipsis text is not yet supported in Compose. This is a temporary solution until the official support is added. see this issue for more details: https://issuetracker.google.com/issues/185418980