getDelimetedSection function
Implementation
String getDelimetedSection(
String message,
int delimeterLength, {
String title = '',
}) {
final maxPart = message.split('\n').map((e) => e.length).fold(0, max);
delimeterLength = max(delimeterLength, maxPart);
final top = getDelimeter(delimeterLength, title: title);
final bottom = getDelimeter(top.length);
return [
top,
message,
bottom,
].join('\n');
}