CodeSample class abstract

A base class to represent a block of any kind of sample code, marked by "{@tool (snippet|sample|dartdoc) ...}...{@end-tool}".

Implementers

Constructors

CodeSample(List<String> args, List<SourceLine> input, {required int index, required SourceLine lineProto})
CodeSample.fromFile(List<String> args, List<SourceLine> input, File? sourceFile, {required int index, required SourceLine lineProto})

Properties

args List<String>
final
description String
getter/setter pair
element String
no setter
hashCode int
The hash code for this object.
no setterinherited
index int
The index of this sample within the dartdoc comment it came from.
final
input List<SourceLine>
final
inputAsString String
no setter
inputStrings Iterable<String>
no setter
metadata Map<String, Object?>
getter/setter pair
output String
getter/setter pair
parts List<TemplateInjection>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceFile → File?
final
sourceFileContents String
no setter
start SourceLine
no setter
template String
no setter
type String
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited