fillRect method

  1. @override
void fillRect(
  1. Rect rect, {
  2. String? char,
  3. int? fg,
  4. int? bg,
  5. int? modifiers,
  6. int? underlineColor,
  7. String? uri,
  8. bool? blend,
})
override

Fills a rectangular region with the given character and attributes.

Implementation

@override
void fillRect(
  Rect rect, {
  String? char,
  int? fg,
  int? bg,
  int? modifiers,
  int? underlineColor,
  String? uri,
  bool? blend,
}) {
  if (rect.width <= 0 || rect.height <= 0) return;
  final clipped = bounds.intersect(
    Rect(bounds.x + rect.x, bounds.y + rect.y, rect.width, rect.height),
  );
  if (clipped.width <= 0 || clipped.height <= 0) return;
  parent.fillRect(
    clipped,
    char: char,
    fg: fg,
    bg: bg,
    modifiers: modifiers,
    underlineColor: underlineColor,
    uri: uri,
    blend: blend,
  );
}