DecoratorRule.between constructor
DecoratorRule.between({})
Implementation
factory DecoratorRule.between({
required String start,
required String end,
required TextStyle style,
Function(String)? onTap,
bool removeMatchingCharacters = false,
bool caseSensitive = false,
}) {
return DecoratorRule(
style: style,
regExp: CommonRegExp.between(
start: start,
end: end,
caseSensitive: caseSensitive,
),
onTap: onTap,
transformMatch: (match) {
if (removeMatchingCharacters) {
String res = match;
res = res.replaceFirst(start, "");
res = res.replaceFirst(end, "");
return res;
}
return match;
},
);
}