Graph.create constructor
Graph.create({})
Create a graph from a mapping of node to connected nodes.
Implementation
factory Graph.create({
String? id,
GraphType type = GraphType.graph,
bool strict = false,
required Map<String, List<String>> data,
}) =>
Graph(
id: id,
stmtList: StmtList(dataToStatements(
data,
type == GraphType.graph ? EdgeOp.directed : EdgeOp.undirected,
)),
strict: strict,
type: type,
);