Relative.fromJson constructor

Relative.fromJson(
  1. Map<String, dynamic> dataMap
)

Creates a Relative object from the JSON response to a GET request.

Implementation

factory Relative.fromJson(Map<String, dynamic> dataMap) {
  return Relative(
    type: ResourceType.fromString(dataMap[ApiFields.rType] ?? ""),
    id: dataMap[ApiFields.rid] ?? "",
  );
}