Attendee.fromJson constructor

Attendee.fromJson(
  1. dynamic jsonMap
)

Implementation

factory Attendee.fromJson(dynamic jsonMap) {
  if (jsonMap == null) {
    throw const FormatException('Attendee JSON is null');
  }
  final Map<String, dynamic> json = Map<String, dynamic>.from(jsonMap as Map);

  if (json['attendeeId'] == null || json['externalUserId'] == null) {
    throw FormatException('Attendee JSON missing required fields', json);
  }
  return Attendee(
    attendeeId: json['attendeeId'] as String,
    externalUserId: json['externalUserId'] as String,
  );
}