DocDescriptor class sealed

A documentation descriptor that pairs with LibraryRegistrationContext.define to declare an exported value's type and metadata.

Use the named constructors to create the appropriate kind of descriptor:

context.define('pi', .constant(
  summary: 'The value of π.',
  type: 'number',
  rawValue: 3.1415,
));

context.define('echo', .function(
  summary: 'Echoes input.',
  params: [DocParam('v', 'any', 'Value.')],
  category: 'base',
  rawValue: (args) => args.first,
));

context.define('DeviceSide', .alias(
  name: 'DeviceSide',
  variants: [AliasVariant(value: 'left', description: 'The left side')],
));

A documentation descriptor that pairs with LibraryRegistrationContext.define to declare an exported value's type and metadata.

Use the concrete subclasses (FunctionDescriptor, ConstantDescriptor, AliasDescriptor, EnumDescriptor, TableDescriptor) to create the appropriate kind of descriptor:

context.define('pi', ConstantDescriptor(
  summary: 'The value of π.',
  type: 'number',
  rawValue: 3.1415,
));

context.define('echo', FunctionDescriptor(
  summary: 'Echoes input.',
  params: [DocParam('v', 'any', 'Value.')],
  category: 'base',
  rawValue: (args) => args.first,
));
Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
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