YamlScalar.wrap constructor
YamlScalar.wrap(
- dynamic value, {
- Object? 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, {Object? sourceUrl, this.style = ScalarStyle.ANY})
: super._(NullSpan(sourceUrl)) {
ArgumentError.checkNotNull(style, 'style');
}