content method

  1. @override
String content()
override

Implementation

@override
String content() {
  final pascal = _returnType.toPascalCase();
  final returnType = switch (_returnType) {
    'bool' => 'bool',
    'int' => 'int',
    'double' => 'double',
    _ => pascal.toPascalCase(),
  };
  return '''
import 'dart:async';

import 'package:revali_router/revali_router.dart';

// Learn more about Pipes at https://www.revali.dev/constructs/revali_server/core/pipes
class ${pascal}Pipe implements Pipe<$_inputType, $returnType> {
const ${pascal}Pipe();

@override
Future<$returnType> transform($_inputType value, PipeContext context) async {
  // TODO: implement transform
  throw UnimplementedError();
}
}
''';
}