diff --git a/platform/animator/src/main/java/com/jeanbarrossilva/orca/platform/animator/animation/animatable/Animatable.kt b/platform/animator/src/main/java/com/jeanbarrossilva/orca/platform/animator/animation/animatable/Animatable.kt index 522dc2b8a..6d10b8761 100644 --- a/platform/animator/src/main/java/com/jeanbarrossilva/orca/platform/animator/animation/animatable/Animatable.kt +++ b/platform/animator/src/main/java/com/jeanbarrossilva/orca/platform/animator/animation/animatable/Animatable.kt @@ -22,6 +22,8 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.collectAsState import com.jeanbarrossilva.orca.ext.coroutines.await +import com.jeanbarrossilva.orca.ext.coroutines.getValue +import com.jeanbarrossilva.orca.ext.coroutines.setValue import com.jeanbarrossilva.orca.platform.animator.animation.Animation import com.jeanbarrossilva.orca.platform.animator.animation.timing.Timing import com.jeanbarrossilva.orca.platform.animator.animation.timing.immediately diff --git a/platform/animator/src/main/java/com/jeanbarrossilva/orca/platform/animator/animation/animatable/MutableStateFlow.extensions.kt b/platform/animator/src/main/java/com/jeanbarrossilva/orca/platform/animator/animation/animatable/MutableStateFlow.extensions.kt deleted file mode 100644 index bd133c558..000000000 --- a/platform/animator/src/main/java/com/jeanbarrossilva/orca/platform/animator/animation/animatable/MutableStateFlow.extensions.kt +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright © 2024 Orca - * - * This program is free software: you can redistribute it and/or modify it under the terms of the - * GNU General Public License as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with this program. If - * not, see https://www.gnu.org/licenses. - */ - -package com.jeanbarrossilva.orca.platform.animator.animation.animatable - -import kotlin.reflect.KProperty -import kotlinx.coroutines.flow.MutableStateFlow - -/** - * Changes the current value of this [MutableStateFlow]. - * - * @param T Object to change this [MutableStateFlow]'s current one to. - */ -internal operator fun MutableStateFlow.setValue( - thisRef: Any, - property: KProperty<*>, - value: T -) { - this.value = value -} diff --git a/platform/animator/src/main/java/com/jeanbarrossilva/orca/platform/animator/animation/animatable/StateFlow.extensions.kt b/platform/animator/src/main/java/com/jeanbarrossilva/orca/platform/animator/animation/animatable/StateFlow.extensions.kt deleted file mode 100644 index 5bfe2bfb8..000000000 --- a/platform/animator/src/main/java/com/jeanbarrossilva/orca/platform/animator/animation/animatable/StateFlow.extensions.kt +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright © 2024 Orca - * - * This program is free software: you can redistribute it and/or modify it under the terms of the - * GNU General Public License as published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with this program. If - * not, see https://www.gnu.org/licenses. - */ - -package com.jeanbarrossilva.orca.platform.animator.animation.animatable - -import kotlin.reflect.KProperty -import kotlinx.coroutines.flow.StateFlow - -/** - * Obtains the value of this [StateFlow]. - * - * @param T Object to be returned, held by this [StateFlow]. - */ -internal operator fun StateFlow.getValue(thisRef: Any, property: KProperty<*>): T { - return value -}