Nosmai  Effects Nosmai  Moderation Nosmai Try-ons coming soon
Docs menu Flutter
How-to guide

Download a Cloud Filter in Flutter

List typed cloud items from Dart, download a selected cloud identifier, and apply the returned local package path.

Platform Flutter SDK version 1.0.2 Updated Aug 22, 2026 Time 7 min

Prerequisites

Request the catalog

final filters = await NosmaiFlutter.instance.getCloudFilters(
  filterType: NosmaiCloudFilterType.effects,
  page: 1,
  limit: 20,
);

Other typed values include filter, background, beautyEffect, and games.

Download and apply

final filter = filters.first;
final result = await NosmaiFlutter.instance.downloadCloudFilter(
  filter.cloudIdentifier,
);
final path = result['path'] as String?;

if (path == null || path.isEmpty) {
  throw StateError('Cloud Filter download returned no path');
}

await NosmaiFlutter.instance.applyEffect(path);

Remove a cached item only after an explicit user or product action:

await NosmaiFlutter.instance.removeCloudFilter(
  filter.cloudIdentifier,
);

Handle cache eviction

Do not persist path as a permanent asset path. The cache has no documented cross-platform TTL and the operating system can reclaim it. Query the SDK's downloaded state when the item is selected; if it is missing, call downloadCloudFilter again and use the new returned path.

Verify it worked

Close and reopen the filter UI, then apply the cached item with network disabled.

Common errors

SymptomFix
Catalog is emptyCheck cloud capability, type, and native key configuration
Returned path is nullTreat the download as failed and show Retry
Two downloads startStore one Future per cloudIdentifier

Next steps

References

Was this page helpful?

Your response helps us prioritize documentation improvements.

Nosmai

An AR and AI company. Founded on the idea that the next decade of software will be visual, and that the tools for it should be within reach of anyone building.

Newsletter

Product updates and release notes. No spam.

© 2026 nosmai, inc · all rights reserved