Navigation and Routes
The navigation inside the Unsplash feature is quite simple. It consists of two tab routes: Home and Search.
The Home tab consists of a set of listings that show you all the photos under various categories. Tapping on a photo takes you to the details of the photo. The same behavior exists in the Search tab as well. When you type on search, you get a listing of all the photos. Tapping on the photo will take you to its details.
This navigation structure can be visualized in the diagram below.
Route Setup
The route setup is done through the StatefulShellRoute
with two tabs: Home and
Search. Within the home tab, you can also navigate to the individual photo
details, the collection details and the topic details. The collection and topic
detail pages are a type of listing pages for the photos. When you tap on a photo
in the list, it takes you to the photo details.
The Search tab behaves in a similar way with the listing of search results. Tapping in each result takes you to the photo details page.
The snippet below shows the route setup in action.