Implementing Hero transitions

We are going to change our Favors app to have a Hero animation between the Your favors list screen and the Requesting favor screen, so that when we tap on the Request a favor floating button, there will be a smooth transition between it and the next page. The same effect works when going back from the Requesting favor to the Your favors screen:

Your favors (This is an image of Your favors. The other (overlapped) information is not important here)

We start the change by adding a Hero widget to our tree. It should wrap the widgets involved in the animation:

class FavorsPageState extends State<FavorsPage> { // ... ...

Get Flutter for Beginners now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.