Compose Unstyled 2.0 is out! Check the official announcement blog ->
Function

createFromText

Creates a FillableData instance from a CharSequence.

createFromText

Source set: Common
expect fun FillableData.Companion.createFromText(textValue: CharSequence): FillableData?

Creates a FillableData instance from a CharSequence.

This function is used to wrap a text value for autofill purposes. Depending on the platform, the text might be truncated to a safe length if it is too long to prevent crashing the IPC.

Parameters

textValue The text data to be used for autofill.

Returns

A FillableData object containing the text data, or null if the platform does not support autofill.

createFromText

Source set: Android
actual fun FillableData.Companion.createFromText(textValue: CharSequence): FillableData?

Creates a FillableData instance from a CharSequence.

This function is used to wrap a text value for autofill purposes. On Android, it creates an AutofillValue that contains the provided text. The text will be truncated to a safe length if it is too long to prevent android.os.TransactionTooLargeException.

Parameters

textValue The text data to be used for autofill.

Returns

A FillableData object containing the text data, or null if the platform version is lower than Build.VERSION_CODES.O.

Last updated: