printDescription method
Implementation
String printDescription(
String? description, [
String indentation = '',
// ignore: avoid_positional_boolean_parameters
bool firstInBlock = true,
]) {
if (description == null) {
return '';
}
final preferMultipleLines = description.length > 70;
final blockString = _printBlockString(
description,
preferMultipleLines: preferMultipleLines,
);
final prefix = indentation.isNotEmpty && !firstInBlock
? '\n' + indentation
: indentation;
return prefix +
blockString.replaceAll(RegExp('\n'), '\n' + indentation) +
'\n';
}