ShakingTextFieldWithIconAndFocus

fun ShakingTextFieldWithIconAndFocus(key: String, textFieldValue: String, onValueChange: (String) -> Unit, onFocusChanged: (Boolean) -> Unit, label: String, isError: Boolean, errorText: String, offsetX: Animatable<Float, AnimationVector1D>, leadingIcon: ImageVector = Icons.Default.LocalShipping, keyboardOptions: KeyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Text), visualTransformation: VisualTransformation = VisualTransformation.None)

Composable function for rendering a shaking text field with an icon and focus-related features.

Parameters

key

A unique key for identifying the text field.

textFieldValue

The current value of the text field.

onValueChange

Callback for handling changes in the text field value.

onFocusChanged

Callback for handling changes in the focus state of the text field.

label

The label of the text field.

isError

Flag indicating whether there is an error in the text field.

errorText

The error text to display.

offsetX

Animatable for applying a shaking animation to the text field.

leadingIcon

The leading icon for the text field.

keyboardOptions

Keyboard options for the text field.

visualTransformation

Visual transformation for the text field.