buildSeparator method
Implementation
Widget buildSeparator(String title) {
final borderStyle = const Style(foreground: Color(120, 120, 120));
return SizedBox(
height: 1,
child: LayoutBuilder(
builder: (context, constraints) {
final width = constraints.maxWidth;
final titlePart = '─ $title ';
String separatorStr;
if (width >= titlePart.length + 6) {
separatorStr =
'├─$titlePart${'─' * (width - 3 - titlePart.length)}┤';
} else {
separatorStr = '├${'─' * (width - 2)}┤';
}
return Text(separatorStr, style: borderStyle);
},
),
);
}