SegmentConfiguration.fromYaml constructor

SegmentConfiguration.fromYaml(
  1. String yaml, {
  2. Uri? uri,
})

Creates a new path segment configuration from a YAML string.

Implementation

factory SegmentConfiguration.fromYaml(String yaml, {Uri? uri}) {
  final YamlMap map = loadYaml(yaml, sourceUrl: uri) as YamlMap;

  // print(map.cast());
  // exit(0);

  return SegmentConfiguration.fromJson(map.cast());
}