iconBuilder function

Builder iconBuilder(
  1. BuilderOptions options
)

Implementation

Builder iconBuilder(BuilderOptions options) {
  try {
    final optionsPath = Map<String, dynamic>.from(options.config);
    if (optionsPath[iconConfig] != null) {
      final configFile = File(optionsPath[iconConfig]);
      final yamlString = configFile.readAsStringSync();
      final yamlMap = loadYaml(yamlString);
      final iconsModel = IconsModel.fromYaml(yamlMap);

      return IconsGenerator(iconsModel);
    }
    throw Exception('no yaml path');
  } catch (e) {
    throw Exception(e);
  }
}