fromJSON static method

Page fromJSON(
  1. String input
)

Used to deserialize Page from the json string.

Implementation

static Page fromJSON(String input) {
  var map = jsonDecode(input);
  List next = map['next'];
  List nodes = map['nodes'];

  return Page(
    next: next.map((n) => PageNext.fromMap(n)).toList(),
    endType: endTypeFromString(map["endType"]),
    nodes: nodes.map((n) => PageNode.fromJSON(n)).toList(),
  );
}