createChanel method

ClientChannel createChanel()

Implementation

ClientChannel createChanel(){
  final creds = userTls? const ChannelCredentials.secure() : ChannelCredentials.insecure();
  return ClientChannel(
    host,
    port: port,
    options:  ChannelOptions(
      idleTimeout: const Duration(minutes: 5),
      connectionTimeout: const Duration(seconds: 8),
      userAgent: 'gps-tracker/flutter',
      credentials: creds

    )
  );
}