Infrastructure low complexity mobile
0
Dependencies
0
Dependents
1
Entities
0
Integrations

Description

Infrastructure utility that manages cursor-based pagination state and request lifecycle for the contacts list. Translates REST API cursor tokens into Dart-native pagination state, handles edge cases such as empty pages, last-page detection, and request deduplication to prevent duplicate API calls during rapid scrolling.

Feature: Contact List & Search

contact-pagination-adapter

Responsibilities

  • Track current pagination cursor and page state
  • Detect last page from API response metadata
  • Deduplicate concurrent pagination requests
  • Transform API cursor tokens to typed pagination state
  • Reset pagination state on search query change

Interfaces

buildPageRequest(cursor?: String, pageSize: int)
parsePageResponse(response: Map)
hasNextPage(response: Map)
getNextCursor(response: Map)
resetPagination()
isRequestInFlight()

Related Data Entities (1)

Data entities managed by this component