createFromBoolean
Creates a [FillableData] instance from a [Boolean].
createFromBoolean
Function
Common
expect fun FillableData.Companion.createFromBoolean(booleanValue: Boolean): FillableData?
Creates a FillableData instance from a Boolean.
This function is used to wrap a boolean value for autofill purposes, such as the state of a checkbox or a switch.
Parameters
| booleanValue | The boolean data to be used for autofill. |
Returns
A FillableData object containing the boolean data, or null if the platform does not support autofill. |
Android
actual fun FillableData.Companion.createFromBoolean(booleanValue: Boolean): FillableData?
Creates a FillableData instance from a Boolean.
This function is used to wrap a boolean value for autofill purposes, such as the state of a
checkbox or a switch. On Android, it creates an AutofillValue that represents a toggle state.
Parameters
| booleanValue | The boolean data to be used for autofill. |
Returns
A FillableData object containing the boolean data, or null if the platform version is lower than Build.VERSION_CODES.O. |