YamlMap.wrap constructor
YamlMap.wrap(
- Map dartMap, {
- dynamic 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.getLocationMessage
. If sourceUrl
is
passed, it's used as the SourceSpan.sourceUrl
.
Implementation
factory YamlMap.wrap(Map dartMap,
{sourceUrl, CollectionStyle style = CollectionStyle.ANY}) =>
YamlMapWrapper(dartMap, sourceUrl, style: style);