title: Flutter auto_route | How do I wrap a route with BlocProvider?
body: <p>So, I'm using the <a href="https://pub.dev/packages/auto_route" rel="noreferrer">auto_route</a> package for navigation in my app and <code>flutter_bloc</code> for state management. When I was using the old Navigator, I could just wrap a route with a BlocProvider. For example:</p>
  <pre class="lang-dart prettyprint-override"><code>class Router {
    static Route&lt;dynamic&gt; generateRoute(RouteSettings settings) {
      switch (settings.name) {
        case '/':
          return MaterialPageRoute(
            builder: (_) =&gt; BlocProvider( // wrapped Home with BlocProvider
              create: (context) =&gt; SubjectBloc(),
              child: Home(),
            ),
          );
        case '/feed':
          return MaterialPageRoute(builder: (_) =&gt; Feed());
      }
    }
  }
  </code></pre>
  <p>Now, <a href="https://pub.dev/packages/auto_route" rel="noreferrer">auto_route</a> uses annotations to generate a routing file. How would I go around providing provider context to the route?</p>