JsonApiModel class
- Implemented types
Constructors
- JsonApiModel(JsonApiDocument jsonApiDoc)
-
JsonApiModel.create(String type, {Map<
String, dynamic> ? attributes, Map<String, dynamic> ? relationships}) - JsonApiModel.from(JsonApiModel other)
- JsonApiModel.init(String type)
- JsonApiModel.shallowCopy(JsonApiModel other)
Properties
-
attributes
→ Map<
String, dynamic> -
no setter
- endpoint → String
-
no setter
- errors → List
-
no setter
- hasErrors → bool
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
no setteroverride
- included → Iterable
-
no setter
- isNew → bool
-
no setter
- jsonApiDoc ↔ JsonApiDocument
-
getter/setter pair
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
-
relationships
→ Map<
String, dynamic> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited - type → String?
-
no setteroverride
Methods
-
addErrorFor(
String attributeName, String errorMessage) → void -
attributeHasErrors(
String attributeName) → bool -
clearErrors(
) → void -
clearErrorsFor(
String attributeName) → void -
clearHasOne(
String relationshipName) → void -
errorsFor(
String attributeName) → Iterable< String> -
getAttribute<
T> (String key) → T -
override
-
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
-
serialize(
) → String -
override
-
setAttribute<
T> (String key, T value) → void -
override
-
setHasOne(
String relationshipName, JsonApiModel model) → void -
toString(
) → String -
A string representation of this object.
inherited
-
typeFor(
String relationshipName) → String?
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
toDateTime(
String value) → DateTime? -
toUtcIsoString(
DateTime value) → String