dartdoc library

A documentation generator for Dart.

Library interface is still experimental.

Classes

Accessor
Getters and setters.
AliasedElementType
AliasedFunctionTypeElementType
CallableElementType
A callable type that may or may not be backed by a declaration using the generic function syntax.
Canonicalization
Classes extending this class have canonicalization support in Dartdoc.
Categorization
Mixin implementing dartdoc categorization for ModelElements.
Category
A subcategory of a package, containing elements tagged with {@category}.
CategoryConfiguration
A configuration class that can interpret category definitions from a YAML map.
CategoryDefinition
Defines the attributes of a category in the options file, corresponding to the 'categories' keyword in the options file, and populated by the CategoryConfiguration class.
Class
A Container defined with a class declaration in Dart.
ClassTypedef
A typedef referring to a non-function, defined type.
Constructor
Container
A Container represents a Dart construct that can contain methods, operators, and fields, such as Class, Enum, or Extension.
ContainerAccessor
A getter or setter that is a member of a Container.
Dartdoc
Generates Dart documentation for all public Dart libraries in the given directory.
DartdocFileMissing
DartdocFileWriter
DartdocOption<T extends Object?>
An abstract class for interacting with dartdoc options.
DartdocOptionArgFile<T>
A DartdocOption that works with command line arguments and dartdoc_options files.
DartdocOptionArgOnly<T>
A DartdocOption that only exists as a command line argument. --help is a good example.
DartdocOptionArgSynth<T>
A class that defaults to a value computed from a closure, but can be overridden on the command line.
DartdocOptionContext
An DartdocOptionSet wrapped in nice accessors specific to Dartdoc, which automatically passes in the right directory for a given context.
DartdocOptionContextBase
All DartdocOptionContext mixins should implement this, as well as any other DartdocOptionContext mixins they use for calculating synthetic options.
DartdocOptionError
DartdocOptionFileOnly<T>
DartdocOptionFileSynth<T>
A class that defaults to a value computed from a closure, but can be overridden by a file.
DartdocOptionRoot
This is a DartdocOptionSet used as a root node.
DartdocOptionSet
A DartdocOption that only contains other DartdocOptions and is not an option itself.
DartdocOptionSyntheticOnly<T>
A synthetic option takes a closure at construction time that computes the value of the configuration option based on other configuration options. Does not protect against closures that self-reference. If mustExist and isDir or isFile is set, computed values will be resolved to canonical paths.
DartDocResolvedLibrary
Contains the ResolvedLibraryResult and any additional information about the library.
DartdocResults
The results of a Dartdoc.generateDocs call.
DartdocSyntheticOption<T>
DefinedElementType
An ElementType associated with an Element.
Documentable
Bridges the gap between model elements and packages, both of which have documentation.
Documentation
Dynamic
ElementType
Base class representing a type in Dartdoc. It wraps a DartType, and may link to a ModelElement.
EnclosedElement
An element that is enclosed by some other element.
Enum
EnumField
A field specific to an enum's values.
Extension
Extension methods
FakePackageConfigProvider
Field
FileWriter
FunctionTypedef
A typedef referring to a function type.
FunctionTypeElementType
A FunctionType that does not have an underpinning Element.
GeneralizedTypedef
A typedef referring to a non-function typedef that is nevertheless not referring to a defined class. An example is a typedef alias for void or for Function itself.
Generator
An abstract class that defines a generator that generates documentation for a given package.
GenericTypeAliasElementType
A non-callable type backed by a GenericTypeAliasElement.
Indexable
Something able to be indexed.
InheritingContainer
A Container that participates in inheritance in Dart.
Library
LibraryContainer
A set of libraries, initialized after construction by accessing libraries.
Locatable
Something that can be located for warning purposes.
Method
Mixin
Implements the Dart 2.1 "mixin" style of mixin declarations.
ModelElement
This class is the foundation of Dartdoc's model for source code.
ModelFunction
A ModelElement for a FunctionElement that isn't part of a type definition.
ModelFunctionTyped
ModelFunctionTypedef
A ModelElement for a FunctionTypedElement that is part of an explicit typedef.
ModelNode
Stripped down information derived from AstNode containing only information needed for Dartdoc. Drops link to the AstNode after construction.
Nameable
Something that has a name.
NeverType
Operator
Package
A LibraryContainer that contains Library objects related to a particular package.
PackageBuilder
Everything you need to instantiate a PackageGraph object for documenting.
PackageConfigProvider
A provider of PackageConfig-finding methods.
PackageGraph
PackageMeta
Describes a single package in the context of dartdoc.
PackageMetaFailure
PackageMetaProvider
Sets the supported way of constructing PackageMeta objects.
Parameter
ParameterizedElementType
PhysicalPackageConfigProvider
Privacy
Classes implementing this have a public/private distinction.
PubPackageBuilder
A package builder that understands pub package format.
PubPackageMeta
Default implementation of PackageMeta depends on pub packages.
ScoredCandidate
This class represents the score for a particular element; how likely it is that this is the canonical element.
SourceCodeMixin
ToolConfiguration
A configuration class that can interpret ToolDefinitions from a YAML map.
TopLevelContainer
A set of Classes, Extensions, Enums, Mixins, TopLevelVariables, ModelFunctions, and Typedefs, possibly initialized after construction by accessing private member variables.
TopLevelVariable
Top-level variables. But also picks up getters and setters?
Typedef
TypeParameter
TypeParameterElementType
UndefinedElementType
An ElementType that isn't pinned to an Element (or one that is, but whose element is irrelevant).

