Prerequisites
- A working Flutter quickstart
- A downloaded
.nosmaipackage and its required resources
Add the package resources
assets/nosmai_filters/heart_face/ heart_face.nosmai heart_face_manifest.json heart_face_preview.png
Declare the folder:
flutter:
assets:
- assets/nosmai_filters/heart_face/
Discover and apply it
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 |