StatusCause.fromJson constructor

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

Creates a StatusCause from JSON data.

Implementation

factory StatusCause.fromJson(Map<String, dynamic> json) {
  final tempFieldJson = json['field'];
  final tempMessageJson = json['message'];
  final tempReasonJson = json['reason'];

  final String? tempField = tempFieldJson;
  final String? tempMessage = tempMessageJson;
  final String? tempReason = tempReasonJson;

  return StatusCause(
    field: tempField,
    message: tempMessage,
    reason: tempReason,
  );
}