This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun AnimatedTextTextField( | |
value: String, | |
onValueChange: (String) -> Unit, | |
modifier: Modifier = Modifier, | |
textStyle: TextStyle = TextStyle(fontSize = 50.sp) | |
) { | |
val scope = rememberCoroutineScope() | |
val animatables = remember { mutableStateMapOf<Int, Animatable<Float, AnimationVector1D>>() } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@OptIn(ExperimentalLayoutApi::class) | |
@Composable | |
fun AnimateCharTextField( | |
value: String, | |
onValueChange: (String) -> Unit, | |
modifier: Modifier = Modifier, | |
textStyle: TextStyle = TextStyle(fontSize = 50.sp) | |
) { | |
val scope = rememberCoroutineScope() | |
val animatables = remember { mutableStateMapOf<Int, Animatable<Float, AnimationVector1D>>() } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val lifecycleOwner = LocalLifecycleOwner.current | |
DisposableEffect(lifecycleOwner) { | |
val lifecycleEventObserver = LifecycleEventObserver { lifecycleOwner, event -> | |
when (event) { | |
Lifecycle.Event.ON_CREATE -> Log.d("compose lifecycle", event.name) | |
Lifecycle.Event.ON_START -> Log.d("compose lifecycle", event.name) | |
Lifecycle.Event. ON_RESUME -> Log.d("compose lifecycle", event.name) | |
Lifecycle.Event.ON_PAUSE -> Log.d("compose lifecycle", event.name) | |
Lifecycle.Event.ON_STOP -> Log.d("compose lifecycle", event.name) | |
Lifecycle.Event.ON_DESTROY -> Log.d("compose lifecycle", event.name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/widget.dart'; | |
import 'package:flutter/materail.dart'; | |
import 'package:flutter/cupertnio.dart'; | |
void main() => runApp(const MyApp()); | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override | |
Widget build(BuildContext context) { |