build method

  1. @override
String build()
override

Implementation

@override
String build() {
  if (isDeclaration) {
    return OneLine(depth: depth, body: '${functionSignature()};').build();
  }

  return CodeUnit.join([
    LineExpand(OneLine(depth: depth, body: functionSignature()), ' {'),
    if (body != null) ...body!(depth),
    OneLine(depth: depth, body: '}')
  ]);
}