applyFilters method
Future<void>
applyFilters(
{ - bool enforced = false,
})
Implementation
Future<void> applyFilters({bool enforced = false}) async {
final QueryField? queryField = queryFieldFromJson(mapQueryFieldCellJsonToQueryFieldJson(filterStructureBloc.state.data));
if (queryField == state.query && enforced == false) {
return;
}
if (queryField == null) {
emit(state.copyWithNull(query: true));
} else {
emit(state.copyWith(query: queryField));
}
await makeFiltersBackup();
emit(state.copyWith(isLoading: true));
await _loadData(modelId: state.model.id);
}