onGenerate<T> method
Implementation
void onGenerate<T>(
FutureOr<T> Function(GeneratorOptions options) handler,
) {
server.registerMethod('generate', (Parameters params) async {
final options = GeneratorOptions.fromJson(params.asMap);
final result = await handler(options);
return result;
});
}