# Bundle an Asset Store filter in Flutter

> Declare a production .nosmai package folder as a Flutter asset, discover it through Dart, and apply its local path.

> For AI agents: the complete documentation index is at https://nosmai.com/llms/effects.txt

Product: Nosmai Effects
Group: guide
Source: https://nosmai.com/docs/effects/guides/filters/bundle-an-asset-store-filter/flutter/

## Prerequisites

- A working [Flutter quickstart](/docs/effects/quickstart/flutter/)
- A downloaded `.nosmai` package and its required resources

## Add the package resources

```text
assets/nosmai_filters/heart_face/
  heart_face.nosmai
  heart_face_manifest.json
  heart_face_preview.png
```

Declare the folder:

```yaml
flutter:
  assets:
    - assets/nosmai_filters/heart_face/
```

## Discover and apply it

```dart
final filters = await NosmaiFlutter.instance.getLocalFilters(
  forceRefresh: true,
);
final filter = filters.firstWhere((item) => item.name == 'heart_face');

await NosmaiFlutter.instance.applyEffect(filter.path);
```

Use the actual package name. The SDK reads the package type and activates the
matching slot.

## Verify it worked

Run `flutter clean` after changing native or asset packaging, then test offline
after license verification.

## Common errors

| Symptom | Fix |
| --- | --- |
| Local list is empty | Check `pubspec.yaml` indentation and rebuild the application |
| Filter does not update after adding it | Call local discovery with `forceRefresh: true` |
| `applyEffect` fails | Pass the discovered path unchanged and verify native compatibility |

## Next steps

- [Download a Cloud Filter in Flutter](/docs/effects/guides/filters/download-a-cloud-filter/flutter/)
- [Open the Flutter example](https://github.com/nosmai/nosmai_effects_sdk_flutter/tree/main/example)

## References

- [Flutter platform guide](/docs/effects/platforms/flutter/)
