title: How switch from GridView to ListView on click of a button in flutter?
body: <p>I am building a wallpaper app and want to implement a feature of switching views, like switching from <code>GridView</code> to <code>ListView</code> on the press of an <code>IconButton</code> in FLutter </p>
  
  <p>would look something like this: </p>
  
  <p>The only way I could think of implementing this feature is by changing the <code>crossAxisCount</code> value in the <code>GridView.count()</code> method by hooking up a counter to the <code>crossAxisCount</code> property and controlling it through a function on click of an <code>IconButton</code>, this works but I have to Hot Reload my application every time the counter is incremented or decremented, </p>
  
  <p>Any Suggestions or fix to this problem is welcomed.</p>