Jonatas

change example do new version

@@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@
52 52
53 - GetX is not a bloated. It has a multitude of features that allow you to start programming without worrying about anything, but each of these features are in separate containers, and are only started after use. If you only use State Management, only State Management will be compiled. If you only use routes, nothing from the state management will be compiled. You can compile the benchmark repository, and you will see that using only Get state management, the application compiled with Get has become smaller than all other applications that have only the state management of other packages, because nothing that is not used will be compiled into your code, and each GetX solution was designed to be extra lightweight. The merit here also comes from Flutter's tree shaking which is incredible, and manages to eliminate unused resources like no other framework does. 53 - GetX is not a bloated. It has a multitude of features that allow you to start programming without worrying about anything, but each of these features are in separate containers, and are only started after use. If you only use State Management, only State Management will be compiled. If you only use routes, nothing from the state management will be compiled. You can compile the benchmark repository, and you will see that using only Get state management, the application compiled with Get has become smaller than all other applications that have only the state management of other packages, because nothing that is not used will be compiled into your code, and each GetX solution was designed to be extra lightweight. The merit here also comes from Flutter's tree shaking which is incredible, and manages to eliminate unused resources like no other framework does.
54 54
55 -**GetX makes your development productive, but want to make it even more productive? Add the extension [GetX extension to VSCode](https://marketplace.visualstudio.com/items?itemName=get-snippets.get-snippets) to your VSCode** 55 +**GetX makes your development productive, but want to make it even more productive? Add the extension [GetX extension to VSCode](https://marketplace.visualstudio.com/items?itemName=get-snippets.get-snippets)**
56 56
57 **GetX Community channels:** 57 **GetX Community channels:**
58 58
@@ -97,7 +97,7 @@ You can make any variable observable using a simple ".obs". @@ -97,7 +97,7 @@ You can make any variable observable using a simple ".obs".
97 ```dart 97 ```dart
98 class Controller extends GetxController{ 98 class Controller extends GetxController{
99 var count = 0.obs; 99 var count = 0.obs;
100 - increment() => count.value++; 100 + increment() => count+1;
101 } 101 }
102 ``` 102 ```
103 103
@@ -113,7 +113,7 @@ class Home extends StatelessWidget { @@ -113,7 +113,7 @@ class Home extends StatelessWidget {
113 @override 113 @override
114 Widget build(context) => Scaffold( 114 Widget build(context) => Scaffold(
115 // Use Obx(()=> to update Text() whenever count is changed. 115 // Use Obx(()=> to update Text() whenever count is changed.
116 - appBar: AppBar(title: Obx(() => Text("Clicks: " + c.count.string))), 116 + appBar: AppBar(title: Obx(() => Text("Clicks: ${c.count}"))),
117 117
118 // Replace the 8 lines Navigator.push by a simple Get.to(). You don't need context 118 // Replace the 8 lines Navigator.push by a simple Get.to(). You don't need context
119 body: Center(child: RaisedButton( 119 body: Center(child: RaisedButton(
@@ -129,7 +129,7 @@ class Other extends StatelessWidget { @@ -129,7 +129,7 @@ class Other extends StatelessWidget {
129 @override 129 @override
130 Widget build(context){ 130 Widget build(context){
131 // Access the updated count variable 131 // Access the updated count variable
132 - return Scaffold(body: Center(child: Text(c.count.string))); 132 + return Scaffold(body: Center(child: Text("${c.count}")));
133 } 133 }
134 } 134 }
135 ``` 135 ```
@@ -184,7 +184,7 @@ var name = 'Jonatas Borges'.obs; @@ -184,7 +184,7 @@ var name = 'Jonatas Borges'.obs;
184 And in the UI, when you want to show that value and update the screen whenever tha values changes, simply do this: 184 And in the UI, when you want to show that value and update the screen whenever tha values changes, simply do this:
185 185
186 ```dart 186 ```dart
187 -Obx (() => Text (controller.name)); 187 +Obx(() => Text("${controller.name}"));
188 ``` 188 ```
189 189
190 That's all. It's *that* simple. 190 That's all. It's *that* simple.
@@ -110,7 +110,7 @@ class _RxImpl<T> implements RxInterface<T> { @@ -110,7 +110,7 @@ class _RxImpl<T> implements RxInterface<T> {
110 bool operator ==(dynamic o) { 110 bool operator ==(dynamic o) {
111 // Todo, find a common implementation for the hashCode of different Types. 111 // Todo, find a common implementation for the hashCode of different Types.
112 if (o is T) return _value == o; 112 if (o is T) return _value == o;
113 - if (o is _RxImpl<T>) return _value == o.value; 113 + if (o is RxInterface<T>) return _value == o.value;
114 return false; 114 return false;
115 } 115 }
116 116