lineCount property

  1. @override
int get lineCount
override

Number of lines in render.

Implementation

@override
int get lineCount {
  final lines = _message.split('\n').length;

  return switch (_displayStyle) {
    StyledBlockDisplayStyle.inline => lines + 1, // +1 for leading newline
    StyledBlockDisplayStyle.fullWidth =>
      lines + 4, // top padding + prefix + bottom padding + leading newline
    StyledBlockDisplayStyle.bordered =>
      lines + 4, // 2 borders + prefix + empty line
  };
}