checkDeviceAp method

Future<bool> checkDeviceAp(
  1. String id, {
  2. int count = 0,
})
inherited

Implementation

Future<bool> checkDeviceAp(String id, {int count = 0}) async {
  var bl = false;
  /* try {
    Response response = await Dio(BaseOptions(
            sendTimeout: 5000, connectTimeout: 1000, receiveTimeout: 5000))
        .get(
      "http://192.168.168.1:81/get_status.cgi?loginuse=admin&loginpas=888888",
    );

    if (response?.statusCode == 200) {
      Map result = getMap(response.data);
      String realDeviceid = result["realdeviceid"];
      bl = (realDeviceid == id);
    } else
      bl = false;
  } on DioError {
    if (count < 5)
      bl = await checkDeviceAp(id, count: count + 1);
    else
      bl = false;
  }

  print('id:$id ap:$bl count:$count end');*/
  return bl;
}