generate method
List<Spec>
generate(
)
override
Implementation
@override
List<Spec> generate() {
final classes = <Spec>[
Class(
(cb) => cb
..name = getClassName(context)
..constructors.addAll(constructors)
..fields.addAll(fields)
..methods.addAll(methods),
),
];
if (options.indexType == IndexType.enumerate) {
classes.add(Enum((cb) => cb
..name = enumName(context)
..values.addAll(List.generate(
messages.length,
(index) => messages[index].nameIsDartConform
? EnumValue(
(evb) => evb..name = messages[index].name,
)
: null).whereType<EnumValue>())));
}
return classes;
}