/grpc_services.dart Secret
Created
September 4, 2023 12:44
services/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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