StatusDetails.fromJson constructor
Creates a StatusDetails from JSON data.
Implementation
factory StatusDetails.fromJson(Map<String, dynamic> json) {
final tempCausesJson = json['causes'];
final tempGroupJson = json['group'];
final tempKindJson = json['kind'];
final tempNameJson = json['name'];
final tempRetryAfterSecondsJson = json['retryAfterSeconds'];
final tempUidJson = json['uid'];
final List<StatusCause>? tempCauses = tempCausesJson != null
? List<dynamic>.from(tempCausesJson)
.map(
(e) => StatusCause.fromJson(
Map<String, dynamic>.from(e),
),
)
.toList()
: null;
final String? tempGroup = tempGroupJson;
final String? tempKind = tempKindJson;
final String? tempName = tempNameJson;
final int? tempRetryAfterSeconds = tempRetryAfterSecondsJson;
final String? tempUid = tempUidJson;
return StatusDetails(
causes: tempCauses,
group: tempGroup,
kind: tempKind,
name: tempName,
retryAfterSeconds: tempRetryAfterSeconds,
uid: tempUid,
);
}