CancellationDetails.fromJson constructor

CancellationDetails.fromJson(
  1. Object? json
)

Implementation

factory CancellationDetails.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return CancellationDetails(
    comment: map['comment'] == null ? null : (map['comment'] as String),
    feedback: map['feedback'] == null
        ? null
        : CancellationDetailsFeedback.fromJson(map['feedback']),
    reason: map['reason'] == null
        ? null
        : CancellationDetailsReason.fromJson(map['reason']),
  );
}