TemplatesConfig.fromYaml constructor

TemplatesConfig.fromYaml(
  1. YamlMap? map
)

Implementation

factory TemplatesConfig.fromYaml(YamlMap? map) {
  if (map == null || map.isEmpty) {
    return const TemplatesConfig();
  }

  return TemplatesConfig(
    page: map['page'] as String?,
    section: map['section'] as String?,
  );
}