Gizem Malçok

Turkish documentation of the State Management file has been prepared.

1 * [State Management(Durum Yönetimi)](#state-management) 1 * [State Management(Durum Yönetimi)](#state-management)
2 - + [Reactive State Manager](#reactive-state-manager)  
3 - - [Advantages](#advantages)  
4 - - [Maximum performance:](#maximum-performance)  
5 - - [Declaring a reactive variable](#declaring-a-reactive-variable)  
6 - - [Having a reactive state, is easy.](#having-a-reactive-state-is-easy)  
7 - - [Using the values in the view](#using-the-values-in-the-view)  
8 - - [Conditions to rebuild](#conditions-to-rebuild)  
9 - - [Where .obs can be used](#where-obs-can-be-used)  
10 - - [Note about Lists](#note-about-lists)  
11 - - [Why i have to use .value](#why-i-have-to-use-value) 2 + + [Reactive State Manager (Reaktif Durum Yöneticisi)](#reactive-state-manager)
  3 + - [Advantages(Avantajlar)](#advantages)
  4 + - [Maksimum Performans:](#maximum-performance)
  5 + - [Reaktif bir değişken bildirmek](#declaring-a-reactive-variable)
  6 + - [Reaktif bir duruma sahip olmak kolaydır.](#having-a-reactive-state-is-easy)
  7 + - [Görünümdeki değerleri kullanmak](#using-the-values-in-the-view)
  8 + - [Yeniden oluşturulacak koşullar](#conditions-to-rebuild)
  9 + - [Nerede .obs kullanılabilir](#where-obs-can-be-used)
  10 + - [Listeler hakkında not](#note-about-lists)
  11 + - [Neden .value kullanmak zorundayım?](#why-i-have-to-use-value)
12 - [Obx()](#obx) 12 - [Obx()](#obx)
13 - - [Workers](#workers)  
14 - + [Simple State Manager](#simple-state-manager)  
15 - - [Advantages](#advantages-1)  
16 - - [Usage](#usage)  
17 - - [How it handles controllers](#how-it-handles-controllers)  
18 - - [You won't need StatefulWidgets anymore](#you-wont-need-statefulwidgets-anymore)  
19 - - [Why it exists](#why-it-exists)  
20 - - [Other ways of using it](#other-ways-of-using-it)  
21 - - [Unique IDs](#unique-ids)  
22 - + [Mixing the two state managers](#mixing-the-two-state-managers) 13 + - [Çalışanlar](#workers)
  14 + + [Simple State Manager (Basit Durum Yöneticisi)](#simple-state-manager)
  15 + - [Avantajlar](#advantages-1)
  16 + - [Kullanımı](#usage)
  17 + - [Controller'lar nasıl çalışır](#how-it-handles-controllers)
  18 + - [Artık StatefulWidget'lara ihtiyacınız olmayacak](#you-wont-need-statefulwidgets-anymore)
  19 + - [Neden var](#why-it-exists)
  20 + - [Kullanmanın diğer yolları](#other-ways-of-using-it)
  21 + - [Unique IDs (Benzersiz Kimlikler)](#unique-ids)
  22 + + [İki state managers ile Mixing](#mixing-the-two-state-managers)
23 + [GetBuilder vs GetX vs Obx vs MixinBuilder](#getbuilder-vs-getx-vs-obx-vs-mixinbuilder) 23 + [GetBuilder vs GetX vs Obx vs MixinBuilder](#getbuilder-vs-getx-vs-obx-vs-mixinbuilder)
24 24
25 # State Management (Durum Yönetimi) 25 # State Management (Durum Yönetimi)
@@ -40,7 +40,7 @@ GetX ile iç içe geçmiş widget'lara bile saygı duyulur. Obx listview'inizi i @@ -40,7 +40,7 @@ GetX ile iç içe geçmiş widget'lara bile saygı duyulur. Obx listview'inizi i
40 40
41 Mevcut state management'lerin(durum yöneticilerin) çoğu (hepsi değilse de) ekranda yeniden oluşturulur. 41 Mevcut state management'lerin(durum yöneticilerin) çoğu (hepsi değilse de) ekranda yeniden oluşturulur.
42 42
43 -## Reactive State Manager 43 +## Reactive State Manager (Reaktif Durum Yöneticisi)
44 44
45 Reaktif programlama birçok insanı yabancılaştırabilir çünkü karmaşık olduğu söylenir. GetX reaktif programlamayı oldukça basit bir şeye dönüştürür: 45 Reaktif programlama birçok insanı yabancılaştırabilir çünkü karmaşık olduğu söylenir. GetX reaktif programlamayı oldukça basit bir şeye dönüştürür:
46 46
@@ -206,7 +206,7 @@ Bildiğimiz gibi, _Dart_ şimdi _null safety_ doğru gidiyor. @@ -206,7 +206,7 @@ Bildiğimiz gibi, _Dart_ şimdi _null safety_ doğru gidiyor.
206 Kelimenin tam anlamıyla bir değişkeninizin sonuna bir " `.obs` " ekleyeceksiniz, ve **bu kadar**, şimdi onu gözlemlenebilir hale getirdiniz, 206 Kelimenin tam anlamıyla bir değişkeninizin sonuna bir " `.obs` " ekleyeceksiniz, ve **bu kadar**, şimdi onu gözlemlenebilir hale getirdiniz,
207 ve onun `.value(değer)`'i, _initial value_ olacaktır). 207 ve onun `.value(değer)`'i, _initial value_ olacaktır).
208 208
209 -### Görünümdeki değerleri kullanma 209 +### Görünümdeki değerleri kullanmak
210 210
211 ``` dart 211 ``` dart
212 // controller dosyası 212 // controller dosyası
@@ -489,7 +489,7 @@ Bu şekilde, tek bir controller'a ihtiyacınız varsa, bunun için ID'ler atayab @@ -489,7 +489,7 @@ Bu şekilde, tek bir controller'a ihtiyacınız varsa, bunun için ID'ler atayab
489 489
490 9. Get her şeyi bilir ve çoğu durumda bir denetleyiciyi bellekten çıkarma zamanını tam olarak bilir. Bir denetleyiciyi ne zaman elden çıkaracağınız konusunda endişelenmemelisiniz, Bunu yapmak için en iyi zamanı öğrenin. 490 9. Get her şeyi bilir ve çoğu durumda bir denetleyiciyi bellekten çıkarma zamanını tam olarak bilir. Bir denetleyiciyi ne zaman elden çıkaracağınız konusunda endişelenmemelisiniz, Bunu yapmak için en iyi zamanı öğrenin.
491 491
492 -### Usage 492 +### Kullanımı
493 493
494 ``` dart 494 ``` dart
495 // Controller sınıfı oluşturun ve GetxController'ı extends edin 495 // Controller sınıfı oluşturun ve GetxController'ı extends edin
@@ -510,13 +510,13 @@ GetBuilder<Controller>( @@ -510,13 +510,13 @@ GetBuilder<Controller>(
510 //Initialize your controller only the first time. The second time you are using ReBuilder for the same controller, do not use it again. Your controller will be automatically removed from memory as soon as the widget that marked it as 'init' is deployed. You don't have to worry about that, Get will do it automatically, just make sure you don't start the same controller twice. 510 //Initialize your controller only the first time. The second time you are using ReBuilder for the same controller, do not use it again. Your controller will be automatically removed from memory as soon as the widget that marked it as 'init' is deployed. You don't have to worry about that, Get will do it automatically, just make sure you don't start the same controller twice.
511 ``` 511 ```
512 512
513 -**Done!** 513 +**Tamamlandı!**
514 514
515 -* You have already learned how to manage states with Get. 515 +* Get ile durumları nasıl yöneteceğinizi öğrendiniz.
516 516
517 -* Note: You may want a larger organization, and not use the init property. For that, you can create a class and extends Bindings class, and within it mention the controllers that will be created within that route. Controllers will not be created at that time, on the contrary, this is just a statement, so that the first time you use a Controller, Get will know where to look. Get will remain lazyLoad, and will continue to dispose Controllers when they are no longer needed. See the pub.dev example to see how it works. 517 +* Not: Daha büyük bir organizasyon isteyebilirsiniz ve init özelliğini kullanmayabilirsiniz. Bunun için bir sınıf oluşturup Bindings sınıfını extends edebilir ve bunun içinde o rotada oluşturulacak controller'dan bahsedebilirsiniz. Controller'lar o anda oluşturulmaz, tam tersine, bu sadece bir ifadedir, böylece bir Controller'ı ilk kullandığınızda, nereye bakacağınızı bilecek. Get lazyLoad olarak kalacak ve artık ihtiyaç duyulmadığında Controller'ları elden çıkarmaya devam edecek. Nasıl çalıştığını görmek için pub.dev örneğine bakın.
518 518
519 -If you navigate many routes and need data that was in your previously used controller, you just need to use GetBuilder Again (with no init): 519 +Birçok rotada gezinirseniz ve daha önce kullandığınız controller'ınızda bulunan verilere ihtiyacınız varsa, GetBuilder tekrar (init olmadan) kullanmanız yeterlidir:
520 520
521 ``` dart 521 ``` dart
522 class OtherClass extends StatelessWidget { 522 class OtherClass extends StatelessWidget {
@@ -533,16 +533,16 @@ class OtherClass extends StatelessWidget { @@ -533,16 +533,16 @@ class OtherClass extends StatelessWidget {
533 533
534 ``` 534 ```
535 535
536 -If you need to use your controller in many other places, and outside of GetBuilder, just create a get in your controller and have it easily. (or use `Get.find<Controller>()` ) 536 +Controller'ınızı GetBuilder dışında birçok başka yerde kullanmanız gerekiyorsa, controller'ınıza bir get oluşturun ve kolayca elde edin. (veya `Get.find<Controller>()` kullanın)
537 537
538 ``` dart 538 ``` dart
539 class Controller extends GetxController { 539 class Controller extends GetxController {
540 540
541 - /// You do not need that. I recommend using it just for ease of syntax.  
542 - /// with static method: Controller.to.increment();  
543 - /// with no static method: Get.find<Controller>().increment();  
544 - /// There is no difference in performance, nor any side effect of using either syntax. Only one does not need the type, and the other the IDE will autocomplete it.  
545 - static Controller get to => Get.find(); // add this line 541 + /// Buna ihtiyacın yok. Sadece syntax kolaylığı için kullanmanızı öneririm.
  542 + /// statik yöntemle: Controller.to.increment();
  543 + /// statik yöntem olmadan: Get.find<Controller>().increment();
  544 + /// Her iki syntax kullanmanın herhangi bir yan etkisi veya performans farkı yoktur. Yalnızca birinin türe ihtiyacı yoktur ve diğeri IDE tarafından otomatik olarak tamamlanır.
  545 + static Controller get to => Get.find(); // bu satırı ekleyin
546 546
547 int counter = 0; 547 int counter = 0;
548 void increment() { 548 void increment() {
@@ -552,35 +552,33 @@ class Controller extends GetxController { @@ -552,35 +552,33 @@ class Controller extends GetxController {
552 } 552 }
553 ``` 553 ```
554 554
555 -And then you can access your controller directly, that way: 555 +Ve sonra controller'a doğrudan bu şekilde erişebilirsiniz:
556 556
557 ``` dart 557 ``` dart
558 FloatingActionButton( 558 FloatingActionButton(
559 onPressed: () { 559 onPressed: () {
560 Controller.to.increment(), 560 Controller.to.increment(),
561 - } // This is incredibly simple! 561 + } // Bu inanılmaz derecede basit!
562 child: Text("${Controller.to.counter}"), 562 child: Text("${Controller.to.counter}"),
563 ), 563 ),
564 ``` 564 ```
565 565
566 -When you press FloatingActionButton, all widgets that are listening to the 'counter' variable will be updated automatically. 566 +FloatingActionButton tuşuna bastığınızda, 'counter' değişkenini dinleyen tüm widget'lar otomatik olarak güncellenir.
567 567
568 -### How it handles controllers 568 +### Controller'lar nasıl çalışır
569 569
570 -Let's say we have this: 570 +Diyelim ki elimizde bu var:
571 571
572 `Class a => Class B (has controller X) => Class C (has controller X)` 572 `Class a => Class B (has controller X) => Class C (has controller X)`
573 573
574 -In class A the controller is not yet in memory, because you have not used it yet (Get is lazyLoad). In class B you used the controller, and it entered memory. In class C you used the same controller as in class B, Get will share the state of controller B with controller C, and the same controller is still in memory. If you close screen C and screen B, Get will automatically take controller X out of memory and free up resources, because Class a is not using the controller. If you navigate to B again, controller X will enter memory again, if instead of going to class C, you return to class A again, Get will take the controller out of memory in the same way. If class C didn't use the controller, and you took class B out of memory, no class would be using controller X and likewise it would be disposed of. The only exception that can mess with Get, is if you remove B from the route unexpectedly, and try to use the controller in C. In this case, the creator ID of the controller that was in B was deleted, and Get was programmed to remove it from memory every controller that has no creator ID. If you intend to do this, add the "autoRemove: false" flag to class B's GetBuilder and use adoptID = true; in class C's GetBuilder. 574 +A sınıfında controller henüz bellekte değil çünkü henüz kullanmadınız (Get is lazyLoad). B sınıfında controller kullandınız ve belleğe girdi. C sınıfında, B sınıfındakiyle aynı controller'ı kullandınız, Get, controller B'nin durumunu C controller'ı ile paylaşacak ve aynı controller hala bellekte kalacaktır. C ekranını ve B ekranını kapatırsanız, Get, A Sınıfı controller'ı kullanmadığından otomatik olarak X controller'ını bellekten alır ve kaynakları boşaltır. Tekrar B'ye giderseniz, X controller'ı tekrar belleğe girer, C sınıfına gitmek yerine tekrar A sınıfına dönerseniz Get, controller aynı şekilde bellekten çıkarır. C sınıfı controller'ı kullanmadıysa ve B sınıfını bellekten çıkardıysanız, hiçbir sınıf controller'ı X kullanmayacak ve aynı şekilde imha edilecektir. Get ile bulaşabilecek tek istisna, B'yi rotadan beklenmedik bir şekilde kaldırırsanız ve controller'ı C'de kullanmaya çalışırsanız. Bu durumda, controller'ın B'deki ID silindi ve Get şu şekilde programlandı: ID olmayan her controller'ı bellekten kaldırın. Bunu yapmayı düşünüyorsanız, "autoRemove: false" işaretini B sınıfının GetBuilder'ına ekleyin ve adoptID = true; yapın C sınıfında GetBuilder kullanın.
575 575
576 -### You won't need StatefulWidgets anymore 576 +### Artık StatefulWidget'lara ihtiyacınız olmayacak
577 577
578 -Using StatefulWidgets means storing the state of entire screens unnecessarily, even because if you need to minimally rebuild a widget, you will embed it in a Consumer/Observer/BlocProvider/GetBuilder/GetX/Obx, which will be another StatefulWidget.  
579 -The StatefulWidget class is a class larger than StatelessWidget, which will allocate more RAM, and this may not make a significant difference between one or two classes, but it will most certainly do when you have 100 of them!  
580 -Unless you need to use a mixin, like TickerProviderStateMixin, it will be totally unnecessary to use a StatefulWidget with Get. 578 +Stateful Widget kullanmak, tüm ekranların durumunu gereksiz yere depolamak anlamına gelir, çünkü bir widget'ı minimum düzeyde yeniden oluşturmanız gerekse bile, onu başka bir Stateful Widget olacak olan bir Consumer/Observer/BlocProvider/GetBuilder/GetX/Obx içine gömeceksiniz. StatefulWidget sınıfı, daha fazla RAM tahsis edecek olan StatelessWidget'ten daha büyük bir sınıftır ve bu, bir veya iki sınıf arasında önemli bir fark yaratmayabilir, ancak 100 tanesine sahip olduğunuzda kesinlikle yapacaktır! TickerProviderStateMixin gibi bir mixin kullanmanız gerekmiyorsa, Get ile bir StatefulWidget kullanmak tamamen gereksiz olacaktır.
581 579
582 -You can call all methods of a StatefulWidget directly from a GetBuilder.  
583 -If you need to call initState() or dispose() method for example, you can call them directly; 580 +StatefulWidget'ın tüm yöntemlerini doğrudan bir GetBuilder'dan çağırabilirsiniz.
  581 +Örneğin, initState() veya Dispose() yöntemini çağırmanız gerekiyorsa, bunları doğrudan çağırabilirsiniz;
584 582
585 ``` dart 583 ``` dart
586 GetBuilder<Controller>( 584 GetBuilder<Controller>(
@@ -590,7 +588,7 @@ GetBuilder<Controller>( @@ -590,7 +588,7 @@ GetBuilder<Controller>(
590 ), 588 ),
591 ``` 589 ```
592 590
593 -A much better approach than this is to use the onInit() and onClose() method directly from your controller. 591 +Bundan çok daha iyi bir yaklaşım, doğrudan controller'dan onInit() ve onClose() yöntemini kullanmaktır.
594 592
595 ``` dart 593 ``` dart
596 @override 594 @override
@@ -600,24 +598,25 @@ void onInit() { @@ -600,24 +598,25 @@ void onInit() {
600 } 598 }
601 ``` 599 ```
602 600
603 -* NOTE: If you want to start a method at the moment the controller is called for the first time, you DON'T NEED to use constructors for this, in fact, using a performance-oriented package like Get, this borders on bad practice, because it deviates from the logic in which the controllers are created or allocated (if you create an instance of this controller, the constructor will be called immediately, you will be populating a controller before it is even used, you are allocating memory without it being in use, this definitely hurts the principles of this library). The onInit() methods; and onClose(); were created for this, they will be called when the Controller is created, or used for the first time, depending on whether you are using Get.lazyPut or not. If you want, for example, to make a call to your API to populate data, you can forget about the old-fashioned method of initState/dispose, just start your call to the api in onInit, and if you need to execute any command like closing streams, use the onClose() for that. 601 +* NOT: Controller ilk kez çağrıldığı anda bir metot başlatmak istiyorsanız, bunun için constructors kullanmanıza GEREK YOKTUR, aslında Get gibi performans odaklı bir paket kullanarak bu sorunu çözebilirsiniz. Controller'ların oluşturulduğu veya tahsis edildiği mantıktan saptığı için (bu controller'ın bir örneğini oluşturursanız, constructor hemen çağrılır, bir controller kullanılmadan önce bellek ayırırsınız ve belleği doldurursunuz. Bu kesinlikle bu kütüphanenin ilkelerine zarar verir. onInit() yöntemleri; ve onClose(); için oluşturulduysa, Get.lazyPut kullanıp kullanmadığınıza bağlı olarak Controller oluşturulduğunda veya ilk kez kullanıldığında çağrılırlar. Örneğin, verileri doldurmak için API'nize bir çağrı yapmak istiyorsanız, eski moda initState/dispose yöntemini unutabilirsiniz, sadece onInit'te api'ye çağrınızı başlatın ve herhangi bir komutu çalıştırmanız gerekirse akışları kapatmak gibi, bunun için onClose()'u kullanın.
604 602
605 -### Why it exists 603 +### Neden var
606 604
607 -The purpose of this package is precisely to give you a complete solution for navigation of routes, management of dependencies and states, using the least possible dependencies, with a high degree of decoupling. Get engages all high and low level Flutter APIs within itself, to ensure that you work with the least possible coupling. We centralize everything in a single package, to ensure that you don't have any kind of coupling in your project. That way, you can put only widgets in your view, and leave the part of your team that works with the business logic free, to work with the business logic without depending on any element of the View. This provides a much cleaner working environment, so that part of your team works only with widgets, without worrying about sending data to your controller, and part of your team works only with the business logic in its breadth, without depending on no element of the view. 605 +Bu paketin amacı, mümkün olan en az bağımlılıkları kullanarak, yüksek derecede ayrıştırma ile rotaların gezinmesi, bağımlılıkların ve durumların yönetimi için eksiksiz bir çözüm sunmaktır. Get, mümkün olan en az bağlantıyla çalıştığınızdan emin olmak için tüm yüksek ve düşük seviyeli Flutter API'lerini kendi içinde çalıştırır. Projenizde herhangi bir bağlantı olmadığından emin olmak için her şeyi tek bir pakette merkezileştiriyoruz. Bu şekilde, görünümünüze yalnızca widget'lar koyabilir ve ekibinizin iş mantığıyla çalışan bölümünü, Görünümün herhangi bir öğesine bağlı kalmadan iş mantığıyla çalışmak üzere serbest bırakabilirsiniz. Bu, çok daha temiz bir çalışma ortamı sağlar, böylece ekibinizin bir kısmı controller'a veri göndermekten endişe etmeden yalnızca widget'larla çalışır ve ekibinizin bir kısmı, görünümün hiçbir öğesine bağlı kalmadan yalnızca genişliğindeki iş mantığıyla çalışır.
608 606
609 -So to simplify this:  
610 -You don't need to call methods in initState and send them by parameter to your controller, nor use your controller constructor for that, you have the onInit() method that is called at the right time for you to start your services.  
611 -You do not need to call the device, you have the onClose() method that will be called at the exact moment when your controller is no longer needed and will be removed from memory. That way, leave views for widgets only, refrain from any kind of business logic from it. 607 +Yani bunu basitleştirirsek:
  608 +Initstate'deki yöntemleri çağırmanız ve bunları controller'ınıza parametre ile göndermeniz veya bunun için controller içerisinde constructor kullanmanız gerekmez, doğru zamanda çağrılan onInit () yöntemine sahip olursunuz.
  609 +Cihaz aramak zorunda değilsiniz, gerektiğinde tam zamanında close() yöntemi ile hafızasından silinecektir. Bu şekilde, yalnızca widget'lar için görünümler bırakın, her türlü iş mantığından kaçının.
  610 +
  611 +GetxController içinde bir dispose yöntemi çağırmayın, hiçbir şey yapmaz, controller'ın bir Widget olmadığını, "dispose" gerektiğini ve Get tarafından bellekten otomatik ve akıllıca kaldırılacağını unutmayın. Üzerinde herhangi bir akış kullandıysanız ve kapatmak istiyorsanız, onu close yöntemine eklemeniz yeterlidir. Örnek:
612 612
613 -Do not call a dispose method inside GetxController, it will not do anything, remember that the controller is not a Widget, you should not "dispose" it, and it will be automatically and intelligently removed from memory by Get. If you used any stream on it and want to close it, just insert it into the close method. Example:  
614 613
615 ``` dart 614 ``` dart
616 class Controller extends GetxController { 615 class Controller extends GetxController {
617 StreamController<User> user = StreamController<User>(); 616 StreamController<User> user = StreamController<User>();
618 StreamController<String> name = StreamController<String>(); 617 StreamController<String> name = StreamController<String>();
619 618
620 - /// close stream = onClose method, not dispose. 619 + /// close stream = onClose yöntemi, dispose değil.
621 @override 620 @override
622 void onClose() { 621 void onClose() {
623 user.close(); 622 user.close();
@@ -627,15 +626,16 @@ class Controller extends GetxController { @@ -627,15 +626,16 @@ class Controller extends GetxController {
627 } 626 }
628 ``` 627 ```
629 628
630 -Controller life cycle: 629 +Controller life cycle(yaşam döngüsü):
  630 +
  631 +* onInit() oluşturulduğu yer.
  632 +* onClose() close yöntemine hazırlanırken herhangi bir değişiklik yapmak için kapatıldığı yer.
  633 +* deleted: Controller bellekten tam anlamıyla kaldırdığı için bu API'ye erişiminiz olmaz. Herhangi bir iz bırakmadan kelimenin tam anlamıyla silinir.
631 634
632 -* onInit() where it is created.  
633 -* onClose() where it is closed to make any changes in preparation for the delete method  
634 -* deleted: you do not have access to this API because it is literally removing the controller from memory. It is literally deleted, without leaving any trace. 635 +### Kullanmanın diğer yolları
635 636
636 -### Other ways of using it  
637 637
638 -You can use Controller instance directly on GetBuilder value: 638 +Controller'ı doğrudan GetBuilder ile kullanabilirsiniz:
639 639
640 ``` dart 640 ``` dart
641 GetBuilder<Controller>( 641 GetBuilder<Controller>(
@@ -646,18 +646,18 @@ GetBuilder<Controller>( @@ -646,18 +646,18 @@ GetBuilder<Controller>(
646 ), 646 ),
647 ``` 647 ```
648 648
649 -You may also need an instance of your controller outside of your GetBuilder, and you can use these approaches to achieve this: 649 +Controller'ınızı GetBuilder dışında bir örneğine de ihtiyacınız olabilir ve bunu başarmak için bu yaklaşımları kullanabilirsiniz:
650 650
651 ``` dart 651 ``` dart
652 class Controller extends GetxController { 652 class Controller extends GetxController {
653 static Controller get to => Get.find(); 653 static Controller get to => Get.find();
654 [...] 654 [...]
655 } 655 }
656 -// on you view: 656 +// görünümde:
657 GetBuilder<Controller>( 657 GetBuilder<Controller>(
658 - init: Controller(), // use it only first time on each controller 658 + init: Controller(), // Her controller'ı bir kez kullanın
659 builder: (_) => Text( 659 builder: (_) => Text(
660 - '${Controller.to.counter}', //here 660 + '${Controller.to.counter}', //burada
661 ) 661 )
662 ), 662 ),
663 ``` 663 ```
@@ -666,65 +666,65 @@ or @@ -666,65 +666,65 @@ or
666 666
667 ``` dart 667 ``` dart
668 class Controller extends GetxController { 668 class Controller extends GetxController {
669 - // static Controller get to => Get.find(); // with no static get 669 + // static Controller get to => Get.find(); // static olmadan
670 [...] 670 [...]
671 } 671 }
672 // on stateful/stateless class 672 // on stateful/stateless class
673 GetBuilder<Controller>( 673 GetBuilder<Controller>(
674 - init: Controller(), // use it only first time on each controller 674 + init: Controller(), // Her controller'ı bir kez kullanın
675 builder: (_) => Text( 675 builder: (_) => Text(
676 - '${Get.find<Controller>().counter}', //here 676 + '${Get.find<Controller>().counter}', //burada
677 ), 677 ),
678 ), 678 ),
679 ``` 679 ```
680 680
681 -* You can use "non-canonical" approaches to do this. If you are using some other dependency manager, like get_it, modular, etc., and just want to deliver the controller instance, you can do this: 681 +* Bunu yapmak için "non-canonical" yaklaşımları kullanabilirsiniz. Get_it, modular vb. Gibi başka bir dependency manager kullanıyorsanız ve sadece controller instance etmek istiyorsanız, bunu yapabilirsiniz:
682 682
683 ``` dart 683 ``` dart
684 Controller controller = Controller(); 684 Controller controller = Controller();
685 [...] 685 [...]
686 GetBuilder<Controller>( 686 GetBuilder<Controller>(
687 - init: controller, //here 687 + init: controller, //burada
688 builder: (_) => Text( 688 builder: (_) => Text(
689 - '${controller.counter}', // here 689 + '${controller.counter}', // burada
690 ), 690 ),
691 ), 691 ),
692 692
693 ``` 693 ```
694 694
695 -### Unique IDs 695 +### Unique IDs (Benzersiz Kimlikler)
696 696
697 -If you want to refine a widget's update control with GetBuilder, you can assign them unique IDs: 697 +Bir widget'ın controller'ını güncellemek istiyorsanız GetBuilder onlara benzersiz kimlikler atayabilirsiniz:
698 698
699 ``` dart 699 ``` dart
700 GetBuilder<Controller>( 700 GetBuilder<Controller>(
701 id: 'text' 701 id: 'text'
702 - init: Controller(), // use it only first time on each controller 702 + init: Controller(), // Her controller'ı bir kez kullanın
703 builder: (_) => Text( 703 builder: (_) => Text(
704 - '${Get.find<Controller>().counter}', //here 704 + '${Get.find<Controller>().counter}', //burada
705 ), 705 ),
706 ), 706 ),
707 ``` 707 ```
708 708
709 -And update it this form: 709 +Ve bu formu güncelleyin:
710 710
711 ``` dart 711 ``` dart
712 update(['text']); 712 update(['text']);
713 ``` 713 ```
714 714
715 -You can also impose conditions for the update: 715 +Güncelleme için koşullar da uygulayabilirsiniz:
716 716
717 ``` dart 717 ``` dart
718 update(['text'], counter < 10); 718 update(['text'], counter < 10);
719 ``` 719 ```
720 720
721 -GetX does this automatically and only reconstructs the widget that uses the exact variable that was changed, if you change a variable to the same as the previous one and that does not imply a change of state , GetX will not rebuild the widget to save memory and CPU cycles (3 is being displayed on the screen, and you change the variable to 3 again. In most state managers, this will cause a new rebuild, but with GetX the widget will only is rebuilt again, if in fact his state has changed). 721 +GetX bunu otomatik olarak yapar ve yalnızca değiştirilen değişkeni tam olarak kullanan widget'ı yeniden yapılandırır, bir değişkeni öncekiyle aynı olacak şekilde değiştirirseniz ve bu state değişikliği anlamına gelmezse GetX widget'ı bellek ve CPU döngülerinden tasarruf etmek için yeniden oluşturmaz (ekranda 3 görüntüleniyor ve değişkeni tekrar 3 olarak değiştirirsiniz. Çoğu state manager, bu yeni bir yeniden yapılanmaya neden olur, ancak Get ile widget yalnızca state değiştiyse yeniden oluşturulur).
722 722
723 -## Mixing the two state managers 723 +## İki state managers ile Mixing
724 724
725 -Some people opened a feature request, as they wanted to use only one type of reactive variable, and the other mechanics, and needed to insert an Obx into a GetBuilder for this. Thinking about it MixinBuilder was created. It allows both reactive changes by changing ".obs" variables, and mechanical updates via update(). However, of the 4 widgets he is the one that consumes the most resources, since in addition to having a Subscription to receive change events from his children, he subscribes to the update method of his controller. 725 +Bazı insanlar, yalnızca bir tür reaktif değişken ve diğer mekanikleri kullanmak istediklerinden ve bunun için bir GetBuilder'a bir Obx eklemeleri gerektiğinden bir özellik request'i açtı. Bunu düşünerek MixinBuilder oluşturuldu. Hem ".obs" değişkenlerini değiştirerek reaktif değişikliklere hem de update() aracılığıyla mekanik güncellemelere izin verildi. Bununla birlikte, 4 widget'tan en çok kaynak tüketendir, çünkü children'larda değişiklik olaylarını anlaması için sahip olmasının yanı sıra, controller'ın güncelleme yöntemine sahip olur.
726 726
727 -Extending GetxController is important, as they have life cycles, and can "start" and "end" events in their onInit() and onClose() methods. You can use any class for this, but I strongly recommend you use the GetxController class to place your variables, whether they are observable or not. 727 +GetxController'ı extends etmek önemlidir, çünkü yaşam döngüleri vardır ve olayları onInit() ve onClose() yöntemlerinde "başlatabilir" ve "bitebilir". Bunun için herhangi bir sınıfı kullanabilirsiniz, ancak değişkenlerinizi observable olsun ya da olmasın yerleştirmek için GetxController sınıfını kullanmanızı şiddetle tavsiye ederim.
728 728
729 ## StateMixin 729 ## StateMixin
730 730
@@ -732,6 +732,10 @@ Another way to handle your `UI` state is use the `StateMixin<T>` . @@ -732,6 +732,10 @@ Another way to handle your `UI` state is use the `StateMixin<T>` .
732 To implement it, use the `with` to add the `StateMixin<T>` 732 To implement it, use the `with` to add the `StateMixin<T>`
733 to your controller which allows a T model. 733 to your controller which allows a T model.
734 734
  735 +`UI` state'ini ele almanın başka bir yolu da `StateMixin<T>` kullanmaktır.
  736 +Bunu uygulamak için, `StateMixin<T>` ile `with`i kullanın.
  737 +bir controller'a T modelinizi ekleyin.
  738 +
735 ``` dart 739 ``` dart
736 class Controller extends GetController with StateMixin<User>{} 740 class Controller extends GetController with StateMixin<User>{}
737 ``` 741 ```
@@ -739,11 +743,14 @@ class Controller extends GetController with StateMixin<User>{} @@ -739,11 +743,14 @@ class Controller extends GetController with StateMixin<User>{}
739 The `change()` method change the State whenever we want. 743 The `change()` method change the State whenever we want.
740 Just pass the data and the status in this way: 744 Just pass the data and the status in this way:
741 745
  746 +`change()` yöntemi istediğimiz zaman State'i değiştirir.
  747 +Sadece verileri ve state'i bu şekilde iletin:
  748 +
742 ```dart 749 ```dart
743 change(data, status: RxStatus.success()); 750 change(data, status: RxStatus.success());
744 ``` 751 ```
745 752
746 -RxStatus allow these status: 753 +RxStatus şu duruma izin verir:
747 754
748 ``` dart 755 ``` dart
749 RxStatus.loading(); 756 RxStatus.loading();
@@ -752,7 +759,7 @@ RxStatus.empty(); @@ -752,7 +759,7 @@ RxStatus.empty();
752 RxStatus.error('message'); 759 RxStatus.error('message');
753 ``` 760 ```
754 761
755 -To represent it in the UI, use: 762 +UI'da bu şekilde kullanın:
756 763
757 ```dart 764 ```dart
758 class OtherClass extends GetView<Controller> { 765 class OtherClass extends GetView<Controller> {
@@ -763,13 +770,13 @@ class OtherClass extends GetView<Controller> { @@ -763,13 +770,13 @@ class OtherClass extends GetView<Controller> {
763 body: controller.obx( 770 body: controller.obx(
764 (state)=>Text(state.name), 771 (state)=>Text(state.name),
765 772
766 - // here you can put your custom loading indicator, but  
767 - // by default would be Center(child:CircularProgressIndicator()) 773 + // burada özel yükleme göstergenizi koyabilirsiniz, ancak
  774 + // varsayılan olarak Center(child:CircularProgressIndicator()) olacaktır.
768 onLoading: CustomLoadingIndicator(), 775 onLoading: CustomLoadingIndicator(),
769 onEmpty: Text('No data found'), 776 onEmpty: Text('No data found'),
770 777
771 - // here also you can set your own error widget, but by  
772 - // default will be an Center(child:Text(error)) 778 + // burada ayrıca kendi hata widget'ınızı ayarlayabilirsiniz, ancak
  779 + // default birCenter(child:Text(error)) olacaktır.
773 onError: (error)=>Text(error), 780 onError: (error)=>Text(error),
774 ), 781 ),
775 ); 782 );
@@ -778,19 +785,19 @@ class OtherClass extends GetView<Controller> { @@ -778,19 +785,19 @@ class OtherClass extends GetView<Controller> {
778 785
779 ## GetBuilder vs GetX vs Obx vs MixinBuilder 786 ## GetBuilder vs GetX vs Obx vs MixinBuilder
780 787
781 -In a decade working with programming I was able to learn some valuable lessons. 788 +Programlamayla geçen on yılda bazı değerli dersler öğrenebildim.
782 789
783 -My first contact with reactive programming was so "wow, this is incredible" and in fact reactive programming is incredible.  
784 -However, it is not suitable for all situations. Often all you need is to change the state of 2 or 3 widgets at the same time, or an ephemeral change of state, in which case reactive programming is not bad, but it is not appropriate. 790 +Reaktif programlama ile ilk temasım çok "vay be, bu inanılmaz" oldu ve aslında reaktif programlama inanılmaz.
  791 +Ancak, tüm durumlar için uygun değildir. Çoğu zaman tek ihtiyacınız olan, aynı anda 2 veya 3 parçacığın durumunu değiştirmek veya geçici bir durum değişikliğidir, bu durumda reaktif programlama kötü değildir, ancak uygun değildir.
785 792
786 -Reactive programming has a higher RAM consumption that can be compensated for by the individual workflow, which will ensure that only one widget is rebuilt and when necessary, but creating a list with 80 objects, each with several streams is not a good one idea. Open the dart inspect and check how much a StreamBuilder consumes, and you'll understand what I'm trying to tell you. 793 +Reaktif programlama, bireysel iş akışıyla telafi edilebilecek daha yüksek bir RAM tüketimine sahiptir; bu, yalnızca bir widget'ın yeniden oluşturulmasını ve gerektiğinde yapılmasını sağlar, ancak her biri birkaç akışa sahip 80 nesneden oluşan bir liste oluşturmak iyi bir fikir değildir. Dartı açın ve bir StreamBuilder'ın ne kadar tükettiğini kontrol edin ve size ne söylemeye çalıştığımı anlayacaksınız.
787 794
788 -With that in mind, I created the simple state manager. It is simple, and that is exactly what you should demand from it: updating state in blocks in a simple way, and in the most economical way. 795 +Bunu akılda tutarak, basit bir state manager yarattım. Bu basittir ve ondan tam olarak talep etmeniz gereken şey budur: State'i bloklar halinde basit bir şekilde ve en ekonomik şekilde güncellemek.
789 796
790 -GetBuilder is very economical in RAM, and there is hardly a more economical approach than him (at least I can't imagine one, if it exists, please let us know). 797 +GetBuilder RAM'de çok ekonomiktir ve ondan daha ekonomik bir yaklaşım yoktur (en azından ben bir tane hayal edemiyorum, varsa lütfen bize bildirin).
791 798
792 -However, GetBuilder is still a mechanical state manager, you need to call update() just like you would need to call Provider's notifyListeners(). 799 +Ancak GetBuilder hala mekanik bir state manager'dir, tıpkı Provider'ın notifyListeners() işlevini çağırmanız gerektiği gibi update() öğesini çağırmanız gerekir.
793 800
794 -There are other situations where reactive programming is really interesting, and not working with it is the same as reinventing the wheel. With that in mind, GetX was created to provide everything that is most modern and advanced in a state manager. It updates only what is necessary and when necessary, if you have an error and send 300 state changes simultaneously, GetX will filter and update the screen only if the state actually changes. 801 +Reaktif programlamanın gerçekten ilginç olduğu başka durumlar da vardır ve onunla çalışmamak, tekerleği yeniden icat etmekle aynı şeydir. Bunu akılda tutarak GetX, bir State Manager'de en modern ve gelişmiş olan her şeyi sağlamak için oluşturuldu. Sadece gerekli olanı günceller ve gerektiğinde, bir hatanız varsa ve aynı anda 300 durum değişikliği gönderirseniz GetX, yalnızca durum gerçekten değiştiğinde ekranı filtreler ve günceller.
795 802
796 -GetX is still more economical than any other reactive state manager, but it consumes a little more RAM than GetBuilder. Thinking about it and aiming to maximize the consumption of resources that Obx was created. Unlike GetX and GetBuilder, you will not be able to initialize a controller inside an Obx, it is just a Widget with a StreamSubscription that receives change events from your children, that's all. It is more economical than GetX, but loses to GetBuilder, which was to be expected, since it is reactive, and GetBuilder has the most simplistic approach that exists, of storing a widget's hashcode and its StateSetter. With Obx you don't need to write your controller type, and you can hear the change from multiple different controllers, but it needs to be initialized before, either using the example approach at the beginning of this readme, or using the Bindings class. 803 +GetX, diğer herhangi bir reaktif durum yöneticisinden hala daha ekonomiktir, ancak GetBuilder'dan biraz daha fazla RAM tüketir. Bunu düşünerek ve Obx'in yarattığı kaynakların tüketimini en üst düzeye çıkarmayı hedefleyerek. GetX ve GetBuilder'dan farklı olarak, bir Obx içinde bir controller başlatamayacaksınız, bu sadece children'larda değişiklik olaylarını alan bir StreamSubscription'a sahip bir Widget'tır, hepsi bu. GetX'ten daha ekonomiktir, ancak reaktif olduğu için beklendiği gibi GetBuilder'a kaydeder ve GetBuilder, bir parçacığın hashcode'unu ve StateSetter'ını depolamak için var olan en basit yaklaşıma sahiptir. Obx ile controller türünüzü yazmanız gerekmez ve değişikliği birden çok farklı controller'dan ulaşabilir ve dinleyebilirsiniz, ancak bu readme dosyasının başındaki örnek yaklaşım kullanılarak veya Bindings classı kullanılarak daha önce başlatılması gerekir.