Skip to content

Instantly share code, notes, and snippets.

@Djsmk123
Created September 4, 2023 12:44
services/
class GrpcService {
static String host = "10.0.2.2"; //default for android emulator
static updateChannel() {
channel = ClientChannel(host,
port: 9090,
options:
const ChannelOptions(credentials: ChannelCredentials.insecure()));
}
static var channel = ClientChannel(host,
port: 9090,
options: const ChannelOptions(
credentials: ChannelCredentials.insecure(),
));
static var client = GrpcServerServiceClient(channel);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment