getClientChannel function

GrpcWebClientChannel getClientChannel({
  1. required GrpcSettings grpcSettings,
})

Implementation

GrpcWebClientChannel getClientChannel({required GrpcSettings grpcSettings}) {
  final protocol = grpcSettings.host == 'localhost' ? 'http' : 'https';
  return GrpcWebClientChannel.xhr(
      Uri.parse('${protocol}://${grpcSettings.host}:${grpcSettings.port}'));
}