fillAttributes method
Fills the entire buffer with the specified attributes.
Implementation
void fillAttributes({String? char, int? fg, int? bg, int? modifiers}) {
if (char != null) characters.fillRange(0, characters.length, char);
if (fg != null || bg != null || modifiers != null) {
for (var i = 0; i < characters.length; i++) {
final idx = i * 3;
if (fg != null) {
attributes[idx + 0] = blendColor(fg, attributes[idx + 0]);
}
if (bg != null) {
attributes[idx + 1] = blendColor(bg, attributes[idx + 1]);
}
if (modifiers != null) attributes[idx + 2] = modifiers;
}
}
}