render method

  1. @override
void render(
  1. Buffer buffer,
  2. Rect area
)
override

Renders the widget onto the provided buffer within the specified area.

Implementation

@override
void render(Buffer buffer, Rect area) {
  if (area.width <= 0 || area.height <= 0) return;
  final label = focused ? '[ $text ]' : '  $text  ';
  buffer.writeString(0, 0, label, focused ? focusedStyle : style);
}