Val Salamakha
06/03/2020, 2:35 AMlabel: @Composable() (() -> Unit)? = null,
In the case it is easy to do the label optional. For example:
val decoratedPlaceholder: @Composable() (() -> Unit)? =
if (placeholder != null
&& ( (inputState.value == TextFieldPhase.Focused)
|| (inputState.value == TextFieldPhase.Focused
&& inputState.value == TextFieldPhase.UnfocusedEmpty)
|| (inputState.value == TextFieldPhase.UnfocusedEmpty && label == null))
&& value.text.isEmpty()
) {
{
Decoration(...) ...
val decoratedLabel = @Composable () {
if (label != null)
Decoration(
contentColor = labelColor,
typography = labelAnimatedStyle,
children = label
)
}