copyWith method

Regex copyWith({
  1. String? pattern,
  2. String? message,
})

✅ Add copyWith method

Implementation

Regex copyWith({
  String? pattern,
  String? message,
}) {
  return Regex(
    pattern: pattern ?? this.pattern,
    message: message ?? this.message,
  );
}