Originally published on bendyworks.com .    For the last post before the month's wrap up tomorrow, I wanted to do something more fun: use a  hero animation between the home page list and the individual post page.   When I first implemented the  Hero  animation it never worked going back from a  PostPage  to the  HomePage . The reason was that  HomePage  would get rerendered and that would  generate new fake posts . So I moved the fake data generation up a level to  MyApp  and pass it into  HomePage . This is more realistic as going to the  HomePage  shouldn't request the  Post s every time.   HomePage (    title:  'Birb' ,    posts:  _loadPosts ( context ),  )     The  PostPage  implementation is a simple  StatelessWidget  that takes  Post  and renders a  PostItem . This will become more complex as things like comments and likes are implemented but works for now.   class  Pos...
 
 
Comments
Post a Comment