AttributeObject.fromMap constructor
AttributeObject.fromMap(
- Map<String, dynamic> map
)
Implementation
factory AttributeObject.fromMap(
Map<String, dynamic> map,
) {
map = {
'key': "",
'description': "",
'type': "",
'error': "",
'required': false,
'\$createdAt': "",
'\$updatedAt': "",
...map,
};
return AttributeObject(
key: map['key'].toString(),
description: map['description'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values.firstWhere(
(e) => e.value == map['status'],
),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
);
}