CharacterDefinition constructor

CharacterDefinition({
  1. required String character,
  2. int enclosures = 0,
  3. bool isAmount = false,
  4. bool isDate = false,
  5. bool isDigit = false,
  6. bool isLetter = false,
  7. bool isPunctuation = false,
  8. bool lineLeft = false,
  9. bool lineRight = false,
  10. List<Matrix> matrices = const [],
})

Creates a new CharacterDefinition instance.

Parameters:

  • character: The character this definition represents. This parameter is required.
  • enclosures: The number of enclosures (e.g., brackets, parentheses) associated with this character. Defaults to 0.
  • isAmount: Indicates whether this character is typically used in monetary amounts. Defaults to false.
  • isDate: Indicates whether this character is commonly used in date representations. Defaults to false.
  • isDigit: Indicates whether this character is a numerical digit. Defaults to false.
  • isLetter: Indicates whether this character is an alphabetic letter. Defaults to false.
  • isPunctuation: Indicates whether this character is a punctuation mark. Defaults to false.
  • lineLeft: Indicates whether this character typically has a line to its left (e.g., in handwriting). Defaults to false.
  • lineRight: Indicates whether this character typically has a line to its right (e.g., in handwriting). Defaults to false.
  • matrices: A list of matrices representing the visual pattern of this character. Defaults to an empty list.

All parameters except character are optional and have default values.

Implementation

CharacterDefinition({
  required this.character,
  this.enclosures = 0,
  this.isAmount = false,
  this.isDate = false,
  this.isDigit = false,
  this.isLetter = false,
  this.isPunctuation = false,
  this.lineLeft = false,
  this.lineRight = false,
  this.matrices = const [],
});