# widgets

Optional native Todo widgets: responsibilities, supported exports and extension points.

## Purpose [#purpose]

The shared model derives Todo counts and a bounded list of open titles. Platform adapters synchronize iOS snapshots and Android widgets. Native widget configuration is opt-in and the widgets.todo-summary flag defaults off.

## Public exports [#public-exports]

| Subpath | Target |
| --- | --- |
| `.` | `./src/index.ts` |
| `./model` | `./src/model.ts` |
| `./sync` | `./src/sync.ts` |
| `./ios` | `./src/todo-widget-ios.tsx` |
| `./android` | `./src/todo-widget-android.tsx` |

These paths come from `packages/widgets/package.json`. A `.` entry is the package root. Conditional targets distinguish platform or type resolution; consumers should import the subpath, not its source file.

## How to extend [#how-to-extend]

Enable the platform integration deliberately, rebuild the native client and synchronize only the current authorized scope. Clear private widget state on identity changes. Keep platform-only imports behind their explicit entry.

Read the [optional native todo widgets guide](/docs/features/mobile) for the full flow.

## Key files [#key-files]

- [`packages/widgets/package.json`](https://github.com/CarlosZiegler/doro/blob/main/packages/widgets/package.json)

