refreshData method

void refreshData(
  1. dynamic data
)

Implementation

void refreshData(data) {
  // ignore: invalid_use_of_internal_member
  world.children.clear();
  graph = convertor.convertGraph(data);
  graph.vertexes = graph.vertexes.toSet().toList()
    ..sort((key1, key2) => key1.degree - key2.degree > 0 ? -1 : 1);
  setDefaultVertexColor();
  algorithm.onGraphLoad(graph);

  graph.edges.forEach(_addEdge);
  graph.vertexes.forEach(_addVertex);

  options.graphStyle.graphColor(graph);
}