isBusyWhere method

bool isBusyWhere({
  1. String? category,
  2. bool? blocksUserInteraction,
})

Whether matching tasks contain any queued or running work.

Implementation

bool isBusyWhere({
  String? category,
  bool? blocksUserInteraction,
}) {
  return tasks.values.any((details) {
    if (!_matchesTaskFilter(
      details,
      category: category,
      blocksUserInteraction: blocksUserInteraction,
    )) {
      return false;
    }
    return details.phase != LevitTaskPhase.completed;
  });
}