New post on /r/flutterdev subreddit:
All Flutter developers should try this, it's amazing!
https://raw.githubusercontent.com/jonataslaw/getx/master/getx.pngHi developers, today I bring a suggestion that can help many of you. In the last month my team and I faced many problems due to the pandemic, we had projects behind schedule, many developers could not work, and I decided to look for productivity solutions.Ok, Flutter is already productive for being declarative, but there is still a certain boilerplate around some tools and functions. I searched for "productivity" in the pub, and clicked on the first package that appeared. He had a very long description, I read everything and decided to try it.At first, it looked like a package that tried to sell a lot, I found it very suspicious that the package had so many functions, but I decided to work 1 week with the package. The first few days I felt a little strange how things worked on him, but I soon got used to it. After a week of using it, I was very excited, I introduced it to my team, and we started working with Flutter + GetX. The other developers liked the package very much, and since then we have been working with GetX for everything.And well, my testimony is that it really changed the way we worked. Our projects had a much higher productivity, and today our entire team is very satisfied, it is as if we had found a diamond stone at
pub.dev.This is just a suggestion, I'm not saying that you should immediately change everything you use for GetX, but I think there is a very clear reason why this package has gone up more than 500 stars in the last month. It's really good and I think you should give him a chance, just like I did, and tell him about his experience here. Maybe it doesn't like everyone, but I'm sure this post will help other people who, like me, want to add a package to pubspec and start working, without worrying about configuring anything.I'm going to try to summarize how things work with this package, I'm sorry if something appears badly formatted, I'm new to Reddit.To navigate to a new route, you would generally use:Navigator.of(context).push(context,MaterialPageRoute(builder: (BuildContext context) {return Home();},),);With GetX it all comes down to a simple:
Get.to(Home());You should certainly already use some state management solution, which involves several steps. With Get, it all comes down to inserting a ".obs" at the end of your variable, and placing the widget you want to update inside an "Obx", example:var count = 0.obs;Obx(()=> Text(count.string));Every time the value of "count" changes, the screen is updated with the current value, this seems easier than setState, since you don't need a StatefulWidget for this.If you have text in one language, to change to another, you just need to call Get.changeLocale();Text("Hi".tr);Get.changeLocale('it');// out: Text('Ciao');I see a lot of people talking about the GetX state manager, but a lot of people don't even know the other advantages of the package, and it really is a solution that everyone should know about, and I use this package in all my company's projects, and I would like to shout how cool this package is!package link in the pub:
https://pub.dev/packages/getPackage link on Github:
https://github.com/jonataslaw/getx
July 07, 2020 at 11:05PM by innovationsapps
https://ift.tt/2ZPjrAn