JsonApiDocument class

Constructors

JsonApiDocument(String? id, String? type, Map<String, dynamic> attributes, Map<String, dynamic>? relationships, [Iterable? included = null])
JsonApiDocument.create(String? type, Map<String, dynamic> attributes, [Map<String, dynamic>? relationships = null])
JsonApiDocument.from(JsonApiDocument other)

Properties

attributes Map<String, dynamic>
getter/setter pair
endpoint String
no setter
errors List
getter/setter pair
hasErrors bool
no setter
hashCode int
The hash code for this object.
no setterinherited
id String?
getter/setter pair
included Iterable
getter/setter pair
isNew bool
no setter
relationships Map<String, dynamic>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String?
getter/setter pair

Methods

addErrorFor(String attributeName, String errorMessage) → void
attributeHasErrors(String attributeName) bool
clearErrors() → void
clearErrorsFor(String attributeName) → void
clearHasOne(String relationshipName) → void
dataForHasMany(String relationshipName) Iterable
dataForHasOne(String relationshipName) Map<String, dynamic>
errorsFor(String attributeName) Iterable<String>
getAttribute<T>(String key) → T
idFor(String relationshipName) String?
idsFor(String relationshipName) Iterable<String>
includedDocs(String type, [Iterable<String>? ids]) Iterable<JsonApiDocument>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAttribute<T>(String key, T value) → void
setHasOne(String relationshipName, String modelId, String modelType) → void
toString() String
A string representation of this object.
inherited
typeFor(String relationshipName) String?

Operators

operator ==(Object other) bool
The equality operator.
inherited