---
title: HWDataOnly
description: Declare data fields without rendering anything.
---
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.page/abausg/home_widget/llms.txt
> Use this file to discover all available pages before exploring further.

# HWDataOnly

A non-visual widget that contributes data fields to the generated widget data class without producing any view output. Useful for fields you want to read in click handlers, deep links, or background updates but do not want to display.

```dart
HWDataOnly([HWString('label'), HWInt('value')])
```

Combine it with a visible widget tree using [`HWColumn`](/generator/widgets/hw-column) or similar — `HWDataOnly` itself emits nothing.

Inside the `item` of a [list builder](/generator/lists), `HWDataOnly([HWItemData(HWString('id'))])` declares item fields that are saved and read back but never shown.

## Parameters

| Name   | Type                | Default      | Description                                       |
| ------ | ------------------- | ------------ | ------------------------------------------------- |
| `data` | `List<HWDataType>`  | **required** | Fields added to the generated data class.         |

See [Data Types](/generator/data) for the available `HWDataType` variants.

## Platform mapping

- **iOS:** emits no SwiftUI view; only adds the fields to the entry data type. See [WidgetKit `TimelineEntry`](https://developer.apple.com/documentation/widgetkit/timelineentry).
- **Android:** emits no Glance content; only adds the fields to the data class. See [Glance state](https://developer.android.com/develop/ui/compose/glance/manage-and-update-glance-widget).
