fromJson static method

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

Implementation

static PassportElementError? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return PassportElementError(
    type:
        PassportElementType.fromJson(json['type'] as Map<String, dynamic>?)!,
    message: (json['message'] as String?) ?? '',
    source: PassportElementErrorSource.fromJson(
        json['source'] as Map<String, dynamic>?)!,
  );
}