shouldHideTasksFooter function
Returns true when the background tasks footer should be hidden because the spinner tree is active and every visible background task is a teammate.
Implementation
bool shouldHideTasksFooter(
Map<String, BackgroundTaskState> tasks,
bool showSpinnerTree,
) {
if (!showSpinnerTree) return false;
bool hasVisibleTask = false;
for (final t in tasks.values) {
hasVisibleTask = true;
if (t.type != BackgroundTaskType.inProcessTeammate) return false;
}
return hasVisibleTask;
}