Effects Flutter
Effects / Guides / Runtime parameters / Flutter

Control Nosmai effect parameters in Flutter

Updated August 27, 2026

Build Flutter controls from the active effect package metadata, update numeric or text values, and respect authored ranges and defaults.

Prerequisites

Read the authored controls

Query parameters after the package has applied:

final nosmai = NosmaiFlutter.instance;
final parameters = await nosmai.getEffectParameters();

for (final parameter in parameters) {
  debugPrint('${parameter.displayName} (${parameter.type}) '
      '= ${parameter.currentValue}');
}

Each FilterParameter provides its authored name, type, current and default values, optional range, option list, display name, and description. Rebuild the controls when the active package changes.

Update a value

Use a name returned by the active package:

final updated = await nosmai.setEffectParameter(
  'AUTHORED_PARAMETER_NAME',
  0.5,
);

final textUpdated = await nosmai.setEffectParameterString(
  'AUTHORED_TEXT_PARAMETER_NAME',
  'Hello',
);

For a slider, use minValue and maxValue when hasRange is true. Debounce very high-rate UI input and ignore late Futures after the widget is disposed.

Verify the update

Call getEffectParameterValue for a numeric control and compare the result with the requested value. The processed preview should change without rebuilding NosmaiCameraPreview or reapplying the package.

Common errors

SymptomCauseFix
The parameter list is emptyThe active package exposes no runtime controlsWait for successful package application and handle an empty list normally
The setter returns falseThe name or setter type does not match the metadataUse the exact name and numeric or string method declared for it
A stale update changes a new packageAn old slider Future completed after the active package changedCancel or invalidate pending UI updates when selecting another package

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