NodeStatement.create constructor

NodeStatement.create(
  1. String id, {
  2. Map<String, String>? attributes,
})

Create a node statement from an id and an optional mapping of attributes by name to value.

Implementation

factory NodeStatement.create(
  String id, {
  Map<String, String>? attributes,
}) {
  AttrList? attrList;
  if (attributes != null) {
    attrList = AttrList([
      AList(attributes),
    ]);
  }

  return NodeStatement(NodeId(id), attrList);
}