IdvError.fromJson constructor

IdvError.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory IdvError.fromJson(Map<String, dynamic> json) {
  final type = ErrorType.fromJson(_parseType(json['type']));
  return IdvError(
    uuid: json['uuid'] as String,
    type: type,
    // category is not part of the serialized payload; it is derived
    // from the error type, matching the native SDK contract.
    category: type.category,
    message: json['message'] as String? ?? '',
  );
}