DalgeurakMealCancel.fromJson constructor

DalgeurakMealCancel.fromJson(
  1. dynamic json
)

Implementation

DalgeurakMealCancel.fromJson(dynamic json) {
  _id = json['_id'];
  _applierUser = DimigoinUser.fromJson(json['applier']);
  _reason = json['reason'];
  _applicationStatus = (json['applicationStatus'] as String).convertMealCancelStatusType;
  _durationList = (json['duration'] as Map).cast<String, String>().map((k, v) => MapEntry(k, DateTime.parse(v))).cast<String, DateTime>();
  _mealTypeList = (json['time'] as List).cast<String>().map((v) => v.convertMealType).cast<MealType>().toList();
}