YamlScalar.wrap constructor
YamlScalar.wrap(
- dynamic value, {
- dynamic sourceUrl,
- ScalarStyle style = ScalarStyle.ANY,
Wraps a Dart value in a YamlScalar.
This scalar's span won't have useful location information. However, it
will have a reasonable implementation of SourceSpan.message
. If
sourceUrl
is passed, it's used as the SourceSpan.sourceUrl
.
Implementation
YamlScalar.wrap(this.value, {sourceUrl, this.style = ScalarStyle.ANY})
: super._(NullSpan(sourceUrl)) {
ArgumentError.checkNotNull(style, 'style');
}