CharacterDefinitions class
Manages a collection of character definitions used for text processing.
This class provides methods to load, manipulate, and retrieve character definitions, which are used to represent the visual appearance of characters in different fonts or styles.
Constructors
Properties
- count → int
-
Returns the number of character definitions.
no setter
-
definitions
→ List<
CharacterDefinition> -
Returns an unmodifiable list of all character definitions.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
supportedCharacters
→ List<
String> -
Returns a sorted list of all supported characters.
no setter
Methods
-
addDefinition(
CharacterDefinition definition) → void - Adds a new character definition to the collection.
-
fromJsonString(
String jsonString) → void - Parses character definitions from a JSON string.
-
getDefinition(
String character) → CharacterDefinition? - Retrieves a specific character definition.
-
getMatrix(
String character, int matricesIndex) → Matrix - Retrieves a specific Matrix for a given character.
-
loadDefinitions(
[String pathToAssetsDefinition = 'packages/textify/assets/matrices.json']) → Future< CharacterDefinitions> - Loads character definitions from a JSON file.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJsonString(
) → String - Converts character definitions to a JSON string.
-
toString(
) → String -
A string representation of this object.
inherited
-
upsertTemplate(
String font, String character, Matrix matrix) → bool - Updates or inserts a template matrix for a given character and font.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited