positionsByReadingOrder method
Returns the list of all the positions in the publication, grouped by the resource reading order index.
Implementation
Future<List<List<Locator>>> positionsByReadingOrder() async {
PositionsService? service = findService<PositionsService>();
if (service != null) {
return service.positionsByReadingOrder();
}
Map<String, List<Locator>> locators =
(await positionsFromManifest()).groupBy((Locator it) => it.href);
return readingOrder.map((it) => locators[it.href] ?? []).toList();
}