@@ -40,18 +40,18 @@ fun Show6CardDealer() {
4040 val cardStates = mutableListOf<AnimatableState >()
4141 val textStates = mutableListOf<AnimatableState >()
4242
43- deck.indices.forEach {
43+ deck.indices.forEach { index ->
4444 cardStates.add(
4545 animatableCardState.copy(
46- index = it ,
47- toTargetOffsetAnimationSpec = tween(400 , (it * 400 )),
48- targetOffset = DpOffset (if (it % 2 == 0 ) (- 100 ).dp else 100 .dp, (- 150 ).dp)
46+ index = index ,
47+ toTargetOffsetAnimationSpec = tween(400 , (index * 400 )),
48+ targetOffset = DpOffset (if (index % 2 == 0 ) (- 100 ).dp else 100 .dp, (- 150 ).dp)
4949 )
5050 )
5151 textStates.add(
5252 animatableTextState.copy(
53- index = it ,
54- toTargetFontSizeAnimationSpec = tween(400 , (it * 400 ))
53+ index = index ,
54+ toTargetFontSizeAnimationSpec = tween(400 , (index * 400 ))
5555 )
5656 )
5757
@@ -68,18 +68,18 @@ fun Show6CardDealer() {
6868 },
6969 contentAlignment = Alignment .Center
7070 ) {
71- deck.indices.forEach {
71+ deck.indices.forEach { index ->
7272 AnimatableCard (
7373 onClick = {},
7474 state = sharedAnimatableState,
75- stateIndex = it ,
75+ stateIndex = index ,
7676 fixedShape = RoundedCornerShape (16 .dp)
7777 ) {
7878 Box (Modifier .fillMaxSize(), Alignment .Center ) {
7979 AnimatableText (
80- text = deck[it ],
80+ text = deck[index ],
8181 state = sharedAnimatableState,
82- stateIndex = it
82+ stateIndex = index
8383 )
8484 }
8585 }
0 commit comments