sectionArrows function
Returns a marker with section arrows surrounding the given string.
Specifying start
as false returns an ending marker instead of a starting
marker.
Implementation
String sectionArrows(String name, {bool start = true}) {
const int markerArrows = 8;
final String arrows =
(start ? '\u25bc' /* ▼ */ : '\u25b2' /* ▲ */) * markerArrows;
final String marker =
'//* $arrows $name $arrows (do not modify or remove section marker)';
return '${start ? '\n//*${'*' * marker.length}\n' : '\n'}'
'$marker'
'${!start ? '\n//*${'*' * marker.length}\n' : '\n'}';
}