Enums

DocumentLocation
For a given package, indicate with this enum whether it should be documented locally, whether we should treat the package as missing and any references to it made canonical to this package, or remote, indicating that we can build hrefs to an external source.
OptionKind
An enum to specify the multiple different kinds of data an option might represent.

Mixins

Aliased
A ElementType whose underlying type was referred to by a type alias.
Callable
Any callable ElementType will mix-in this class, whether anonymous or not, unless it is an alias reference.
Constructable
A mixin to build an InheritingContainer capable of being constructed with a direct call to a Constructor in Dart.
ContainerMember
A ModelElement that is a Container member.
DocumentationComment
Features for processing directives in a documentation comment.
ElementTypeBuilderImpl
Extendable
Mixin for subclasses of ModelElement representing Elements that can be extension methods.
GetterSetterCombo
Mixin for top-level variables and fields (aka properties)
Inheritable
Mixin for subclasses of ModelElement representing Elements that can be inherited from one class to another.
MarkdownFileDocumentation
MixedInTypes
Add the ability to support mixed-in types to an InheritingContainer.
ModelElementBuilderImpl
Rendered
This ElementType uses an ElementTypeRenderer to generate some of its parameters.
TypeImplementing
Add the ability for an InheritingContainer to be implemented by other InheritingContainers and to reference what it itself implements.
TypeParameters
A mixin for ModelElements which have type parameters.

Constants

compileArgsTagName → const String
dartdocVersion → const String
htmlBasePlaceholder → const String
programName → const String

Functions

byName(Nameable a, Nameable b) int
clearPackageMetaCache() → void
createDartdocOptions(PackageMetaProvider packageMetaProvider) List<DartdocOption<Object?>>
Instantiate dartdoc's configuration file and options parser with the given command line arguments.
createGeneratorOptions(PackageMetaProvider packageMetaProvider) List<DartdocOption<Object?>>
resolveMultiplyInheritedElement(MultiplyInheritedExecutableElement e, Library? library, PackageGraph packageGraph, Class enclosingClass) ModelElement
Resolves this very rare case incorrectly by picking the closest element in the inheritance and interface chains from the analyzer.

Typedefs

ConvertYamlToType<T> = T Function(YamlMap, String, ResourceProvider)
OptionGenerator = List<DartdocOption<Object?>> Function(PackageMetaProvider)