withDefault method

Converter withDefault(
  1. Object? value
)

Configures a default value to be returned if the subsequent conversion operation fails.

This allows the chain to recover gracefully from errors (e.g., parsing failures).

Implementation

Converter withDefault(Object? value) =>
    Converter(_value, defaultValue: value, customConverter: _customConverter);