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

Blur the background in Flutter

Apply a compatible authored background-blur package to NosmaiCameraPreview and remove it without rebuilding the camera.

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

Prerequisites

Apply the blur package

The current public Dart model exposes color, image, and video constructors for manual background replacement. Use an authored background package for blur:

final backgrounds =
    await NosmaiFlutter.instance.getLocalBackgrounds();
final blur = backgrounds.firstWhere(
  (item) => item.name == 'background_blur',
);

await NosmaiFlutter.instance.applyEffect(blur.path);

Use the actual name or identifier supplied with your package. Do not hard-code background_blur unless that is the asset shipped by the application.

Remove it

await NosmaiFlutter.instance.removeEffect(blur);

Verify it worked

The subject should stay visible while the authored package blurs the background. The same preview widget must remain mounted.

Common errors

SymptomFix
Local list is emptyConfirm the package is bundled and refresh local filter discovery
applyEffect returns falseUse the discovered local path and verify the package against the native release
Blur package replaces another backgroundThis is expected because both use the background slot

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