LackOffBean.fromJson constructor

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

Implementation

factory LackOffBean.fromJson(Map<String, dynamic> json) {
  return LackOffBean(
    logType: LogType.values
        .firstWhere((e) => e.toString().split('.').last == json['logType']),
    logTitle: json['logTitle'] as String,
    logDetail: json['logDetail'] as String,
    date: json['date'] as String,
    updated: json['updated'] as String,
  );
}