TextTransformationAnimation constructor
TextTransformationAnimation({})
Implementation
TextTransformationAnimation(
{ required this.text,
required this.duration,
this.style,
this.overflow,
this.textAlign,
String alphabet =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#\$%^&*()_+-={}[]:\";',./<>?`~|\\",
Key? key})
: this._alphabetToPosition = Map<String, int>(),
this._positionToAlphabet = Map<int, String>(),
super(key: key, duration: duration) {
for (int i = 0; i < alphabet.length; i++) {
if (_alphabetToPosition.containsKey(alphabet[i])) {
throw new FormatException(
"Alphabet must contain a unique set of characters");
}
_positionToAlphabet.putIfAbsent(i, () => alphabet[i]);
_alphabetToPosition.putIfAbsent(alphabet[i], () => i);
}
}