writeEnums method

void writeEnums(
  1. T generatorOptions,
  2. Root root,
  3. Indent indent, {
  4. required String dartPackageName,
})

Writes all enums to indent.

Can be overridden to add extra code before/after enums.

Implementation

void writeEnums(
  T generatorOptions,
  Root root,
  Indent indent, {
  required String dartPackageName,
}) {
  for (final Enum anEnum in root.enums) {
    writeEnum(
      generatorOptions,
      root,
      indent,
      anEnum,
      dartPackageName: dartPackageName,
    );
  }
}