title: Refreshing multiple view models from a service class
body: <h2>Context</h2>
  <p>My project looks like this:</p>
  <pre><code>+-- screens
  |   +-- main_screen.dart
  |   +-- details_screen.dart
  |   +-- summary_screen.dart
  +-- viewmodels
  |   +-- main_screen_viewmodel.dart
  |   +-- details_screen_viewmodel.dart
  |   +-- summary_screen_viewmodel.dart
  +-- services
  |   +-- caching.dart
  |   +-- api.dart
  +-- lib.dart
  </code></pre>
  <p>Screens use a ViewModel that contains all of the data it requires; any change to the model results in a rebuild of the view:</p>
  <pre class="lang-dart prettyprint-override"><code>// main_screen.dart
  class _MainScreenState extends State&lt;MainScreen&gt; {
    final model = MainScreenViewModel();
  
    Widget build(BuildContext context) {
      return ChangeNotifierProvider&lt;MainScreenViewModel&gt;(
        create: (BuildContext context) =&gt; widget.model,
        child: Consumer&lt;MainScreenViewModel&gt;(
          builder: (context, model, child) =&gt; Text(model.welcomeMessage)
        )
      );
    }
  }
  </code></pre>
  <p>This all looks like a fairly standard Provider implementation; time to describe my issue.</p>
  <h2>Problem</h2>
  <p>I have a class called <code>Caching</code> that handles the caching of API requests. When a change is made to a resource (e.g. Transactions), I'd like to trigger a refresh of all my viewmodels so the UI displays the updated data.</p>
  <p>How can I access the ViewModels from within my Caching class to trigger the update?</p>