Here is the code how I implement my button. Is there any way to lottie animation took place without increase size and without apply fix height of button.
Button(modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 10.dp),
enabled = enabled,
onClick = {
onClick()
}) {
if (isLoading) {
LottieAnimation(
composition = composition,
iterations = Int.MAX_VALUE,
alignment = Alignment.Center,
dynamicProperties = dynamicProperties,
)
} else {
Text(
text = text,
)
}
}