Dump List topic
Dumps any object in Dart that implements Iterable. The default scalar style is ScalarStyle.plain (you can override this).
Flow Sequences
Flow sequences start with [ and terminate with ]. All entries are always dumped on a new line.
dumpAsYaml(
['hello', 24, true, 24.0],
config: ConfiConfig.yaml(
styling: TreeConfig.flow(forceInline: false),
),
);
# Output in yaml
[
hello,
24,
true,
24.0
]
Tip
You can inline a flow sequence by passing in forceInline as true.
Block Sequences
Block sequences have no explicit starting or terminating indicators. However, entries always have a leading - .
dumpAsYaml(
['hello', 24, true, 24.0],
config: ConfiConfig.yaml(
styling: TreeConfig.block(scalarStyle: ScalarStyle.literal),
),
);
# Output in yaml
- |-
hello
- |-
24
- |-
true
- |-
24.0
Classes
- Alias Dump Scalar Dump List Dump Map Dumpable Views
- An alias.
- BlockDumper Dump Scalar Dump List Dump Map Dumpable Views Representation Tree
- Dumps a YAML string line-by-line.
-
ConcreteNode<
To> Dump Scalar Dump List Dump Map Dumpable Views - A node that is not an alias.
- DumpableView Dump Scalar Dump List Dump Map Dumpable Views
- An object that can be dumped to YAML.
- InlinedFlowDumper Dump Scalar Dump List Dump Map Dumpable Views Representation Tree
- Dumps an inlined flow CollectionNode.
- YamlDumper Dump Scalar Dump List Dump Map Dumpable Views
- A YAML document dumper.
- YamlIterable Dump List Dumpable Views
- A mutable view for an Iterable-like object that can have YAML node properties.
Extensions
Functions
-
dumpAsYaml(
Object? object, {Config? config, ExpandObject? expand}) → String Dump Scalar Dump List Dump Map Dumpable Views -
Dumps an
objectto YAML using theconfigprovided.
Typedefs
-
IterableToYaml
= ObjectFromView<
YamlIterableEntry> Dump List - Maps an object to yaml sequence.
-
YamlIterableEntry
= Iterable<
Object?> Dump List - A YAML sequence with entries.