GelatoSessionDocumentOptions.fromJson constructor

GelatoSessionDocumentOptions.fromJson(
  1. Object? json
)

Implementation

factory GelatoSessionDocumentOptions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return GelatoSessionDocumentOptions(
    allowedTypes: map['allowed_types'] == null
        ? null
        : (map['allowed_types'] as List<Object?>)
            .map((el) =>
                GelatoReportDocumentOptionsAllowedTypesItem.fromJson(el))
            .toList(),
    requireIdNumber: map['require_id_number'] == null
        ? null
        : (map['require_id_number'] as bool),
    requireLiveCapture: map['require_live_capture'] == null
        ? null
        : (map['require_live_capture'] as bool),
    requireMatchingSelfie: map['require_matching_selfie'] == null
        ? null
        : (map['require_matching_selfie'] as bool),
  );
}