DartpadSample class
A class to represent a Dartpad application sample in the dartdoc comments,
marked by {@tool dartpad ...}...{@end-tool}
.
Dartpad samples are processed separately from SnippetSamples, because they
must be injected into templates in order to be analyzed. Each
DartpadSample represents one {@tool dartpad ...}...{@end-tool}
block in
the source file.
- Inheritance
-
- Object
- CodeSample
- ApplicationSample
- DartpadSample
Constructors
-
DartpadSample({List<
SourceLine> input = const <SourceLine>[], required List<String> args, required int index, required SourceLine lineProto}) -
DartpadSample.fromFile({List<
SourceLine> input = const <SourceLine>[], required List<String> args, required File sourceFile, required int index, required SourceLine lineProto})
Properties
-
args
→ List<
String> -
finalinherited
- description ↔ String
-
getter/setter pairinherited
- element → String
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
The index of this sample within the dartdoc comment it came from.
finalinherited
-
input
→ List<
SourceLine> -
finalinherited
- inputAsString → String
-
no setterinherited
-
inputStrings
→ Iterable<
String> -
no setterinherited
-
metadata
↔ Map<
String, Object?> -
getter/setter pairinherited
- output ↔ String
-
getter/setter pairinherited
-
parts
↔ List<
TemplateInjection> -
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sourceFile → File?
-
finalinherited
- sourceFileContents → String
-
no setterinherited
- start → SourceLine
-
no setterinherited
- template → String
-
no setterinherited
- type → String
-
no setteroverride
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited