isSyncConfigured method
Check if the sync is configured reading the sync_details table
Implementation
Future<bool> isSyncConfigured({required String dbName}) async {
if (syncConfigured == SyncEnabled.unknown) {
const sql = "SELECT count(*) as C FROM ${SyncDetails.tableName}";
final int count = await query(sql, singleResult: true, dbName: dbName);
syncConfigured = (count > 0) ? SyncEnabled.enabled : SyncEnabled.disabled;
}
return syncConfigured == SyncEnabled.enabled;
}