BaseFetchInvitationResponse.fromJson constructor
BaseFetchInvitationResponse.fromJson(
- Map<String, dynamic> json
)
Implementation
factory BaseFetchInvitationResponse.fromJson(Map<String, dynamic> json) {
if (json.containsKey('error') || json.containsKey('errors')) {
return BaseFetchInvitationResponse(
errorCode: json['error'] ?? json['errors'],
message: json['message'],
);
}
return BaseFetchInvitationResponse(
success: json['success'] ?? false,
data: json['data'] as Map<String, dynamic>?,
message: json['message'],
);
}