Links.fromJson constructor
Links.fromJson(
- Iterable data
Creates a metadata container for links from JSON data.
Items of the data
iterable are allowed to be Map<String, dynamic>
(containing link attributes) or String
(containing only a href
part
of a link).
Throws FormatException
if cannot parse data.
Implementation
factory Links.fromJson(Iterable<dynamic> data) => Links(
data.map(Link.fromJson).toList(growable: false),
);