apply method

void apply({
  1. required ChangelogGenerator generator,
  2. required Config config,
  3. String method = "header",
})

Check if inside the map there is a method generator with the name provided otherwise the header method is used

Implementation

void apply(
    {required ChangelogGenerator generator,
    required Config config,
    String method = "header"}) {
  if (!_methods.containsKey(method)) {
    // No exception here it is applied trivial changelog
    // with the inclusion of all the commits.
    return;
  }
  if (config.generatorMethod.headerFiler) {
    return _methods[method]!.apply(
        generator: generator, exactMatchHeader: "${generator.packageName}:");
  }
  return _methods[method]!.apply(generator: generator);
}