rememberPCIFieldState
Creates a new instance of PCIFieldState that persists across configuration changes. This composable function should be used to create state holders for PCI-compliant input fields in the payment form.
The state is automatically preserved across:
Configuration changes (e.g., screen rotation)
Process death and recreation
Navigation events
Example:
@Composable
fun PaymentForm() {
val cardNumberState = rememberPCIFieldState()
val expirationState = rememberPCIFieldState()
Column {
CardNumberTextField(state = cardNumberState)
ExpirationDateTextField(state = expirationState)
}
}
Content copied to clipboard
Return
A new PCIFieldState instance that will be preserved across configuration changes