Comment.FileHeader constructor

Comment.FileHeader(
  1. String desc, {
  2. String? author,
  3. String? calledFrom,
  4. String? context,
})

Used to describe

Implementation

Comment.FileHeader(
  String desc, {
  String? author,
  String? calledFrom,
  String? context,
}) : _text = '''${_separate()}\n#
# Author:
#  ${author ?? Author}
#
# Description:
''' {
  _text += desc.split('\n').map((s) => '#  $s').join('\n');

  if (calledFrom != null) {
    _text += '\n#\n# Called in:';
    _text += '\n#  $calledFrom';
  }
  if (context != null) {
    _text += '\n#\n# Context:';
    _text += '\n#  $context';
  }

  _text += '\n#\n${_separate()}';
}