toUncheckedError method

UncheckedError<T?> toUncheckedError( {
  1. required String prefix,
  2. required ({String english, String? locale}) message,
  3. StackTrace? stackTrace,
})

현재 데이터(null 포함)를 원인(value)으로 하는 UncheckedError를 생성합니다.

시스템적으로 절대 null이면 안 되는 데이터가 null일 때 이를 에러 객체로 래핑합니다.

Creates an UncheckedError using the current nullable data as the cause (value). Wraps the data into an error when it is null but systemically should not be.

Implementation

UncheckedError<T?> toUncheckedError({
  required String prefix,
  required ({String english, String? locale}) message,
  StackTrace? stackTrace,
}) {
  return GenericUncheckedError<T?>(
    value: this,
    prefix: prefix,
    message: message,
    stackTrace: stackTrace ?? StackTrace.current,
  );
}