writeChar method
Implementation
void writeChar(String char) {
// log('$red currentPointer->$currentPointer');
// log('$red painter width->${painter.width}');
// log('$red painter height->${painter.height}');
// log('char->${char} ${cache.length}');
final int characterWidth = CharacterWidth.width(char.codeUnits.first);
final Character character = Character(
content: char,
wcwidth: characterWidth,
textAttributes: textAttributes,
);
currentBuffer!.write(
currentPointer.y,
currentPointer.x,
character,
);
// final Color foreground = textAttributes.foreground(this);
// final TextPainter painter = painterCache.getOrPerformLayout(
// TextSpan(
// text: character.content,
// style: TextStyle(
// fontSize: theme.fontSize,
// color: foreground,
// fontWeight: FontWeight.bold,
// fontFamily: fontFamily,
// // fontStyle: FontStyle
// ),
// ),
// );
// print(
// 'character.content -> ${character.content} painter.height -> ${painter.height} painter.width -> ${painter.width}',
// );
moveToPosition(characterWidth);
}