isDeviceRegistered method
Implementation
@override
Future<bool> isDeviceRegistered(LicenseDocument license) async {
if (!await _exists(license)) {
throw LcpException.runtime(
"The LCP License doesn't exist in the database");
}
List<Map<String, dynamic>> result = await database.query(
LicensesTable.name,
columns: [LicensesTable.registered],
where: '${LicensesTable.id} = ? AND ${LicensesTable.registered} = ?',
whereArgs: [license.id, _true],
);
return result.isNotEmpty;
}