@@ -21,6 +21,7 @@ import androidx.compose.ui.unit.TextUnit
2121import com.commandiron.animatable_compose.state.AnimatableState
2222import com.commandiron.animatable_compose.state.AnimatableStateTag
2323import com.commandiron.animatable_compose.state.SharedAnimatableState
24+ import org.w3c.dom.Text
2425
2526@Composable
2627fun AnimatableText (
@@ -41,6 +42,7 @@ fun AnimatableText(
4142 style : TextStyle = LocalTextStyle .current,
4243 state : SharedAnimatableState ,
4344 stateIndex : Int = 0,
45+ fixedFontSize : TextUnit ? = null,
4446 @FloatRange(from = 0.0 , to = 1.0 )
4547 fixedAlpha : Float? = null,
4648 fixedOffset : DpOffset = DpOffset .Unspecified ,
@@ -64,7 +66,7 @@ fun AnimatableText(
6466 .alpha(fixedAlpha ? : stateIn.animatedAlpha)
6567 .then(modifier),
6668 color = color,
67- fontSize = stateIn.animatedFontSize,
69+ fontSize = fixedFontSize ? : stateIn.animatedFontSize,
6870 fontStyle = fontStyle,
6971 fontWeight = fontWeight,
7072 fontFamily = fontFamily,
@@ -98,6 +100,7 @@ fun AnimatableText(
98100 onTextLayout : (TextLayoutResult ) -> Unit = {},
99101 style : TextStyle = LocalTextStyle .current,
100102 state : AnimatableState ,
103+ fixedFontSize : TextUnit ? = null,
101104 @FloatRange(from = 0.0 , to = 1.0 )
102105 fixedAlpha : Float? = null,
103106 fixedOffset : DpOffset = DpOffset .Unspecified ,
@@ -118,7 +121,7 @@ fun AnimatableText(
118121 .alpha(fixedAlpha ? : state.animatedAlpha)
119122 .then(modifier),
120123 color = color,
121- fontSize = state.animatedFontSize,
124+ fontSize = fixedFontSize ? : state.animatedFontSize,
122125 fontStyle = fontStyle,
123126 fontWeight = fontWeight,
124127 fontFamily = fontFamily,
0 commit comments