SecureCreditCardField

fun SecureCreditCardField(onValueChange: (SecureCreditCardNumber) -> Unit, textStyle: TextStyle, shape: Shape, colors: TextFieldColors, textFieldPadding: PaddingValues, modifier: Modifier = Modifier, recognitionIntent: PendingIntent? = null, cardRecognitionLauncher: CardActivityResultLauncher? = null, separator: String = " ", initialValue: String = "", label: @Composable () -> Unit)

Composable function representing a secure input field for entering credit card numbers.

Parameters

onValueChange

The callback triggered when the value of the credit card number changes. It receives the entered credit card number, brand, and validity

textStyle

The text style to be applied to the input text.

shape

The shape customization for the credit card input field.

colors

The colors customization for the text field.

textFieldPadding

The padding to be applied to the input field.

modifier

The modifier for the credit card input field.

recognitionIntent

The PendingIntent to initiate OCR card recognition if available.

cardRecognitionLauncher

The ManagedActivityResultLauncher for launching the card recognition process.

separator

The separator string to visually group digits in the credit card number. Must be only one character. Defaults to a single space.

initialValue

The initial value to populate the credit card input field, used for OCR updates.

label

The composable function used to display the label for the input field.