allActions property

Set<MediaAction> get allActions

Returns the set of unique MediaActions contained in the slots.

If either MediaAction.play or MediaAction.pause is present in the slots, both are included in the returned set as they represent the dual states of the playback transport control.

Implementation

Set<MediaAction> get allActions {
  final set = slots.toSet();
  if (set.contains(MediaAction.play)) {
    set.add(MediaAction.pause);
  } else if (set.contains(MediaAction.pause)) {
    set.add(MediaAction.play);
  }
  return set;
}