@@ -108,34 +108,28 @@ class GrpcServiceGenerator {
108108 void _generateClient (IndentingWriter out) {
109109 if (_descriptor.options.deprecated) {
110110 out.println (
111- ' @$coreImportPrefix .Deprecated(\ ' This service is deprecated\' )' );
111+ " @$coreImportPrefix .Deprecated('This service is deprecated')" );
112112 }
113- out.println (
114- '@$protobufImportPrefix .GrpcServiceName(\' $_fullServiceName \' )' );
113+ out.println ("@$protobufImportPrefix .GrpcServiceName('$_fullServiceName ')" );
115114 out.addBlock ('class $_clientClassname extends $_client {' , '}' , () {
116115 for (final method in _methods) {
117116 method.generateClientMethodDescriptor (out);
118117 }
119118 out.println ();
120- out.println ('$_clientClassname ($_clientChannel channel,' );
121- out.println (' {$_callOptions ? options,' );
122119 out.println (
123- ' $coreImportPrefix .Iterable<$_interceptor >? interceptors})' );
124- out.println (' : super(channel, options: options,' );
125- out.println (' interceptors: interceptors);' );
120+ '$_clientClassname (super.channel, {super.options, super.interceptors});' );
126121 for (final method in _methods) {
127122 method.generateClientStub (out);
128123 }
129124 });
130125 }
131126
132127 void _generateService (IndentingWriter out) {
133- out.println (
134- '@$protobufImportPrefix .GrpcServiceName(\' $_fullServiceName \' )' );
128+ out.println ("@$protobufImportPrefix .GrpcServiceName('$_fullServiceName ')" );
135129 out.addBlock ('abstract class $_serviceClassname extends $_service {' , '}' ,
136130 () {
137131 out.println (
138- ' $coreImportPrefix .String get \$ name => \ ' $_fullServiceName \' ;' );
132+ " $coreImportPrefix .String get \$ name => '$_fullServiceName ';" );
139133 out.println ();
140134 out.addBlock ('$_serviceClassname () {' , '}' , () {
141135 for (final method in _methods) {
@@ -153,9 +147,7 @@ class GrpcServiceGenerator {
153147 }
154148
155149 static final String _callOptions = '$grpcImportPrefix .CallOptions' ;
156- static final String _interceptor = '$grpcImportPrefix .ClientInterceptor' ;
157150 static final String _client = '$grpcImportPrefix .Client' ;
158- static final String _clientChannel = '$grpcImportPrefix .ClientChannel' ;
159151 static final String _service = '$grpcImportPrefix .Service' ;
160152}
161153
0 commit comments