Pagination code is from crelies'List-Pagination-SwiftUI. I made a complete project with reference to crelies' code
SwiftUI-List-Pagination is a complete project that implements the paging function.
- define struct implement Identifiable
- use RandomAccessCollection to get isLastItem function
- SwiftUI show data