IconsModel.fromYaml constructor

IconsModel.fromYaml(
  1. dynamic yamlMap
)

Implementation

factory IconsModel.fromYaml(dynamic yamlMap) {
  try {
    return IconsModel(
      packs: [for (final pack in yamlMap[_packs]) IconPack.fromYaml(pack)],
      outputFileFolder: yamlMap[_outputFileFolder],
      outputFontFolder: yamlMap[_outputFontFolder],
    );
  } catch (_) {
    throw ('Unsupported yaml file format');
  }
}