DocDirectiveType enum

Inheritance
Available extensions
Annotations
  • @experimental

Values

animation → const DocDirectiveType

A DocDirective declaring an embedded video with HTML video controls.

This directive has three required arguments: the width, the height, and the URL. A named 'id' argument can also be given. For example:


<div style="position: relative;">
  <div id="video1_play_button_"
       onclick="var video1 = document.getElementById('video1');
                if (video1.paused) {
                  video1.play();
                  this.style.display = 'none';
                } else {
                  video1.pause();
                  this.style.display = 'block';
                }"
       style="position:absolute;
              width:600px;
              height:400px;
              z-index:100000;
              background-position: center;
              background-repeat: no-repeat;
              background-image: url(static-assets/play_button.svg);">
  </div>
  <video id="video1"
         style="width:600px; height:400px;"
         onclick="var video1_play_button_ = document.getElementById('video1_play_button_');
                  if (this.paused) {
                    this.play();
                    video1_play_button_.style.display = 'none';
                  } else {
                    this.pause();
                    video1_play_button_.style.display = 'block';
                  }" loop>
    <source src="https://www.example.com/example.mp4" type="video/mp4"/>
  </video>
</div>


See documentation at github.com/dart-lang/dartdoc/blob/main/doc/directives.md#animation---animations.

const DocDirectiveType('animation', positionalParameters: [DocDirectiveParameter('width', DocDirectiveParameterFormat.integer), DocDirectiveParameter('height', DocDirectivePara…
canonicalFor → const DocDirectiveType

A DocDirective declaring the associated library is the "canonical" location for a certain element.

Dartdoc uses some heuristics to decide what the public-facing libraries are, and which public-facing library is the "canonical" location for an element. When that heuristic needs to be overridden, a user can use this directive. Example:

{@canonicalFor some_library.SomeClass}

See documentation at github.com/dart-lang/dartdoc/blob/main/doc/directives.md#canonicalfor---canonicalization.

const DocDirectiveType('canonicalFor', positionalParameters: [DocDirectiveParameter('element', DocDirectiveParameterFormat.any)])
category → const DocDirectiveType

A DocDirective declaring a categorization into a named category.

This directive has one required argument: the category name. The category name is allowed to contain whitespace.

See documentation at github.com/dart-lang/dartdoc/blob/main/doc/directives.md#category-and-subcategory---categories.

const DocDirectiveType('category', restParametersAllowed: true)
endInjectHtml → const DocDirectiveType

The end tag for the DocDirectiveType.injectHtml tag.

This tag should not really constitute a "type" of doc directive, but this implementation is a one-to-one mapping of "types" and "tags", so end tags are included. This also allows us to parse (erroneous) dangling end tags.

const DocDirectiveType.end('end-inject-html', openingTag: 'inject-html')
endTool → const DocDirectiveType

The end tag for the DocDirectiveType.tool tag.

This tag should not really constitute a "type" of doc directive, but this implementation is a one-to-one mapping of "types" and "tags", so end tags are included. This also allows us to parse (erroneous) dangling end tags.

const DocDirectiveType.end('end-tool', openingTag: 'tool')
endTemplate → const DocDirectiveType

The end tag for the DocDirectiveType.template tag.

This tag should not really constitute a "type" of doc directive, but this implementation is a one-to-one mapping of "types" and "tags", so end tags are included. This also allows us to parse (erroneous) dangling end tags.

const DocDirectiveType.end('endtemplate', openingTag: 'template')
injectHtml → const DocDirectiveType

A DocDirective declaring a block of HTML content which is to be inserted after all other processing, including Markdown parsing.

See documentation at github.com/dart-lang/dartdoc/blob/main/doc/directives.md#inject-html---injected-html.

const DocDirectiveType.block('inject-html', 'end-inject-html')
macro → const DocDirectiveType

A DocDirective declaring amacro application.

This directive has one required argument: the name. For example:

const DocDirectiveType('macro', positionalParameters: [DocDirectiveParameter('name', DocDirectiveParameterFormat.any)])
subCategory → const DocDirectiveType

A DocDirective declaring a categorization into a named sub-category.

This directive has one required argument: the sub-category name. The sub-category name is allowed to contain whitespace.

See documentation at github.com/dart-lang/dartdoc/blob/main/doc/directives.md#category-and-subcategory---categories.

const DocDirectiveType('subCategory', restParametersAllowed: true)
template → const DocDirectiveType

A DocDirective declaring a template of text which can be applied to other doc comments with a macro.

A template can contain any recognized doc comment content between the opening and closing tags, like Markdown text, comment references, and simple doc directives.

See documentation at github.com/dart-lang/dartdoc/blob/main/doc/directives.md#template-and-macro---templates-and-macros.

const DocDirectiveType.block('template', 'endtemplate', positionalParameters: [DocDirectiveParameter('name', DocDirectiveParameterFormat.any)])
tool → const DocDirectiveType

A DocDirective declaring a tool.

A tool directive invokes an external tool, with the text between the opening and closing tags as stdin, and replaces the directive with the output of the tool.

See documentation at github.com/dart-lang/dartdoc/blob/main/doc/directives.md#tool---external-tools.

const DocDirectiveType.block('tool', 'end-tool', positionalParameters: [DocDirectiveParameter('name', DocDirectiveParameterFormat.any)], restParametersAllowed: true)
youtube → const DocDirectiveType

A DocDirective declaring an embedded YouTube video.

This directive has three required arguments: the width, the height, and the URL. For example:


<iframe src="https://www.youtube.com/embed/abc123?rel=0" 
        title="YouTube video player" 
        frameborder="0" 
        allow="accelerometer; 
               autoplay; 
               clipboard-write; 
               encrypted-media; 
               gyroscope; 
               picture-in-picture" 
        allowfullscreen="" 
        style="max-width: 600px;
               max-height: 400px;
               width: 100%;
               height: 100%;
               aspect-ratio: 600 / 400;">
</iframe>


See documentation at github.com/dart-lang/dartdoc/blob/main/doc/directives.md#youtube---youtube-videos.

const DocDirectiveType('youtube', positionalParameters: [DocDirectiveParameter('width', DocDirectiveParameterFormat.integer), DocDirectiveParameter('height', DocDirectiveParame…

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
isBlock bool
Whether this starts a block directive, which must be closed by a specific closing directive.
final
name String
The name of the directive, as written in a doc comment.
final
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
namedParameters List<DocDirectiveParameter>
The named parameters, which are each optional.
final
opposingName String?
The name of the directive that ends this one, in the case of a block directive's opening tag, the name of the directive that starts this one, in the case of a block directive's closing tag, and null otherwise.
final
positionalParameters List<DocDirectiveParameter>
The positional parameters, which are each required.
final
restParametersAllowed bool
Whether "rest" parameters are allowed.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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

Constants

values → const List<DocDirectiveType>
A constant List of the values in this enum, in order of their declaration.