I am using OutlineTextField and the value is taken from TextFieldValue. I have a save button on top of it which gets enabled if there is entered text and disabled vice versa. I have validated using below code

val textFieldState = remember {
mutableStateOf(TextFieldValue(EMPTY))
}
onSaveClickEnabled = textFieldState.value.text.isNotEmpty(),
But the above code is not validating if space entered initially. It enables SAVE button even I enter space. I tried doing trim but no luck.
So I need to validate in a way that if space and character entered together then only it should enable save button otherwise if only space entered, it should keep the save as disabled.

You can use the
Stringclass functionisBlank()This will return true if string is empty or if it only contains WhiteSpace characters.
So in your case