Understanding how to transform data streams
When writing any code dealing with Paging, you need to understand how you can transform the data stream as you load it to your users. For instance, you may need to filter a list of items or even convert the items to a different type before you can feed the UI with the data.
Hence, ensuring you apply transformation directly to the stream data lets you keep your repository and UI logic separated cleanly. In this recipe, we will try to understand how we can transform data streams.
Getting ready
To follow along, you must be familiar with the primary usage of the Paging library; hence make sure you have read the previous recipes in this chapter.
How to do it…
In this recipe, we will perform the following steps:
- Look into how we can apply the essential transformation.
- Convert and filter the data.
- Handle separators in the UI and convert the UI model.
The recipe is helpful to you if you are already using...