Hi there, can anyone tell me, if Compose Multiplat...
# compose
a
Hi there, can anyone tell me, if Compose Multiplatform (is supposed to ) fully supports
TextAutoSize.StepBased()
? This is my
Text
Composable which lives in a `Column`:
Copy code
Text(
    text = achievement.title,
    style = MaterialTheme.typography.labelMedium,
    autoSize = TextAutoSize.StepBased(
        maxFontSize = 16.sp,
        minFontSize = 10.sp
    ),
    textAlign = TextAlign.Center,
    maxLines = 3,
    overflow = TextOverflow.Ellipsis,
    modifier = Modifier
        .fillMaxWidth()
        .padding(horizontal = 6.dp, vertical = 6.dp)
)
It scales perfectly in Preview and on Android. But not on iOS and Web (see screenshot). Is it supposed to work? Can anyone spot the issue in my Composable?
1
This is the entire Composable:
Copy code
@Composable
fun AchievementImageCell(
    achievement: Achievement,
    modifier: Modifier = Modifier
) {
    Column(
        modifier = Modifier
            .clip(RoundedCornerShape(8.dp))
            .then(modifier),
    ) {
        Box(
            modifier = Modifier
                .aspectRatio(1f)
        ) {
            val painter = rememberAsyncImagePainter(
                model = achievement.imageUrl,
                contentScale = ContentScale.Fit
            )
            val painterState by painter.state.collectAsState()

            when (painterState) {
                is AsyncImagePainter.State.Success -> Image(
                    painter = painter,
                    contentDescription = achievement.title,
                    contentScale = ContentScale.Fit,
                    modifier = Modifier.padding(8.dp).align(Alignment.Center)
                )

                else -> Placeholder(
                    modifier = Modifier.align(Alignment.Center)
                )
            }
        }
        Text(
            text = achievement.title,
            style = MaterialTheme.typography.labelMedium,
            autoSize = TextAutoSize.StepBased(
                maxFontSize = 16.sp,
                minFontSize = 10.sp
            ),
            textAlign = TextAlign.Center,
            maxLines = 3,
            overflow = TextOverflow.Ellipsis,
            modifier = Modifier
                .fillMaxWidth()
                .padding(horizontal = 6.dp, vertical = 6.dp)
        )
    }
}
i
thank you color 1