generateClientStubs function

List<GenerateResult> generateClientStubs(
  1. List<DescriptionImportPair> descriptions,
  2. String outputDirectory, {
  3. bool updatePubspec = false,
})

Generate client stubs for a set of API descriptions with a corresponding import map. This is used to generate client stubs inside the same package as the server API and uses the same message classes as used on the server side.

Implementation

List<GenerateResult> generateClientStubs(
  List<DescriptionImportPair> descriptions,
  String outputDirectory, {
  bool updatePubspec = false,
}) {
  final clientGenerator = ApisFilesGenerator(
    descriptions,
    outputDirectory,
    updatePubspec: updatePubspec,
  );
  return clientGenerator.generate();
}