generate method

  1. @override
List<Library> generate()
override

Implementation

@override
List<Library> generate() {
  final imports = ImportGeneration(options).generate();
  final constructors = ConstructorGeneration(options).generate();

  final fields = FieldGeneration(
    options,
    localeToResourceInfo,
    locale,
  ).generate();

  final methods = MethodGeneration(
    options,
    context,
    messages,
  ).generate();

  final classes = ClassGeneration(
    options,
    messages,
    context,
    constructors,
    fields,
    methods,
  ).generate();

  return [
    Library((b) => b
      ..comments.add(options.header)
      ..directives.addAll(imports)
      ..body.addAll(classes))
  ];
}