unmarshalProvidedActionArgValues method

Future<void> unmarshalProvidedActionArgValues (ActionMeta actionMeta, Map<String, ProvidedValue> argValues)

Implementation

Future<void> unmarshalProvidedActionArgValues(
    ActionMeta actionMeta, Map<String, ProvidedValue> argValues) async {
  if (argValues == null || actionMeta.args == null) {
    return;
  }

  for (var entry in argValues.entries) {
    ProvidedValue argValue = entry.value;
    var argType = actionMeta.getArg(entry.key);

    argValue.value = await _typeConverter.unmarshal(argType, argValue.value);

    if (argValue.annotatedValueSet != null) {
      for (var annotatedValue in argValue.annotatedValueSet) {
        annotatedValue.value =
            await _typeConverter.unmarshal(argType, annotatedValue.value);
      }
    }
  }
}