{"id":735,"date":"2021-04-21T14:04:22","date_gmt":"2021-04-21T14:04:22","guid":{"rendered":"https:\/\/wp.mobilist.com.tr\/?p=735"},"modified":"2024-03-22T09:52:44","modified_gmt":"2024-03-22T09:52:44","slug":"flutterda-state-yonetimi-yaklasimlari","status":"publish","type":"post","link":"https:\/\/mobilist.com.tr\/en\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/","title":{"rendered":"State Management Approaches in Flutter"},"content":{"rendered":"<p><em>26\/05\/2021 9:53<\/em><\/p>\n\n\n\n<p>Bartu Kaan Pideci, Mobilist<\/p>\n\n\n\n<p><strong>Flutter<\/strong>&nbsp;Undoubtedly, one of the most important issues when developing applications with&nbsp;<strong>state administration<\/strong>is. There are many state management approaches that Flutter recommends on its official website.<\/p>\n\n\n\n<p>Some of those&nbsp;<strong>setState<\/strong>,&nbsp;<strong>Provider<\/strong>,&nbsp;<strong>bloc<\/strong>,&nbsp;<strong>Mobx<\/strong>,&nbsp;<strong>getx<\/strong>,&nbsp;<strong>GetIt&nbsp;<\/strong>such approaches. In this series, we will take a look at these approaches with different usage methods.<\/p>\n\n\n\n<p>Flutter&#039;s famous\u00a0<strong>counter\u00a0<\/strong>Everyone knows the (counter) application. To briefly remind you, the first thing we encounter when we create and compile a Flutter project is Flutter.\u00a0<strong>low level<\/strong>\u00a0sees it as an approach\u00a0<strong>setState\u00a0<\/strong>It is an example counter application developed with this approach.<\/p>\n\n\n\n\n\n<p>This counter app&nbsp;<strong>different state management approaches<\/strong>&nbsp;We will develop and examine the differences between them and try to talk about the benefits of these approaches.<\/p>\n\n\n\n<p>Firstly,&nbsp;<strong>setState&nbsp;<\/strong>approach&nbsp;<strong>most popular state management<\/strong>&nbsp;one of the approaches&nbsp;<strong>Provider&nbsp;<\/strong>We will compare it with the package.<\/p>\n\n\n\n<p><strong>setState vs Provider<\/strong><\/p>\n\n\n\n<p>Firstly&nbsp;<strong>setState&nbsp;<\/strong>Let&#039;s examine the approach.<br><strong>setState&nbsp;<\/strong>method only<strong>&nbsp;Stateful Widget<\/strong>It is a concept used in &#039;s.class MyHomePage extends StatefulWidget {<br>@override<br>_MyHomePageState createState() =&gt; _MyHomePageState();<br>}<\/p>\n\n\n\n<p>class _MyHomePageState extends State {<br>int _counter = 0;<\/p>\n\n\n\n<p>void _incrementCounter() {<br>setState(() {<br>_counter++;<br>});<br>}@override<br>Widget build(BuildContext context) {<br><strong>return <\/strong>scaffold(<br>appBar: AppBar(<br>title: Text(widget.title),<br>),<br>body: Center(<br>child: Column(<br>mainAxisAlignment: MainAxisAlignment.center,<br>children: [<br>Text(<br>&#039;You have pushed the button this many times:&#039;,<br>),<br>Text(<br>&#039;$_counter&#039;,<br>style: Theme.<em>Ugh<\/em>(context).textTheme.headline4,<br>),<br>],<br>),<br>),<br>floatingActionButton: FloatingActionButton(<br>onPressed: _incrementCounter,<br>tooltip: &#039;Increment&#039;,<br>child: Icon(Icons.<em>add<\/em>),<br>),<br>);<br>}<br>}<\/p>\n\n\n\n<p>As seen in the example _<strong>counter&nbsp;<\/strong>value of variable _<strong>incrementCounter()<\/strong>&nbsp;increases within the method and&nbsp;<strong>setSate&nbsp;<\/strong>change thanks to the method&nbsp;<strong>WidgetTree<\/strong>We report to our.void _incrementCounter() {<br>setState(() {<br>_counter++;<br>});<br>}<\/p>\n\n\n\n<p><strong>Floating Action Button<\/strong>&#039;of&nbsp;<strong>onPressed&nbsp;<\/strong>in its property&nbsp;<strong>_incrementCounter&nbsp;<\/strong>method is being called. So the button<strong>&nbsp;every time we click<\/strong>&nbsp;<strong>setState&nbsp;<\/strong>method is called.&nbsp;<strong>setState&nbsp;<\/strong>The class in which the method is called&nbsp;<strong>build method<\/strong>&nbsp;triggers and appears on the application screen of our widget tree.&nbsp;<strong>rebuild&nbsp;<\/strong>It means&nbsp;<em>And while this may be costly in terms of processing power, it is also not an approach we want in terms of state management.<\/em>floatingActionButton: FloatingActionButton(<br>onPressed: _incrementCounter,<br>tooltip: &#039;Increment&#039;,<br>child: Icon(Icons.<em>add<\/em>),<br>),<br>);<\/p>\n\n\n\n<p>Instead of redrawing the entire widget tree just&nbsp;<strong>_counter<\/strong>&nbsp;holding variable&nbsp;<strong>text widget<\/strong>Informing about this change&nbsp;<strong>Only&nbsp;<\/strong>A much more convenient and correct approach would be to redraw this widget.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>So how?<\/strong><\/h3>\n\n\n\n<p>The Provider package is a good approach that can help us at this point.<\/p>\n\n\n\n<p>First, install the Provider package&nbsp;<strong>pubspec.yaml&nbsp;<\/strong>in our file&nbsp;<strong>dependencies&nbsp;<\/strong>We add it to the field dependencies:<br>flutter:<br>sdk:flutter<br>provider: ^4.3.3<\/p>\n\n\n\n<p><strong>ChangeNotifier<\/strong><br><strong>ChangeNotifier&nbsp;<\/strong>It is available in Flutter SDK and provides its listeners (<strong>listeners<\/strong>) change notification (<strong>change notification<\/strong>) is a simple class that provides In other words, if something is a&nbsp;<strong>ChangeNotifier&nbsp;<\/strong>, subscribe to its changes (<strong>subscribe<\/strong>) you can be. Provider also&nbsp;<strong>ChangeNotifier&nbsp;<\/strong>APPLICATION&nbsp;<strong>its state<\/strong>&nbsp;<strong>encapsulation&nbsp;<\/strong>It is a way.<br>In our counter application example, a&nbsp;<strong>ChangeNotifier<\/strong>in&nbsp;<strong>counter&nbsp;<\/strong>of variable&nbsp;<strong>manage your state<\/strong>&nbsp;we want. This way it&nbsp;<strong>extend&nbsp;<\/strong>We create a new class that says:class Counter extends ChangeNotifier{<br>int counter = 0;<\/p>\n\n\n\n<p>void increment(){<br>counter++;<br>notifyListeners();<br>}<br>}<\/p>\n\n\n\n<p>Yes&nbsp;<strong>counter&nbsp;<\/strong>Our class is ready, now we add this class to our widget tree.&nbsp;<strong>ChangeNotifierProvider<\/strong>&nbsp;with&nbsp;<strong>inject&nbsp;<\/strong>Let&#039;s.<\/p>\n\n\n\n<p><strong>Change Notifier Provider<br>ChangeNotifierProvider<\/strong>, to his descendants&nbsp;<strong>ChangeNotifier&nbsp;<\/strong>It is the widget that provides the instance.&nbsp;<strong>Change Notifier Provider<\/strong>We put the on widgets that need access to it. class MyApp extends StatelessWidget {<br>@override<br>Widget build(BuildContext context) {<br>return MaterialApp(<br>title: &#039;Counter Provider&#039;,<br>theme: ThemeData(<br>primarySwatch: Colors.<em>blue<\/em>,<br>),<br>home: ChangeNotifierProvider (<br>create: (_) =&gt; Counter(), child: MyHomePage()),<br>);<br>}<br>}<\/p>\n\n\n\n<p>As seen in the example&nbsp;<strong>MyHomePage()<\/strong>&nbsp;widget&nbsp;<strong>ChangeNotifierProvider<\/strong>&nbsp;wrapping with class&nbsp;<strong>counter&nbsp;<\/strong>class to our tree&nbsp;<strong>inject&nbsp;<\/strong>we did.<\/p>\n\n\n\n<p>Now,&nbsp;<strong>MyHomePage&nbsp;<\/strong>in&nbsp;<strong>counter&nbsp;<\/strong>your class&nbsp;<strong>to variables&nbsp;<\/strong>and&nbsp;<strong>to the methods&nbsp;<\/strong>We have the opportunity to access.class MyHomePage extends StatelessWidget {<br>@override<br>Widget build(BuildContext context) {<br>return Scaffold(<br>appBar: AppBar(<br>title: Text(&#039;Counter App with Provider&#039;),<br>),<br>body: Center(<br>child: Consumer (<br>builder: (context, counter, child) {<br>return Text(counter.counter.toString(),<br>style: Theme.<em>Ugh<\/em>(context).textTheme.headline4);<br>},<br>),<br>),<br>floatingActionButton: FloatingActionButton(<br>onPressed: () {<br>var counter = context.read ();<br>counter.increment();<br>},<br>tooltip: &#039;Increment&#039;,<br>child: Icon(Icons.<em>add<\/em>),<br>),<br>);<br>}<br>}<\/p>\n\n\n\n<p>Here&nbsp;<strong>consumer&nbsp;<\/strong>that we wrap with&nbsp;<strong>counter&nbsp;<\/strong>holding variable&nbsp;<strong>&#039;Text Widget&#039;<\/strong>We see ours.&nbsp;<strong>consumer&nbsp;<\/strong>what we want to access while using&nbsp;<strong>type of model<\/strong>&nbsp;We should point out.<\/p>\n\n\n\n<p>In this situation&nbsp;<strong>counter&nbsp;<\/strong>we want; For this reason&nbsp;<strong>consumer<\/strong>&nbsp;We write. If&nbsp;<strong>counter<\/strong>If we do not specify ,&nbsp;<strong>Provider&nbsp;<\/strong>The package cannot help us. Provider,&nbsp;<strong>depends on species&nbsp;<\/strong>and without the species it cannot know what we want.<\/p>\n\n\n\n<p><strong>Consumer Widget&nbsp;<\/strong>placing it as deep into our widget tree as possible&nbsp;<strong>is the best method<\/strong>&nbsp;(best practice).&nbsp;<em>Instead of rebuilding a large part of the UI&nbsp;<\/em><strong><em>only changing the relevant widget&nbsp;<\/em><\/strong><em>provides.<\/em><\/p>\n\n\n\n<p><strong>setState&nbsp;<\/strong>From the sample counter application developed with&nbsp;<strong>different&nbsp;<\/strong>aspect<strong>&nbsp;stateless widget&nbsp;<\/strong>we used and&nbsp;<strong>counter&nbsp;<\/strong>containing the variable&nbsp;<strong>text widget<\/strong>of&nbsp;<strong>consumer&nbsp;<\/strong>with&nbsp;<strong>we wrapped&nbsp;<\/strong>and on change, that is, instead of redrawing our entire widget tree every time the button is clicked,&nbsp;<strong>Text Widget<\/strong>&nbsp;We ensured that it was recreated.var providerCounter = context.read ();<br>providerCounter.increment();<\/p>\n\n\n\n<p>This time&nbsp;<strong>&#039;onPressed property&#039;<\/strong>one in&nbsp;<strong>providerCounter&nbsp;<\/strong>We defined the variable and created the one we created above.&nbsp;<strong>counter&nbsp;<\/strong>class&nbsp;<strong>read&nbsp;<\/strong>contained in&nbsp;<strong>incerement()<\/strong>&nbsp;We have reached our method.<\/p>\n\n\n\n<p>If your goal is just&nbsp;<strong>a simple counter<\/strong>&nbsp;<strong>application<\/strong>&nbsp;Doing is a usage as in Flutter&#039;s demo example.&nbsp;<strong>meet your needs<\/strong>&nbsp;may be suitable for this.<\/p>\n\n\n\n<p>However, the work is more&nbsp;<strong>complicated<\/strong>&nbsp;and&nbsp;<strong>to big projects<\/strong>&nbsp;When it comes to this kind of approach&nbsp;<strong>performance<\/strong>&nbsp;While it will cause losses, it also brings with it various problems.<\/p>\n\n\n\n<p>And finally, we should point out that&nbsp;<strong>best state management method<\/strong>&nbsp;There is no such thing.<\/p>\n\n\n\n<p>It can be selected according to the project needs and the competencies of the people who will work on the project.&nbsp;<strong>optimum&nbsp;<\/strong>There is a solution. We can&#039;t say either one is better than the other. Each of them becomes important in meeting our needs in our project. In short, the most accurate method is&nbsp;<strong>It is the method that best suits the team and the project.<\/strong><\/p>\n\n\n\n<p>In this article, I will tell you about various usage methods.&nbsp;<strong>From Provider package and setState<\/strong>&nbsp;Differences between method and<strong>&nbsp;<\/strong>I tried to talk about it briefly.<\/p>\n\n\n\n<p>In the continuation of this series, the other&nbsp;<strong>state management methods<\/strong>&nbsp;I will try to explain.<\/p>\n\n\n\n<p>See you in my next articles\u2026<\/p>","protected":false},"excerpt":{"rendered":"26\/05\/2021 9:53 Bartu Kaan Pideci, Mobilist While developing applications with Flutter, undoubtedly one of the most important issues is state management. There are many state management approaches that Flutter recommends on its official website. Some of these are approaches such as setState, Provider, Bloc, Mobx, Getx, GetIt. In this series, we will take a look at these approaches with different usage methods. Everyone knows Flutter&#039;s famous counter application. To briefly remind you, create a flutter project and [\u2026]","protected":false},"author":4,"featured_media":736,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"saved_in_kubio":false,"footnotes":""},"categories":[53,54,55,56],"tags":[61,58,62,60,59],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v22.8) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Flutter\u2019da State Y\u00f6netimi Yakla\u015f\u0131mlar\u0131 - Mobilist<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mobilist.com.tr\/en\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Flutter\u2019da State Y\u00f6netimi Yakla\u015f\u0131mlar\u0131\" \/>\n<meta property=\"og:description\" content=\"26\/05\/2021 9:53 Bartu Kaan Pideci, Mobilist Flutter&nbsp;ile uygulama geli\u015ftirirken \u015f\u00fcphesiz ki en \u00f6nemli konulardan biri&nbsp;state y\u00f6netimidir. Flutter\u2019\u0131n resmi \u0130nternet sayfas\u0131nda \u00f6nerdi\u011fi bir\u00e7ok state management yakla\u015f\u0131m\u0131 vard\u0131r. Bunlardan baz\u0131lar\u0131&nbsp;setState,&nbsp;Provider,&nbsp;Bloc,&nbsp;Mobx,&nbsp;Getx,&nbsp;GetIt&nbsp;gibi yakla\u015f\u0131mlard\u0131r. Bu seride sizlerle beraber farkl\u0131 kullan\u0131m \u015fekilleri olan bu yakla\u015f\u0131mlara bir g\u00f6z ataca\u011f\u0131z. Flutter\u2019\u0131n \u015fu me\u015fhur\u00a0counter\u00a0(saya\u00e7) uygulamas\u0131n\u0131 herkes bilir. K\u0131saca hat\u0131rlatmak gerekirse, bir flutter projesi olu\u015fturup [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mobilist.com.tr\/en\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/\" \/>\n<meta property=\"og:site_name\" content=\"Mobilist\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/mobilistlabs\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-21T14:04:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-22T09:52:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mobilist.com.tr\/wp-content\/uploads\/2024\/03\/1b-4.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"574\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Mobilist\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@mobilist_labs\" \/>\n<meta name=\"twitter:site\" content=\"@mobilist_labs\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mobilist\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/\"},\"author\":{\"name\":\"Mobilist\",\"@id\":\"https:\/\/mobilist.com.tr\/tr\/#\/schema\/person\/cb960c343376e89fed720ff2fddbde20\"},\"headline\":\"Flutter\u2019da State Y\u00f6netimi Yakla\u015f\u0131mlar\u0131\",\"datePublished\":\"2021-04-21T14:04:22+00:00\",\"dateModified\":\"2024-03-22T09:52:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/\"},\"wordCount\":1332,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/mobilist.com.tr\/tr\/#organization\"},\"image\":{\"@id\":\"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mobilist.com.tr\/wp-content\/uploads\/2024\/03\/1b-4.jpeg\",\"keywords\":[\"Bloc Pattern\",\"Flutter\",\"Flutter Hooks\",\"Riverpod\",\"State Management\"],\"articleSection\":[\"Flutter Development\",\"Mobile App Development\",\"Programming Best Practices\",\"Software Architecture\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/\",\"url\":\"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/\",\"name\":\"Flutter\u2019da State Y\u00f6netimi Yakla\u015f\u0131mlar\u0131 - Mobilist\",\"isPartOf\":{\"@id\":\"https:\/\/mobilist.com.tr\/tr\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mobilist.com.tr\/wp-content\/uploads\/2024\/03\/1b-4.jpeg\",\"datePublished\":\"2021-04-21T14:04:22+00:00\",\"dateModified\":\"2024-03-22T09:52:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/#primaryimage\",\"url\":\"https:\/\/mobilist.com.tr\/wp-content\/uploads\/2024\/03\/1b-4.jpeg\",\"contentUrl\":\"https:\/\/mobilist.com.tr\/wp-content\/uploads\/2024\/03\/1b-4.jpeg\",\"width\":1024,\"height\":574},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.mobilist.com.tr\/tr\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Flutter\u2019da State Y\u00f6netimi Yakla\u015f\u0131mlar\u0131\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mobilist.com.tr\/tr\/#website\",\"url\":\"https:\/\/mobilist.com.tr\/tr\/\",\"name\":\"Mobilist\",\"description\":\"Dijitalin Kusursuz Hali\",\"publisher\":{\"@id\":\"https:\/\/mobilist.com.tr\/tr\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mobilist.com.tr\/tr\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/mobilist.com.tr\/tr\/#organization\",\"name\":\"Mobilist\",\"url\":\"https:\/\/mobilist.com.tr\/tr\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mobilist.com.tr\/tr\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/mobilist.com.tr\/wp-content\/uploads\/2024\/03\/web-logo-text-only-2.png\",\"contentUrl\":\"https:\/\/mobilist.com.tr\/wp-content\/uploads\/2024\/03\/web-logo-text-only-2.png\",\"width\":400,\"height\":78,\"caption\":\"Mobilist\"},\"image\":{\"@id\":\"https:\/\/mobilist.com.tr\/tr\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/mobilistlabs\",\"https:\/\/x.com\/mobilist_labs\",\"https:\/\/www.instagram.com\/mobilist\/\",\"https:\/\/www.linkedin.com\/company\/2498352\/admin\/feed\/posts\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/mobilist.com.tr\/tr\/#\/schema\/person\/cb960c343376e89fed720ff2fddbde20\",\"name\":\"Mobilist\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mobilist.com.tr\/tr\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/777415801de8f6bf7dcda3dca7fb6e37?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/777415801de8f6bf7dcda3dca7fb6e37?s=96&d=mm&r=g\",\"caption\":\"Mobilist\"},\"url\":\"https:\/\/mobilist.com.tr\/en\/author\/didemelerman\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Flutter\u2019da State Y\u00f6netimi Yakla\u015f\u0131mlar\u0131 - Mobilist","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mobilist.com.tr\/en\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/","og_locale":"en_US","og_type":"article","og_title":"Flutter\u2019da State Y\u00f6netimi Yakla\u015f\u0131mlar\u0131","og_description":"26\/05\/2021 9:53 Bartu Kaan Pideci, Mobilist Flutter&nbsp;ile uygulama geli\u015ftirirken \u015f\u00fcphesiz ki en \u00f6nemli konulardan biri&nbsp;state y\u00f6netimidir. Flutter\u2019\u0131n resmi \u0130nternet sayfas\u0131nda \u00f6nerdi\u011fi bir\u00e7ok state management yakla\u015f\u0131m\u0131 vard\u0131r. Bunlardan baz\u0131lar\u0131&nbsp;setState,&nbsp;Provider,&nbsp;Bloc,&nbsp;Mobx,&nbsp;Getx,&nbsp;GetIt&nbsp;gibi yakla\u015f\u0131mlard\u0131r. Bu seride sizlerle beraber farkl\u0131 kullan\u0131m \u015fekilleri olan bu yakla\u015f\u0131mlara bir g\u00f6z ataca\u011f\u0131z. Flutter\u2019\u0131n \u015fu me\u015fhur\u00a0counter\u00a0(saya\u00e7) uygulamas\u0131n\u0131 herkes bilir. K\u0131saca hat\u0131rlatmak gerekirse, bir flutter projesi olu\u015fturup [&hellip;]","og_url":"https:\/\/mobilist.com.tr\/en\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/","og_site_name":"Mobilist","article_publisher":"https:\/\/www.facebook.com\/mobilistlabs","article_published_time":"2021-04-21T14:04:22+00:00","article_modified_time":"2024-03-22T09:52:44+00:00","og_image":[{"width":1024,"height":574,"url":"https:\/\/mobilist.com.tr\/wp-content\/uploads\/2024\/03\/1b-4.jpeg","type":"image\/jpeg"}],"author":"Mobilist","twitter_card":"summary_large_image","twitter_creator":"@mobilist_labs","twitter_site":"@mobilist_labs","twitter_misc":{"Written by":"Mobilist","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/#article","isPartOf":{"@id":"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/"},"author":{"name":"Mobilist","@id":"https:\/\/mobilist.com.tr\/tr\/#\/schema\/person\/cb960c343376e89fed720ff2fddbde20"},"headline":"Flutter\u2019da State Y\u00f6netimi Yakla\u015f\u0131mlar\u0131","datePublished":"2021-04-21T14:04:22+00:00","dateModified":"2024-03-22T09:52:44+00:00","mainEntityOfPage":{"@id":"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/"},"wordCount":1332,"commentCount":0,"publisher":{"@id":"https:\/\/mobilist.com.tr\/tr\/#organization"},"image":{"@id":"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/#primaryimage"},"thumbnailUrl":"https:\/\/mobilist.com.tr\/wp-content\/uploads\/2024\/03\/1b-4.jpeg","keywords":["Bloc Pattern","Flutter","Flutter Hooks","Riverpod","State Management"],"articleSection":["Flutter Development","Mobile App Development","Programming Best Practices","Software Architecture"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/","url":"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/","name":"Flutter\u2019da State Y\u00f6netimi Yakla\u015f\u0131mlar\u0131 - Mobilist","isPartOf":{"@id":"https:\/\/mobilist.com.tr\/tr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/#primaryimage"},"image":{"@id":"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/#primaryimage"},"thumbnailUrl":"https:\/\/mobilist.com.tr\/wp-content\/uploads\/2024\/03\/1b-4.jpeg","datePublished":"2021-04-21T14:04:22+00:00","dateModified":"2024-03-22T09:52:44+00:00","breadcrumb":{"@id":"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/#primaryimage","url":"https:\/\/mobilist.com.tr\/wp-content\/uploads\/2024\/03\/1b-4.jpeg","contentUrl":"https:\/\/mobilist.com.tr\/wp-content\/uploads\/2024\/03\/1b-4.jpeg","width":1024,"height":574},{"@type":"BreadcrumbList","@id":"https:\/\/mobilist.com.tr\/tr\/2021\/04\/21\/flutterda-state-yonetimi-yaklasimlari\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.mobilist.com.tr\/tr\/"},{"@type":"ListItem","position":2,"name":"Flutter\u2019da State Y\u00f6netimi Yakla\u015f\u0131mlar\u0131"}]},{"@type":"WebSite","@id":"https:\/\/mobilist.com.tr\/tr\/#website","url":"https:\/\/mobilist.com.tr\/tr\/","name":"Mobilist","description":"Dijitalin Kusursuz Hali","publisher":{"@id":"https:\/\/mobilist.com.tr\/tr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mobilist.com.tr\/tr\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/mobilist.com.tr\/tr\/#organization","name":"Mobilist","url":"https:\/\/mobilist.com.tr\/tr\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mobilist.com.tr\/tr\/#\/schema\/logo\/image\/","url":"https:\/\/mobilist.com.tr\/wp-content\/uploads\/2024\/03\/web-logo-text-only-2.png","contentUrl":"https:\/\/mobilist.com.tr\/wp-content\/uploads\/2024\/03\/web-logo-text-only-2.png","width":400,"height":78,"caption":"Mobilist"},"image":{"@id":"https:\/\/mobilist.com.tr\/tr\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/mobilistlabs","https:\/\/x.com\/mobilist_labs","https:\/\/www.instagram.com\/mobilist\/","https:\/\/www.linkedin.com\/company\/2498352\/admin\/feed\/posts\/"]},{"@type":"Person","@id":"https:\/\/mobilist.com.tr\/tr\/#\/schema\/person\/cb960c343376e89fed720ff2fddbde20","name":"Mobilist","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mobilist.com.tr\/tr\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/777415801de8f6bf7dcda3dca7fb6e37?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/777415801de8f6bf7dcda3dca7fb6e37?s=96&d=mm&r=g","caption":"Mobilist"},"url":"https:\/\/mobilist.com.tr\/en\/author\/didemelerman\/"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/mobilist.com.tr\/wp-content\/uploads\/2024\/03\/1b-4.jpeg","_links":{"self":[{"href":"https:\/\/mobilist.com.tr\/en\/wp-json\/wp\/v2\/posts\/735"}],"collection":[{"href":"https:\/\/mobilist.com.tr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mobilist.com.tr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mobilist.com.tr\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/mobilist.com.tr\/en\/wp-json\/wp\/v2\/comments?post=735"}],"version-history":[{"count":1,"href":"https:\/\/mobilist.com.tr\/en\/wp-json\/wp\/v2\/posts\/735\/revisions"}],"predecessor-version":[{"id":738,"href":"https:\/\/mobilist.com.tr\/en\/wp-json\/wp\/v2\/posts\/735\/revisions\/738"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mobilist.com.tr\/en\/wp-json\/wp\/v2\/media\/736"}],"wp:attachment":[{"href":"https:\/\/mobilist.com.tr\/en\/wp-json\/wp\/v2\/media?parent=735"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mobilist.com.tr\/en\/wp-json\/wp\/v2\/categories?post=735"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mobilist.com.tr\/en\/wp-json\/wp\/v2\/tags?post=735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}