setAttributes method

  1. @override
void setAttributes(
  1. int x,
  2. int y, {
  3. String? char,
  4. int? fg,
  5. int? bg,
  6. int? modifiers,
})
override

Sets the cell attributes at (x, y). Does nothing if coordinates are out of bounds.

Implementation

@override
void setAttributes(
  int x,
  int y, {
  String? char,
  int? fg,
  int? bg,
  int? modifiers,
}) {
  if (x < 0 || x >= bounds.width || y < 0 || y >= bounds.height) return;
  parent.setAttributes(
    bounds.x + x,
    bounds.y + y,
    char: char,
    fg: fg,
    bg: bg,
    modifiers: modifiers,
  );
}