fromNode static method

Value fromNode(
  1. ValueNode? node
)

Implementation

static Value fromNode(ValueNode? node) {
  if (node is IntValueNode) {
    return IntValue(node);
  }

  if (node is FloatValueNode) {
    return FloatValue(node);
  }
  if (node is StringValueNode) {
    return StringValue(node);
  }
  if (node is BooleanValueNode) {
    return BooleanValue(node);
  }
  if (node is NullValueNode) {
    return NullValue(node);
  }
  if (node is EnumValueNode) {
    return EnumValue(node);
  }
  if (node is ListValueNode) {
    return ListValue(node);
  }
  if (node is ObjectValueNode) {
    return ObjectValue(node);
  }

  throw ArgumentError("$node is unsupported");
}