---
title: "createFromText"
description: "Creates a [FillableData] instance from a [CharSequence].

This function is used to wrap a text value for autofill purposes."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


```kotlin
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.

#### 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. |




<div class='sourceset sourceset-android'>Android</div>


```kotlin
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.

#### 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`. |




