Jonny Borges
Committed by GitHub

Update README.md

@@ -232,8 +232,11 @@ Get.bottomSheet( @@ -232,8 +232,11 @@ Get.bottomSheet(
232 ``` 232 ```
233 233
234 ## Simple State Manager 234 ## Simple State Manager
235 -There are currently several state managers for Flutter. However, most of them involve using ChangeNotifier to update widgets (such as the Provider) and this is a bad and very bad approach to performance of medium or large applications. You can check in the official Flutter documentation that ChangeNotifier should be used with 1 or a maximum of 2 listeners (https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html), making it practically unusable for any application medium or large. Other state managers are very good, but they have some weakness. BLoC is very safe and efficient, but it is very complex for beginners, which has kept people from developing with Flutter. MobX is easier than BLoC and reactive, almost perfect, I would say, but you need to use a code generator that for large applications, reduces productivity, you will need to drink a lot of coffees until your code is ready again after a Flutter clean.  
236 -Get was created to solve all problems with current state managers in just 95 lines of code. This easy and lightweight state manager, which does not use ChangeNotifier, will meet the need especially for those new to Flutter, and will not cause problems for large applications. 235 +There are currently several state managers for Flutter. However, most of them involve using ChangeNotifier to update widgets and this is a bad and very bad approach to performance of medium or large applications. You can check in the official Flutter documentation that ChangeNotifier should be used with 1 or a maximum of 2 listeners (https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html), making it practically unusable for any application medium or large. Other state managers are good, but have their nuances. BLoC is very safe and efficient, but it is very complex for beginners, which has kept people from developing with Flutter. MobX is easier than BLoC and reactive, almost perfect, I would say, but you need to use a code generator that for large applications, reduces productivity, you will need to drink a lot of coffees until your code is ready again after a Flutter clean (And this is not MobX's fault, but the codegen which is really slow!). Provider uses InheritedWidget to deliver the same listener, as a way of solving the problem reported above with ChangeNotifier, which implies that any access to its ChangeNotifier class must be within the widget tree because of the context to access o Inherited.
  236 +
  237 +Get isn't better or worse than any other state manager, but that you should analyze these points as well as the points below to choose between using Get in pure form (Vanilla), or using it in conjunction with another state manager. Definitely, Get is not the enemy of any other state manager, because Get is a microframework, not just a state manager, and can be used either alone or in conjunction with them.
  238 +
  239 +Get has a state manager that is extremely light and easy (written in just 95 lines of code), which does not use ChangeNotifier, will meet the need especially for those new to Flutter, and will not cause problems for large applications.
237 240
238 What performance improvements does Get bring? 241 What performance improvements does Get bring?
239 242
@@ -241,7 +244,7 @@ What performance improvements does Get bring? @@ -241,7 +244,7 @@ What performance improvements does Get bring?
241 244
242 2- Does not use changeNotifier, it is the state manager that uses less memory (close to 0mb). 245 2- Does not use changeNotifier, it is the state manager that uses less memory (close to 0mb).
243 246
244 -3- Forget StatefulWidget! With Get you will never need it again (if you need to use it, you are using Get incorrectly). With the other state managers, you will probably have to use a StatefulWidget to get the instance of your Provider, BLoC, MobX Controller, etc. But have you ever stopped to think that your appBar, your scaffold, and most of the widgets that are in your class are stateless? So why save the state of an entire class, if you can only save the state of the Widget that is stateful? Get solves that, too. Create a Stateless class, make everything stateless. If you need to update a single component, wrap it with GetBuilder, and its state will be maintained. 247 +3- Forget StatefulWidget! With Get you will never need it again. With the other state managers, you will probably have to use a StatefulWidget to get the instance of your Provider, BLoC, MobX Controller, etc. But have you ever stopped to think that your appBar, your scaffold, and most of the widgets that are in your class are stateless? So why save the state of an entire class, if you can only save the state of the Widget that is stateful? Get solves that, too. Create a Stateless class, make everything stateless. If you need to update a single component, wrap it with GetBuilder, and its state will be maintained.
245 248
246 4- Organize your project for real! Controllers must not be in your UI, place your TextEditController, or any controller you use within your Controller class. 249 4- Organize your project for real! Controllers must not be in your UI, place your TextEditController, or any controller you use within your Controller class.
247 250