SnippetSample.surround constructor
SnippetSample.surround(
- String prefix,
- List<
SourceLine> code, - String postfix, {
- required int index,
Implementation
factory SnippetSample.surround(
String prefix,
List<SourceLine> code,
String postfix, {
required int index,
}) {
return SnippetSample(
<SourceLine>[
if (prefix.isNotEmpty) SourceLine(prefix),
...code,
if (postfix.isNotEmpty) SourceLine(postfix),
],
index: index,
lineProto: code.first,
);
}