FigSpec class

Top-level completion spec (one per CLI command). Same shape as Subcommand at root.

Constructors

FigSpec({required String name, String? displayName, String? description, List<FigSubcommand>? subcommands, List<FigOption>? options, dynamic args, String? icon, FilterStrategy? filterStrategy, bool hidden = false, String? insertValue, String? replaceValue, int? priority, dynamic deprecated, ParserDirectives? parserDirectives, bool? requiresSubcommand, List? additionalSuggestions, FigGenerateSpecCallback? generateSpec, dynamic generateSpecCacheKey, FigVersionedSpecDefinition? versionedSpec, dynamic loadSpec})

Properties

additionalSuggestions → List?
(string | Suggestion)[] in TS; appended below subcommand suggestions.
final
args → List<FigArg>?
Positional argument(s) (TS/JS allows single object or array; Dart unified as list).
final
deprecated → dynamic
final
description → String?
final
displayName → String?
final
filterStrategy → FilterStrategy?
Enum or string (e.g. 'fuzzy') for converter/generated code compatibility.
final
generateSpec → FigGenerateSpecCallback?
Dynamically generate a root spec at runtime (see FigGenerateSpecCallback). Runtime calls with adapter-provided executeCommand.
final
generateSpecCacheKey → dynamic
Optional stable cache key for root-level generateSpec.
final
hashCode → int
The hash code for this object.
no setterinherited
hidden → bool
final
icon → String?
final
insertValue → String?
final
loadSpec → dynamic
final
name → String
final
options → List<FigOption>?
final
parserDirectives → ParserDirectives?
{ flagsArePosixNoncompliant?, optionsMustPrecedeArguments?, optionArgSeparators? }. Map for generated code.
final
priority → int?
final
replaceValue → String?
final
requiresSubcommand → bool?
Whether a subcommand is required (space inserted after command name when true).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
subcommands → List<FigSubcommand>?
final
versionedSpec → FigVersionedSpecDefinition?
Runtime-only metadata for engine-scoped version selection.
final

Methods

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

Operators

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