generateAdapter method

String generateAdapter(
  1. Element element,
  2. ConstantReader annotation,
  3. BuildStep? buildStep
)

Combine relevant serdes generators for output to a single file: the adapter.

Implementation

String generateAdapter(Element element, ConstantReader annotation, BuildStep? buildStep) {
  final generators = buildGenerators(element, annotation);

  final adapterGenerator = AdapterGenerator(
    superAdapterName: superAdapterName,
    className: element.name!,
    generators: generators,
  );

  return adapterGenerator.generate();
}