find static method

Future<Router> find()

Implementation

static Future<Router> find() async {
  var discovery =DeviceDiscoverer();
  try {
    var client = await discovery
        .quickDiscoverClients(
        timeout: const Duration(seconds: 10),
        query: CommonDevices.WAN_ROUTER)
        .first;
    var device = await client.getDevice();
    discovery.stop();
    var router = Router._(device);
    await router.init();
    return router;
  } catch (e) {
    throw Exception('ERROR: Could not find the client');
  }

}