addDevice static method
Add a device to current account
Parameters:
- deviceSerial: Device serial number
- verifyCode: Device verification code (if required)
Returns true if device added successfully
Implementation
static Future<bool> addDevice({
required String deviceSerial,
String verifyCode = '',
}) async {
try {
final bool result = await _channel.invokeMethod(
EzvizChannelMethods.addDevice,
{
'deviceSerial': deviceSerial,
'verifyCode': verifyCode,
},
);
return result;
} catch (e) {
ezvizLog('Error adding device: $e');
return false;
}
}