I have a
Flutter mobile application where I do request data from the backend, and each individual record of this data have it's own identifier and category. For each of these identifiers I want to redirect the user to the correct page of the app. An example:
1. User enter the page, and we request the data
2. Data arrives and we present it.
3. When clicking at each item, we should redirect the user to the appropriate page of that item.
Question 1) Where should the route definition be?
Currently I created a Widget and made a switch case on the identifiers to define the route of each one click.
But shouldn't this be done already in the presenter, so the view would only display it and create the callbacks to redirect it with the given route? My concern about it is that then the presenter would know too much about the View, or am I wrong?
----
Question 2) Each of those items that I mentioned have their priority, and in the view each priority is displayed in their own way, like Urgent priority is displayed in red and so on...
Should presenter also define these colors for the view? The problem is that this Color it's an object from the Flutter Framework which I would like to avoid in this layer...
Thank you!
Acácio.