KAuthFailure.fromCode constructor
KAuthFailure.fromCode(
- String code
에러 코드로부터 적절한 KAuthFailure 서브타입 생성
ErrorCodes에 정의된 코드를 사용하여 메시지와 힌트를 자동으로 설정합니다.
final failure = KAuthFailure.fromCode(ErrorCodes.userCancelled);
print(failure is CancelledError); // true
Implementation
factory KAuthFailure.fromCode(String code) {
final errorInfo = ErrorCodes.getErrorInfo(code);
return _createFromCode(
code: code,
message: errorInfo.message,
hint: errorInfo.hint,
);
}