MappableModel class abstract
Indicates that the BaseModel has a MappableFields object that MUST be implemented and can then be used to map the fields in this object into a Map
- Implemented types
- Implementers
- Available Extensions
Constructors
Properties
-
fieldKeys
→ Iterable<
String> -
Returns all the available field keys in this object.
no setterinherited
- getterSetterMap → MappableFields
-
Used by toMap to generate the map
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ String?
-
Unique identifier for this model
getter/setter pairinherited
- idKey → String
-
Represents the field key used for the id
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → String
-
Unique type to give to the model. Whether or not collision is expected is
dependent on the parameters of your system.
no setterinherited
- typeKey → String
-
Represents the field key used for the type
no setterinherited
Methods
-
getField(
String key) → dynamic -
Returns the value of the field with name
key
or null ifkey
is not a field in this model.inherited -
getGetterSetterMap(
) → MappableFields - Implemented by subclasses to map the getters and setters of the object.
-
loadFromMap(
Map< String, dynamic> map, {bool respectType = true}) → void -
Loads a Serializable map into the values of this BaseModel
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setField(
String key, dynamic value) → bool -
Sets the field with name
key
to the givenvalue
inherited -
toMap(
) → Map< String, dynamic> -
Converts this BaseModel into a Serializable Map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited