Config.fromYaml constructor

Config.fromYaml(
  1. YamlMap map
)

Implementation

factory Config.fromYaml(YamlMap map) {
  return Config(
    build: BuildConfig.fromYaml(map[_kBuild] as YamlMap?),
    serve: ServeConfig.fromYaml(map[_kServe] as YamlMap?),
    templates: TemplatesConfig.fromYaml(map[_kTemplates] as YamlMap?),
    title: map[_kTitle] as String? ?? '',
    author: map[_kAuthor] as String? ?? '',
    baseUrl: map[_kBaseUrl] as String? ?? '',
    extra: map[_kExtra] as YamlMap? ?? YamlMap(),
  );
}