CubeEntity.fromJson constructor

CubeEntity.fromJson(
  1. Map<String, dynamic> json
)

Implementation

CubeEntity.fromJson(Map<String, dynamic> json) {
  id = json['id'];

  var createdAtRaw = json['created_at'];
  if (createdAtRaw != null) {
    createdAt = DateTime.parse(createdAtRaw);
  }

  var updatedAtRaw = json['updated_at'];
  if (updatedAtRaw != null) {
    updatedAt = DateTime.parse(updatedAtRaw);
  }
}