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