copyWith method
Returns a copy of RecursiveRegex, updating any values provided by this.
If copyNull
is true
, captureGroupName
will be copied with a
value of null
if it is not provided with another value.
Implementation
RecursiveRegex copyWith({
RegExp? startDelimiter,
RegExp? endDelimiter,
String? captureGroupName,
bool? isMultiLine,
bool? isCaseSensitive,
bool? isUnicode,
bool? isDotAll,
bool? global,
bool copyNull = false,
}) {
if (!copyNull) captureGroupName ??= this.captureGroupName;
return RecursiveRegex(
startDelimiter: startDelimiter ?? this.startDelimiter,
endDelimiter: endDelimiter ?? this.endDelimiter,
captureGroupName: captureGroupName,
multiLine: isMultiLine ?? this.isMultiLine,
caseSensitive: isCaseSensitive ?? this.isCaseSensitive,
unicode: isUnicode ?? this.isUnicode,
dotAll: isDotAll ?? this.isDotAll,
global: global ?? this.global,
);
}