value property

T get value

Returns the converted value, throwing ConversionException on failure.

The exception is rethrown with its original stack trace preserved for accurate debugging. Prefer valueOrNull or valueOr for exception-free access, or fold for explicit handling of both cases.

Implementation

T get value {
  final error = _error;
  if (error != null) {
    Error.throwWithStackTrace(error, error.stackTrace);
  }
  return _value as T;
}