DataDocument class

A Document with top-level primary data

Inheritance

Constructors

DataDocument.fromIdentifier(Identifier identifier, { List<Resource> included, Map<String, dynamic> meta, Api api, Link self, Link related })
Creates a document with a single resource identifier primary data.
DataDocument.fromIdentifierList(List<Identifier> identifiers, { List<Resource> included, Map<String, dynamic> meta, Api api, Link self, Link related, Link first, Link last, Link prev, Link next })
Creates a document with multiple resource identifiers primary data.
DataDocument.fromNull({List<Resource> included, Map<String, dynamic> meta, Api api, Link self })
Creates a document with null primary data.
DataDocument.fromResource(Resource resource, { List<Resource> included, Map<String, dynamic> meta, Api api, Link self })
Creates a document with a single resource primary data.
DataDocument.fromResourceList(List<Resource> resources, { List<Resource> included, Map<String, dynamic> meta, Api api, Link self, Link related, Link first, Link last, Link prev, Link next })
Creates a document with multiple resources primary data.

Properties

data → PrimaryData
final
first Link
final
included → List<Resource>
final
isCompound → bool
Returns true is the document is compound [...]
read-only
isFullyLinked → bool
Returns true if the document is fully linked [...]
read-only
last Link
final
next Link
final
prev Link
final
final
api Api
The JSON API object
final, inherited
hashCode → int
The hash code for this object.
read-only, inherited
meta Meta
The top-level meta information
final, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
self Link
final, inherited

Methods

toJson() → Map<String, dynamic>
Returns the JSON representation.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited

Static Methods

fromJson(Map<String, dynamic> json) DataDocument
Parses json into DataDocument.
override