deleteDevice static method

Future<bool> deleteDevice(
  1. String deviceSerial
)

Delete device from current account

Parameters:

  • deviceSerial: Device serial number

Returns true if device deleted successfully

Implementation

static Future<bool> deleteDevice(String deviceSerial) async {
  try {
    final bool result = await _channel.invokeMethod(
      EzvizChannelMethods.deleteDevice,
      {
        'deviceSerial': deviceSerial,
      },
    );
    return result;
  } catch (e) {
    ezvizLog('Error deleting device: $e');
    return false;
  }
}