Function

createFromBoolean

Creates a FillableData instance from a Boolean.

createFromBoolean

Source set: Android
public 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.

Return

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

createFromBoolean

Source set: Common
public 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.

Return

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

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: