CheckBox and Filtering

This commit is contained in:
DenserMeerkat
2023-12-15 04:08:12 +05:30
parent 5d5d7928db
commit ce8a7dc944
15 changed files with 201 additions and 45 deletions

View File

@ -109,3 +109,11 @@ Uint8List jsonMapToBytes(Map<String, dynamic>? map) {
return bytes;
}
}
List<NameValueModel> getEnabledRows(
List<NameValueModel>? rows, List<bool>? enabledList) {
if (rows == null || enabledList == null) {
return rows ?? [];
}
return rows.where((element) => enabledList[rows.indexOf(element)]).toList();
}