buildLibrary method Null safety

Library buildLibrary(
  1. String name
)

Implementation

Library buildLibrary(String name) {
  final filename = name.snakeCase;
  return Library(
    (b) => b
      ..directives.add(Directive.part('$filename.freezed.dart'))
      ..directives.add(Directive.part('$filename.g.dart'))
      ..body.addAll(map((entry) => entry.valueType.buildClass(entry.name))),
  );
}