NodesListResponse.fromResponse constructor

NodesListResponse.fromResponse(
  1. Response response
)

Implementation

NodesListResponse.fromResponse(Response response)
    : super.fromResponse(response) {
  List<Node> nodes = [];
  if (response.statusCode == 200) {
    response.data.forEach((entry) => nodes.add(Node.fromJson(entry)));
  }
  this.nodes = nodes;
}