# FillableData

Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/autofill/FillableData.kt+class:androidx.compose.ui.autofill.FillableData) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0) Common/AllAndroid/JVM
- Cmn

  ```
  interface FillableData
  ```

*** ** * ** ***

Represents a single piece of data for autofill purposes.

An instance of `FillableData` is expected to hold a value of a single specific type. Consumers can use the corresponding property to retrieve the value. For any given instance, only the property that matches the underlying data's type will return a non-null value. All other properties will return `null`.

## Summary

| ### Nested types |
|---|
| `object https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/FillableData.Companion` |

| ### Public functions |
|---|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/FillableData#getDateMillisOrDefault(kotlin.Long)(defaultValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Returns the date in milliseconds value if it is available, otherwise returns the `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/FillableData#getDateMillisOrDefault(kotlin.Long)`. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/FillableData#getListIndexOrDefault(kotlin.Int)(defaultValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the list index value if it is available, otherwise returns the `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/FillableData#getListIndexOrDefault(kotlin.Int)`. | Cmn |

| ### Public properties |
|---|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/FillableData#booleanValue()` The `Boolean` representation of the data, or `null` if none is available. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/FillableData#dateMillisValue()` The date in milliseconds since epoch, or `null` if none is available. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/FillableData#listIndexValue()` The `Int` (integer) representation of the data, or `null` if none is available. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/FillableData#textValue()` The `CharSequence` (text) representation of the data, or `null` if none is available. | Cmn |

| ### Extension functions |
|---|---|---|
| `https://developer.android.com/reference/android/view/autofill/AutofillValue.html?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/FillableData.https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/FillableData#(androidx.compose.ui.autofill.FillableData).toAutofillValue()()` Retrieves the underlying platform `https://developer.android.com/reference/android/view/autofill/AutofillValue.html` from the `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/FillableData`. | android |

## Public functions

### getDateMillisOrDefault

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
open fun getDateMillisOrDefault(defaultValue: Long): Long
```

Returns the date in milliseconds value if it is available, otherwise returns the `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/FillableData#getDateMillisOrDefault(kotlin.Long)`.

### getListIndexOrDefault

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
open fun getListIndexOrDefault(defaultValue: Int): Int
```

Returns the list index value if it is available, otherwise returns the `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/FillableData#getListIndexOrDefault(kotlin.Int)`.

## Public properties

### booleanValue

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
open val booleanValue: Boolean?
```

The `Boolean` representation of the data, or `null` if none is available.

### dateMillisValue

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
open val dateMillisValue: Long?
```

The date in milliseconds since epoch, or `null` if none is available.

### listIndexValue

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
open val listIndexValue: Int?
```

The `Int` (integer) representation of the data, or `null` if none is available.

### textValue

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
open val textValue: CharSequence?
```

The `CharSequence` (text) representation of the data, or `null` if none is available.

## Extension functions

### FillableData.toAutofillValue

android Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/autofill/FillableData.android.kt+function:toAutofillValue)

```
fun FillableData.toAutofillValue(): AutofillValue?
```

Retrieves the underlying platform `https://developer.android.com/reference/android/view/autofill/AutofillValue.html` from the `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/FillableData`.

| Returns |
|---|---|
| `https://developer.android.com/reference/android/view/autofill/AutofillValue.html?` | The platform `https://developer.android.com/reference/android/view/autofill/AutofillValue.html`, or `null` if the `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/FillableData` is not an instance of `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AndroidFillableData` or the platform version is lower than `https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#O`. |