YamlMap constructor

YamlMap({
  1. Object? sourceUrl,
})

Creates an empty YamlMap.

This map'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.

sourceUrl may be either a String, a Uri, or null.

Implementation

factory YamlMap({Object? sourceUrl}) => YamlMapWrapper(const {}, sourceUrl);