transform method

  1. @nonVirtual
ResultWithVariables transform(
  1. dynamic value
)
inherited

Implementation

@nonVirtual
ResultWithVariables transform(value) {
  if (value is List && mapList) {
    final results = value.map((v) => realTransform(v));
    return ResultWithVariables(
        result: results
            .where((v) => v.result != null)
            .map((v) => v.result)
            .toList(),
        variables: results
            .map((v) => v.variables)
            .toList()
            .fold({}, (prev, next) => {...prev, ...next}));
  } else {
    return realTransform(value);
  }
}