Effects Flutter
Effects / Guides / Background blur / Flutter

Blur a camera background in Flutter with Nosmai Effects

Updated August 27, 2026

Download a compatible background-blur filter through Cloud Filters, apply it to NosmaiCameraPreview, and remove it safely.

Prerequisites

  • A working Flutter quickstart
  • A compatible background-blur filter available through Cloud Filters

Download and apply the blur

Request the background catalog, select the blur filter, and download it before applying it:

final backgrounds = await NosmaiFlutter.instance.getCloudFilters(
  filterType: NosmaiCloudFilterType.background,
  page: 1,
  limit: 20,
);
final blur = backgrounds.firstWhere(
  (item) => item.name == 'background_blur',
);
final download = await NosmaiFlutter.instance.downloadCloudFilter(
  blur.cloudIdentifier,
);
final blurPath = download['path'] as String?;

if (blurPath == null || blurPath.isEmpty) {
  throw StateError('Background blur download failed');
}

await NosmaiFlutter.instance.applyEffect(blurPath);

Use the actual name or identifier returned by the Cloud Filter catalog.

Remove it

await NosmaiFlutter.instance.removeAllFilters();

Verify it worked

The subject should stay visible while the selected Cloud Filter blurs the background. The same preview widget must remain mounted.

Common errors

SymptomFix
Cloud Filter catalog is emptyCheck the project configuration and selected Cloud Filter category
applyEffect returns falseUse the successful Cloud Filter download result and verify native versions
Blur filter replaces another backgroundThis is expected because both use the background slot

Next steps

References

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