where method

dynamic where(
  1. BuildContext context,
  2. List list,
  3. int loop
)

Implementation

dynamic where(BuildContext context, List<dynamic> list, int loop) {
  final res = list.where((e) {
    dynamic currentElement;
    try {
      currentElement = e.value;
    } catch (_) {
      currentElement = e;
    }
    return condition.getValue<bool>(
        context, () => true, () => false, loop, currentElement);
  }).toList();
  return res;
}