requestPalette method

Cmd requestPalette(
  1. Iterable<int> indices
)

Requests a normalized set of palette slot reports.

Duplicate indices are removed and the resulting request order is sorted.

Implementation

Cmd requestPalette(Iterable<int> indices) {
  final normalized = indices.toSet().toList()..sort();
  if (normalized.isEmpty) {
    return Cmd.none();
  }
  return Cmd.batch(
    normalized.map((index) => Cmd.requestColorPalette(index)).toList(),
  );
}