removeModel static method
Implementation
static Future<void> removeModel(String table, String id) async {
try {
String key = 'database_table_$table';
List<Map<String, dynamic>>? models = await getModels(table);
if (models == null) {
return;
}
List<String>? data = await compute(removeDatabaseModel, {
'table': table,
'id': id,
'models': models,
});
if (data == null) {
return;
}
await getSharedPreferences().setStringList(key, data);
} catch (e) {
print(e);
}
}