OutputSpec class

A parsed --output <format>[:<file>] specification.

Examples:

Constructors

OutputSpec({required OutputFormat format, String? filePath})
Creates an output spec. A null/empty filePath means stdout.
const

Properties

filePath String?
Optional destination file path; null means write to stdout.
final
format OutputFormat
The resolved output format.
final
hasFile bool
Whether output is directed to a (non-empty) file path.
no setter
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

Static Methods

tryParse(String? value) OutputSpec?
Parses a spec string of the form <format> or <format>:<file>.

Constants

defaultSpec → const OutputSpec
The default spec: plain text to stdout.