merge method
Creates a new instance of I18NextOptions overriding any properties
where other
isn't null.
If other
is null, returns this.
Implementation
I18NextOptions merge(I18NextOptions? other) {
if (other == null) return this;
return copyWith(
fallbackNamespaces: other.fallbackNamespaces ?? fallbackNamespaces,
namespaceSeparator: other.namespaceSeparator ?? namespaceSeparator,
contextSeparator: other.contextSeparator ?? contextSeparator,
pluralSeparator: other.pluralSeparator ?? pluralSeparator,
keySeparator: other.keySeparator ?? keySeparator,
pluralSuffix: other.pluralSuffix ?? pluralSuffix,
interpolationPrefix: other.interpolationPrefix ?? interpolationPrefix,
interpolationSuffix: other.interpolationSuffix ?? interpolationSuffix,
formatSeparator: other.formatSeparator ?? formatSeparator,
interpolationUnescapePrefix:
other.interpolationUnescapePrefix ?? interpolationUnescapePrefix,
interpolationUnescapeSuffix:
other.interpolationUnescapeSuffix ?? interpolationUnescapeSuffix,
formatterValues: other.formatterValues ?? formatterValues,
formats: formats == null
? other.formats
: other.formats == null
? formats
: {...?formats, ...?other.formats},
optionsSeparator: other.optionsSeparator ?? optionsSeparator,
optionValueSeparator: other.optionValueSeparator ?? optionValueSeparator,
nestingPrefix: other.nestingPrefix ?? nestingPrefix,
nestingSuffix: other.nestingSuffix ?? nestingSuffix,
nestingSeparator: other.nestingSeparator ?? nestingSeparator,
missingKeyHandler: other.missingKeyHandler ?? missingKeyHandler,
missingInterpolationHandler:
other.missingInterpolationHandler ?? missingInterpolationHandler,
translationFailedHandler:
other.translationFailedHandler ?? translationFailedHandler,
escape: other.escape ?? escape,
escapeValue: other.escapeValue ?? escapeValue,
);
}