allAdapterMethods property

String get allAdapterMethods

Generated adapter methods

Implementation

String get allAdapterMethods {
  return generators.fold<Set<String>>(<String>{}, (acc, generator) {
    final expectedOutput = 'Future<${generator.adapterMethodOutputType}>';
    final methodAction = generator.doesDeserialize ? 'from' : 'to';
    final methodArguments =
        '${generator.adapterMethodInputType} input, {required provider, covariant ${superAdapterName}Repository? repository}';
    final methodName = '$methodAction${generator.providerName}($methodArguments)';

    acc.add('@override\n$expectedOutput $methodName async => ${generator.adapterMethod};');
    return acc;
  }).join('\n');
}