# widgets

The next-service home-screen widget: responsibilities, supported exports and extension points.

## Purpose [#purpose]

The next-service widget (US33, RF32) on iOS (small and medium, `expo-widgets`) and Android (`react-native-android-widget`). The app formats everything it shows, so the package holds no copy beyond the signed-out brand: the props, the per-platform renderers and one serialized `syncServiceWidget`. The `widgets.next-service` flag (default on) is the runtime switch; `apps/mobile/widget.config.json` is the build switch.

## Public exports [#public-exports]

| Subpath     | Target                             |
| ----------- | ---------------------------------- |
| `.`         | `./src/index.ts`                   |
| `./model`   | `./src/model.ts`                   |
| `./sync`    | `./src/sync.ts`                    |
| `./ios`     | `./src/service-widget-ios.tsx`     |
| `./android` | `./src/service-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]

A widget's background is an opaque token color, never a material, so Reduce Transparency changes nothing. An iOS `"widget"` layout is serialized without the values it imports: colors and the fallback are inlined. Clear private widget state on sign-out (`SIGNED_OUT`). Keep platform-only imports behind their explicit entry, and rebuild the native client after changing the plugin configuration.

Read [Services and reminders](/docs/features/service#home-screen-widget-us33) for what the widget shows.

## Key files [#key-files]

- [`packages/widgets/package.json`](https://github.com/CarlosZiegler/autofolio/blob/main/packages/widgets/package.json)
- [`apps/mobile/src/features/service/service.widget.ts`](https://github.com/CarlosZiegler/autofolio/blob/main/apps/mobile/src/features/service/service.widget.ts)

