loadMoreReactions method

Future<void> loadMoreReactions(
  1. String lookupValue, {
  2. LookupAttribute lookupAttr = LookupAttribute.activityId,
  3. int? limit,
  4. String? kind,
  5. EnrichmentFlags? flags,
})

Loads the next paginated reactions.

This method call queryPaginatedReactions for you and automatically uses the correct limit and filter as determined by the last strored paginatedParamsReactions.

The lookupAttr default value is set toLookupAttribute.activityId.

You can override the limit value, otherwise it is retrieved from the latest NextParams.

Implementation

Future<void> loadMoreReactions(
  String lookupValue, {
  LookupAttribute lookupAttr = LookupAttribute.activityId,
  int? limit,
  String? kind,
  EnrichmentFlags? flags,

  //TODO: no way to parameterized marker?
}) async {
  final nextParams = paginatedParamsReactions(lookupValue: lookupValue);

  if (nextParams == null) {
    // TODO(gordon): add logs
    return;
  }

  queryPaginatedReactions(
    lookupAttr,
    lookupValue,
    filter: nextParams.idLT,
    limit: limit ?? nextParams.limit,
    kind: kind,
    flags: flags,
  );
}