setFeatureState method

Future<CommandCompletion> setFeatureState(
  1. FeatureStateSelector selector,
  2. Object? state
)

Merges state into the state of a feature.

state is a JSON object. Its keys replace the same keys in the feature's state, and the other keys stay.

See mln_map_set_feature_state in the C API reference.

Implementation

Future<CommandCompletion> setFeatureState(
  FeatureStateSelector selector,
  Object? state,
) => _command(
  (arena, completion) => raw.mln_map_set_feature_state(
    _handle.raw,
    _writeFeatureStateSelector(selector, arena),
    _nativeJsonView(state, arena),
    completion,
    nativeDiagnostic,
  ),
);