title: Flutter best architecture patterns
body: <p>I came from MVC and VIPER world and now I am new to Flutter cross-platform development. I really like declarative things it brings (like SwiftUI for example does as well). I see a lot of advantages in React architecture that Flutter uses to update UI with the most recent data. Though I still try to understand a conception of widgets. In my head, a word widget is more about UI things, but the documentation says that all in Flutter is a widget.</p>
  <p>Let me highlight a simple example. Also, let's forget about declarative UI things.</p>
  <p>In the iOS world using Objective-C or Swift, we usually separate a lot of layers such as data layer, UI layer, service layer, some helper layers and etc.</p>
  <p>As you may notice we can't simply call these layers widgets, but looks like flutter can, but I may be wrong.</p>
  <p>In the iOS world, I would like to use VIPER or some similar architecture pattern to separate different layers or add some services which request some data for me or do save it into the database.</p>
  <p>What are the similar approaches or architecture patterns which I can use to follow best practice recommendations to achieve the best result, because as for me if we call some service which saves data to the database as a widget it's a bit strange. I would like to call it more service rather than a widget.</p>
  <p>Do I need to write a widget for all such things? Or did I get it wrong?</p>