Map save()

Save this node into a map.

Source

Map save() {
  Map rslt = {};
  configs.forEach((str, val) {
    if (_encryptEngine != null && val is String && str.startsWith(r'$$') && str.endsWith('password')) {
      rslt[str] = encryptString(val);
    } else {
      rslt[str] = val;
    }
  });

  attributes.forEach((str, val) {
    rslt[str] = val;
  });

  if (_lastValueUpdate != null && _lastValueUpdate.value != null) {
    rslt['?value'] = _lastValueUpdate.value;
  }

  children.forEach((str, Node node) {
    if (node is SimpleNode && node.serializable == true) {
      rslt[str] = node.save();
    }
  });

  return rslt;
}