solo method

void solo(
  1. Color color,
  2. Iterable<Color> all
)

Hide everything except color. Useful for "solo" legend interactions (double-tap or long-press).

Implementation

void solo(Color color, Iterable<Color> all) {
  final target = {for (final c in all) if (c != color) c};
  if (!setEquals(target, _hidden)) {
    _hidden
      ..clear()
      ..addAll(target);
    notifyListeners();
  }
}