service static method

String service(
  1. String projectName,
  2. String feature
)

Implementation

static String service(String projectName, String feature) {
  final pascal = StringUtils.toPascalCase(feature);
  return '''
import 'package:$projectName/features/$feature/${feature}_model.dart';

class ${pascal}Service {
// TODO: replace this stub with a real data source.
Future<${pascal}Model> fetch() async {
  return const ${pascal}Model(id: 'placeholder');
}
}
''';
}