title: Why use onGenerateRoute() vs ModalRoute.of() in Flutter?
body: <p>Is there any reason to use one over the other in any given circumstance? I'm trying to figure out why there are two ways of doing this. I'm referring to the "navigate with arguments" cookbook recipe:</p>
  
  <p><a href="https://flutter.dev/docs/cookbook/navigation/navigate-with-arguments" rel="noreferrer">https://flutter.dev/docs/cookbook/navigation/navigate-with-arguments</a></p>