DateDataEntity.fromJson constructor

DateDataEntity.fromJson(
  1. dynamic json
)

Creates a new DateTimeDataEntity Object from json json needs to be a Date String with Format yyyy-MM-dd

Implementation

factory DateDataEntity.fromJson(dynamic json) {
  DateTime? jsonValue;
  if (json != null) {
    jsonValue = _dateFormat.parse(json);
  }
  return DateDataEntity(jsonValue);
}