lines static method
returns a list of lines from a json object
Implementation
static List<Line> lines(dynamic json) {
if (json == null) {
return [];
} else if (json is List) {
return json.map((e) => Line.fromJson(e)).toList();
} else if (json['edges'] == null) {
return [];
}
return (json['edges'] as List).map((e) => Line.fromGraphJson(e)).toList();
}