getFieldsValues method

Map<String, ASTValue> getFieldsValues([
  1. VMContext? context
])

Returns a Map with fields names and values.

Implementation

Map<String, ASTValue> getFieldsValues([VMContext? context]) {
  context ??= VMContext(ASTBlock(null));

  var fieldsValues = <String, ASTValue>{};

  for (var key in _fieldsValues.keys) {
    var value = getFieldValue(key, context);
    fieldsValues[key] = value ?? ASTValueNull.instance;
  }

  return fieldsValues;
}