YamlMap.wrap constructor
YamlMap.wrap(
- Map dartMap, {
- Object? sourceUrl,
- CollectionStyle style = CollectionStyle.ANY,
Wraps a Dart map so that it can be accessed (recursively) like a YamlMap.
Any SourceSpan
s returned by this map or its children will be dummies
without useful location information. However, they will have a reasonable
implementation of SourceSpan.message
. If sourceUrl
is
passed, it's used as the SourceSpan.sourceUrl
.
Implementation
factory YamlMap.wrap(Map dartMap,
{Object? sourceUrl, CollectionStyle style = CollectionStyle.ANY}) =>
YamlMapWrapper(dartMap, sourceUrl, style: style);