flatMap<R> method
Chains another conversion operation when this result is successful.
Unlike map, the next function returns a ConversionResult, allowing
composition of fallible operations. Failures short-circuit the chain.
Implementation
ConversionResult<R> flatMap<R>(ConversionResult<R> Function(T value) next) {
if (isSuccess) {
return next(_value as T);
}
return ConversionResult.failure(_error!);
}