fromJson static method

  1. @visibleForTesting
PersonGroup? fromJson(
  1. dynamic jsonObject
)

Implementation

@visibleForTesting
static PersonGroup? fromJson(jsonObject) {
  if (jsonObject == null) return null;
  var result = PersonGroup._privateConstructor();

  result.name = jsonObject["name"];
  result._id = jsonObject["id"];
  result.metadata = jsonObject["metadata"];
  result._createdAt = DateTime.parse(jsonObject["createdAt"]);

  return result;
}