// Native channel factory — plain gRPC over HTTP/2. // Selected on every non-web target (macOS, Linux, Windows, iOS, // Android) via the conditional import in hub_client.dart. import 'package:grpc/grpc.dart'; import 'package:grpc/grpc_connection_interface.dart'; import 'hub_client.dart' show HubEndpoint; ClientChannelBase createChannel(HubEndpoint endpoint) { return ClientChannel( endpoint.host, port: endpoint.port, options: ChannelOptions( credentials: endpoint.secure ? const ChannelCredentials.secure() : const ChannelCredentials.insecure(), idleTimeout: const Duration(minutes: 5), ), ); }