TextSyntax constructor

TextSyntax(
  1. String pattern, {
  2. String sub = '',
  3. int? startCharacter,
  4. bool caseSensitive = true,
})

Create a new TextSyntax which matches text on pattern.

If sub is passed, it is used as a simple replacement for pattern. If startCharacter is passed, it is used as a pre-matching check which is faster than matching against pattern.

Implementation

TextSyntax(
  super.pattern, {
  String sub = '',
  super.startCharacter,
  super.caseSensitive,
}) : substitute = sub;