VisitAttributionsCallback typedef

VisitAttributionsCallback = void Function(AttributedText fullText, int index, Set<Attribution> startingAttributions, Set<Attribution> endingAttributions)

Visits every index in the the given AttributedText which has at least one start or end marker, passing the attributions that start or end at the index.

Note: most range-based operations expect the closing index to be exclusive, but that is not how this callback works. Both the start and end indexes are inclusive.

Implementation

typedef VisitAttributionsCallback = void Function(
  AttributedText fullText,
  int index,
  Set<Attribution> startingAttributions,
  Set<Attribution> endingAttributions,
);