Skip to content

Commit 7b71d34

Browse files
Deprecate TextController.asMutableState()
1 parent 9c73d7c commit 7b71d34

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

workflow-ui/compose/src/main/java/com/squareup/workflow1/ui/compose/TextControllerAsMutableState.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ import kotlinx.coroutines.launch
2727
* onValueChange = { text = it }
2828
* )
2929
*/
30+
@Deprecated(
31+
message = "Deprecated in favor of asMutableTextFieldValueState()",
32+
replaceWith = ReplaceWith(
33+
expression = "asMutableTextFieldValueState()",
34+
imports = arrayOf("com.squareup.workflow1.ui.compose.asMutableTextFieldValueState()"),
35+
)
36+
)
3037
@Composable public fun TextController.asMutableState(): MutableState<String> {
3138
// keys are set to `this` to reset the state if a different controller is passed in…
3239
return remember(this) { mutableStateOf(textValue) }.also { state ->

0 commit comments

Comments
 (0)