title: Flutter redux: How to clear state on logout in and reinitialise on login
body: <p>I am new to flutter and have implemented the redux development pattern in the mobile application. On logout I wish to clear the state of the flutter app. Else if Participant 1 logs in and Participant 2 logs in Participant 2 views the data of Participant 1 as the data is cached. So once Participant 1 logs in the state of the app should be reinitialised. 
  I have three state objects 
  1. Authstate
  2. UIState </p>
  
  <p>I am current doing this in app_reducer.dart</p>
  
  <pre><code>if(action is UserLogout) { return AppState().rebuild((b) =&gt; b.authState.replace(state.authState)); } 
  </code></pre>
  
  <p>My logout action is UserLogout and Login is UserLogin.</p>