ResourceObject class

Wrapped response from json and helper to assign properties on Schema model

Constructors

ResourceObject(Map<String, dynamic> attributes)
Default constructor
ResourceObject.from(ResourceObject other)
Create a resource object from another object

Properties

attributes Map<String, dynamic>
Attributes of resource object
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getAttribute<T>(String key) → T
Retrieve attribute and return to specific type. Use dot notation in key to access nested keys.
mapGetter<T>(dynamic map, String path) → T?
Get value from a Map by path. Use dot notation in path to access nested keys. If location path does´t exist, it will return null.
mapSetter<T>(Map<String, dynamic>? map, String path, T value) Map<String, dynamic>
Sets value to the Map by path. If location of path does´t exist, it will created.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAttribute<T>(String key, T value) → void
Set attribute from key, value. Use dot notation in key to access nested keys.
toString() String
A string representation of this object.
inherited

Operators

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