khangahs
Committed by GitHub

Delete README-vi_20210522084630.md

1 -![](https://raw.githubusercontent.com/jonataslaw/getx-community/master/get.png)  
2 -  
3 -**Ngôn ngữ: Tiếng Việt (file này), [English](README.md), [Indonesian](README.id-ID.md), [Urdu](README.ur-PK.md), [Chinese](README.zh-cn.md), [Brazilian Portuguese](README.pt-br.md), [Spanish](README-es.md), [Russian](README.ru.md), [Polish](README.pl.md), [Korean](README.ko-kr.md), [French](README-fr.md).**  
4 -  
5 -[![pub package](https://img.shields.io/pub/v/get.svg?label=get&color=blue)](https://pub.dev/packages/get)  
6 -[![likes](https://badges.bar/get/likes)](https://pub.dev/packages/get/score)  
7 -![building](https://github.com/jonataslaw/get/workflows/build/badge.svg)  
8 -[![style: effective dart](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://pub.dev/packages/effective_dart)  
9 -[![Discord Shield](https://img.shields.io/discord/722900883784073290.svg?logo=discord)](https://discord.com/invite/9Hpt99N)  
10 -[![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://communityinviter.com/apps/getxworkspace/getx)  
11 -[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/joinchat/PhdbJRmsZNpAqSLJL6bH7g)  
12 -<a href="https://github.com/Solido/awesome-flutter">  
13 -<img alt="Awesome Flutter" src="https://img.shields.io/badge/Awesome-Flutter-blue.svg?longCache=true&style=flat-square" />  
14 -</a>  
15 -<a href="https://www.buymeacoffee.com/jonataslaw" target="_blank"><img src="https://i.imgur.com/aV6DDA7.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important; box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" > </a>  
16 -  
17 -![](https://raw.githubusercontent.com/jonataslaw/getx-community/master/getx.png)  
18 -  
19 -- [Về Getx](#about-get)  
20 -- [Cài Đặt](#installing)  
21 -- [Counter App với GetX](#counter-app-with-getx)  
22 -- [Tam Trụ](#the-three-pillars)  
23 - - [Quản lý State](#state-management)  
24 - - [Reactive State Manager](#reactive-state-manager)  
25 - - [Thêm thông tin về quản lý state](#more-details-about-state-management)  
26 - - [Quản lý route](#route-management)  
27 - - [More details about route management](#more-details-about-route-management)  
28 - - [Dependency management](#dependency-management)  
29 - - [More details about dependency management](#more-details-about-dependency-management)  
30 -- [Utils](#utils)  
31 - - [Internationalization](#internationalization)  
32 - - [Translations](#translations)  
33 - - [Using translations](#using-translations)  
34 - - [Locales](#locales)  
35 - - [Change locale](#change-locale)  
36 - - [System locale](#system-locale)  
37 - - [Change Theme](#change-theme)  
38 - - [GetConnect](#getconnect)  
39 - - [Default configuration](#default-configuration)  
40 - - [Custom configuration](#custom-configuration)  
41 - - [GetPage Middleware](#getpage-middleware)  
42 - - [Priority](#priority)  
43 - - [Redirect](#redirect)  
44 - - [onPageCalled](#onpagecalled)  
45 - - [OnBindingsStart](#onbindingsstart)  
46 - - [OnPageBuildStart](#onpagebuildstart)  
47 - - [OnPageBuilt](#onpagebuilt)  
48 - - [OnPageDispose](#onpagedispose)  
49 - - [Other Advanced APIs](#other-advanced-apis)  
50 - - [Optional Global Settings and Manual configurations](#optional-global-settings-and-manual-configurations)  
51 - - [Local State Widgets](#local-state-widgets)  
52 - - [ValueBuilder](#valuebuilder)  
53 - - [ObxValue](#obxvalue)  
54 - - [Useful tips](#useful-tips)  
55 - - [GetView](#getview)  
56 - - [GetResponsiveView](#getresponsiveview)  
57 - - [How to use it](#how-to-use-it)  
58 - - [GetWidget](#getwidget)  
59 - - [GetxService](#getxservice)  
60 -- [Breaking changes from 2.0](#breaking-changes-from-20)  
61 -- [Why Getx?](#why-getx)  
62 -- [Community](#community)  
63 - - [Community channels](#community-channels)  
64 - - [How to contribute](#how-to-contribute)  
65 - - [Articles and videos](#articles-and-videos)  
66 -  
67 -# Về Getx  
68 -  
69 -- GetX is an extra-light and powerful solution for Flutter. It combines high-performance state management, intelligent dependency injection, and route management quickly and practically.  
70 -  
71 -- GetX has 3 basic principles. This means that these are the priority for all resources in the library: **PRODUCTIVITY, PERFORMANCE AND ORGANIZATION.**  
72 -  
73 - - **PERFORMANCE:** GetX is focused on performance and minimum consumption of resources. GetX does not use Streams or ChangeNotifier.  
74 -  
75 - - **PRODUCTIVITY:** GetX uses an easy and pleasant syntax. No matter what you want to do, there is always an easier way with GetX. It will save hours of development and will provide the maximum performance your application can deliver.  
76 -  
77 - Generally, the developer should be concerned with removing controllers from memory. With GetX this is not necessary because resources are removed from memory when they are not used by default. If you want to keep it in memory, you must explicitly declare "permanent: true" in your dependency. That way, in addition to saving time, you are less at risk of having unnecessary dependencies on memory. Dependency loading is also lazy by default.  
78 -  
79 - - **ORGANIZATION:** GetX allows the total decoupling of the View, presentation logic, business logic, dependency injection, and navigation. You do not need context to navigate between routes, so you are not dependent on the widget tree (visualization) for this. You don't need context to access your controllers/blocs through an inheritedWidget, so you completely decouple your presentation logic and business logic from your visualization layer. You do not need to inject your Controllers/Models/Blocs classes into your widget tree through `MultiProvider`s. For this, GetX uses its own dependency injection feature, decoupling the DI from its view completely.  
80 -  
81 - With GetX you know where to find each feature of your application, having clean code by default. In addition to making maintenance easy, this makes the sharing of modules something that until then in Flutter was unthinkable, something totally possible.  
82 - BLoC was a starting point for organizing code in Flutter, it separates business logic from visualization. GetX is a natural evolution of this, not only separating the business logic but the presentation logic. Bonus injection of dependencies and routes are also decoupled, and the data layer is out of it all. You know where everything is, and all of this in an easier way than building a hello world.  
83 - GetX is the easiest, practical, and scalable way to build high-performance applications with the Flutter SDK. It has a large ecosystem around it that works perfectly together, it's easy for beginners, and it's accurate for experts. It is secure, stable, up-to-date, and offers a huge range of APIs built-in that are not present in the default Flutter SDK.  
84 -  
85 -- GetX is not 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.  
86 -  
87 -- GetX has a huge ecosystem, a large community, a large number of collaborators, and will be maintained as long as the Flutter exists. GetX too is capable of running with the same code on Android, iOS, Web, Mac, Linux, Windows, and on your server.  
88 - **It is possible to fully reuse your code made on the frontend on your backend with [Get Server](https://github.com/jonataslaw/get_server)**.  
89 -  
90 -**In addition, the entire development process can be completely automated, both on the server and on the front end with [Get CLI](https://github.com/jonataslaw/get_cli)**.  
91 -  
92 -**In addition, to further increase your productivity, we have the  
93 -[extension to VSCode](https://marketplace.visualstudio.com/items?itemName=get-snippets.get-snippets) and the [extension to Android Studio/Intellij](https://plugins.jetbrains.com/plugin/14975-getx-snippets)**  
94 -  
95 -# Cài Đặt  
96 -  
97 -Add Get to your pubspec.yaml file:  
98 -  
99 -```yaml  
100 -dependencies:  
101 - get:  
102 -```  
103 -  
104 -Import get in files that it will be used:  
105 -  
106 -```dart  
107 -import 'package:get/get.dart';  
108 -```  
109 -  
110 -# Counter App with GetX  
111 -  
112 -The "counter" project created by default on new project on Flutter has over 100 lines (with comments). To show the power of Get, I will demonstrate how to make a "counter" changing the state with each click, switching between pages and sharing the state between screens, all in an organized way, separating the business logic from the view, in ONLY 26 LINES CODE INCLUDING COMMENTS.  
113 -  
114 -- Step 1:  
115 - Add "Get" before your MaterialApp, turning it into GetMaterialApp  
116 -  
117 -```dart  
118 -void main() => runApp(GetMaterialApp(home: Home()));  
119 -```  
120 -  
121 -- Note: this does not modify the MaterialApp of the Flutter, GetMaterialApp is not a modified MaterialApp, it is just a pre-configured Widget, which has the default MaterialApp as a child. You can configure this manually, but it is definitely not necessary. GetMaterialApp will create routes, inject them, inject translations, inject everything you need for route navigation. If you use Get only for state management or dependency management, it is not necessary to use GetMaterialApp. GetMaterialApp is necessary for routes, snackbars, internationalization, bottomSheets, dialogs, and high-level apis related to routes and absence of context.  
122 -- Note²: This step is only necessary if you gonna use route management (`Get.to()`, `Get.back()` and so on). If you not gonna use it then it is not necessary to do step 1  
123 -  
124 -- Step 2:  
125 - Create your business logic class and place all variables, methods and controllers inside it.  
126 - You can make any variable observable using a simple ".obs".  
127 -  
128 -```dart  
129 -class Controller extends GetxController{  
130 - var count = 0.obs;  
131 - increment() => count++;  
132 -}  
133 -```  
134 -  
135 -- Step 3:  
136 - Create your View, use StatelessWidget and save some RAM, with Get you may no longer need to use StatefulWidget.  
137 -  
138 -```dart  
139 -class Home extends StatelessWidget {  
140 -  
141 - @override  
142 - Widget build(context) {  
143 -  
144 - // Instantiate your class using Get.put() to make it available for all "child" routes there.  
145 - final Controller c = Get.put(Controller());  
146 -  
147 - return Scaffold(  
148 - // Use Obx(()=> to update Text() whenever count is changed.  
149 - appBar: AppBar(title: Obx(() => Text("Clicks: ${c.count}"))),  
150 -  
151 - // Replace the 8 lines Navigator.push by a simple Get.to(). You don't need context  
152 - body: Center(child: ElevatedButton(  
153 - child: Text("Go to Other"), onPressed: () => Get.to(Other()))),  
154 - floatingActionButton:  
155 - FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment));  
156 - }  
157 -}  
158 -  
159 -class Other extends StatelessWidget {  
160 - // You can ask Get to find a Controller that is being used by another page and redirect you to it.  
161 - final Controller c = Get.find();  
162 -  
163 - @override  
164 - Widget build(context){  
165 - // Access the updated count variable  
166 - return Scaffold(body: Center(child: Text("${c.count}")));  
167 - }  
168 -}  
169 -```  
170 -  
171 -Result:  
172 -  
173 -![](https://raw.githubusercontent.com/jonataslaw/getx-community/master/counter-app-gif.gif)  
174 -  
175 -This is a simple project but it already makes clear how powerful Get is. As your project grows, this difference will become more significant.  
176 -  
177 -Get was designed to work with teams, but it makes the job of an individual developer simple.  
178 -  
179 -Improve your deadlines, deliver everything on time without losing performance. Get is not for everyone, but if you identified with that phrase, Get is for you!  
180 -  
181 -# Tam Trụ  
182 -  
183 -## Quản lý State  
184 -  
185 -Get has two different state managers: the simple state manager (we'll call it GetBuilder) and the reactive state manager (GetX/Obx)  
186 -  
187 -### Reactive State Manager  
188 -  
189 -Reactive programming can alienate many people because it is said to be complicated. GetX turns reactive programming into something quite simple:  
190 -  
191 -- You won't need to create StreamControllers.  
192 -- You won't need to create a StreamBuilder for each variable  
193 -- You will not need to create a class for each state.  
194 -- You will not need to create a get for an initial value.  
195 -- You will not need to use code generators  
196 -  
197 -Reactive programming with Get is as easy as using setState.  
198 -  
199 -Let's imagine that you have a name variable and want that every time you change it, all widgets that use it are automatically changed.  
200 -  
201 -This is your count variable:  
202 -  
203 -```dart  
204 -var name = 'Jonatas Borges';  
205 -```  
206 -  
207 -To make it observable, you just need to add ".obs" to the end of it:  
208 -  
209 -```dart  
210 -var name = 'Jonatas Borges'.obs;  
211 -```  
212 -  
213 -And in the UI, when you want to show that value and update the screen whenever the values changes, simply do this:  
214 -  
215 -```dart  
216 -Obx(() => Text("${controller.name}"));  
217 -```  
218 -  
219 -That's all. It's _that_ simple.  
220 -  
221 -### Thêm thông tin về Quản lý state  
222 -  
223 -**Xem thông tin cụ thể tại dây [here](./documentation/en_US/state_management.md). Tại đó, bạn có thể tham khảo ví dụ và so sánh sự khác nhau giữa quản lý state cơ bản và quản lý state reactive**  
224 -  
225 -Bạn sẽ hình dung sức mạnh của GetX.  
226 -  
227 -## Quản lý route  
228 -  
229 -Nếu bạn chỉ sử dụng routes/snackbars/dialogs/bottomsheets không có context, GetX là lựa chọn số 2 trừ 1, nhìn đây:  
230 -  
231 -Thêm "Get" trước MaterialApp, nó sẽ biến thành GetMaterialApp  
232 -  
233 -```dart  
234 -GetMaterialApp( // Before: MaterialApp(  
235 - home: MyHome(),  
236 -)  
237 -```  
238 -  
239 -Di chuyển tới màn hình mới:  
240 -  
241 -```dart  
242 -  
243 -Get.to(NextScreen());  
244 -```  
245 -  
246 -Di chuyển tới màn hình mới theo tên. Xem thêm tại đây [here](./documentation/en_US/route_management.md#navigation-with-named-routes)  
247 -  
248 -```dart  
249 -  
250 -Get.toNamed('/details');  
251 -```  
252 -  
253 -Để đóng snackbars, dialogs, bottomsheets, hay bất kì thứ gì, bạn có thể xài cái này để thay Navigator.pop(context);  
254 -  
255 -```dart  
256 -Get.back();  
257 -```  
258 -  
259 -Đi đến màn hình kế tiếp và bỏ luôn màn hình cũ (thường dùng cho màn hình giới thiệu, màn hình đăng nhập, etc.)  
260 -  
261 -```dart  
262 -Get.off(NextScreen());  
263 -```  
264 -  
265 -Đi đến màn hình kế tiếp và đóng tất cả các routes (hữu dụng cho shopping cart, polls, và tests)  
266 -  
267 -```dart  
268 -Get.offAll(NextScreen());  
269 -```  
270 -  
271 -Noticed that you didn't have to use context to do any of these things? That's one of the biggest advantages of using Get route management. With this, you can execute all these methods from within your controller class, without worries.  
272 -  
273 -### More details about route management  
274 -  
275 -**Get works with named routes and also offers lower-level control over your routes! There is in-depth documentation [here](./documentation/en_US/route_management.md)**  
276 -  
277 -## Dependency management  
278 -  
279 -Get has a simple and powerful dependency manager that allows you to retrieve the same class as your Bloc or Controller with just 1 lines of code, no Provider context, no inheritedWidget:  
280 -  
281 -```dart  
282 -Controller controller = Get.put(Controller()); // Rather Controller controller = Controller();  
283 -```  
284 -  
285 -- Note: If you are using Get's State Manager, pay more attention to the bindings API, which will make it easier to connect your view to your controller.  
286 -  
287 -Instead of instantiating your class within the class you are using, you are instantiating it within the Get instance, which will make it available throughout your App.  
288 -So you can use your controller (or class Bloc) normally  
289 -  
290 -**Tip:** Get dependency management is decoupled from other parts of the package, so if for example, your app is already using a state manager (any one, it doesn't matter), you don't need to rewrite it all, you can use this dependency injection with no problems at all  
291 -  
292 -```dart  
293 -controller.fetchApi();  
294 -```  
295 -  
296 -Imagine that you have navigated through numerous routes, and you need data that was left behind in your controller, you would need a state manager combined with the Provider or Get_it, correct? Not with Get. You just need to ask Get to "find" for your controller, you don't need any additional dependencies:  
297 -  
298 -```dart  
299 -Controller controller = Get.find();  
300 -//Yes, it looks like Magic, Get will find your controller, and will deliver it to you. You can have 1 million controllers instantiated, Get will always give you the right controller.  
301 -```  
302 -  
303 -And then you will be able to recover your controller data that was obtained back there:  
304 -  
305 -```dart  
306 -Text(controller.textFromApi);  
307 -```  
308 -  
309 -### More details about dependency management  
310 -  
311 -**See a more in-depth explanation of dependency management [here](./documentation/en_US/dependency_management.md)**  
312 -  
313 -# Utils  
314 -  
315 -## Internationalization  
316 -  
317 -### Translations  
318 -  
319 -Translations are kept as a simple key-value dictionary map.  
320 -To add custom translations, create a class and extend `Translations`.  
321 -  
322 -```dart  
323 -import 'package:get/get.dart';  
324 -  
325 -class Messages extends Translations {  
326 - @override  
327 - Map<String, Map<String, String>> get keys => {  
328 - 'en_US': {  
329 - 'hello': 'Hello World',  
330 - },  
331 - 'de_DE': {  
332 - 'hello': 'Hallo Welt',  
333 - }  
334 - };  
335 -}  
336 -```  
337 -  
338 -#### Using translations  
339 -  
340 -Just append `.tr` to the specified key and it will be translated, using the current value of `Get.locale` and `Get.fallbackLocale`.  
341 -  
342 -```dart  
343 -Text('title'.tr);  
344 -```  
345 -  
346 -#### Using translation with singular and plural  
347 -  
348 -```dart  
349 -var products = [];  
350 -Text('singularKey'.trPlural('pluralKey', products.length, Args));  
351 -```  
352 -  
353 -#### Using translation with parameters  
354 -  
355 -```dart  
356 -import 'package:get/get.dart';  
357 -  
358 -  
359 -Map<String, Map<String, String>> get keys => {  
360 - 'en_US': {  
361 - 'logged_in': 'logged in as @name with email @email',  
362 - },  
363 - 'es_ES': {  
364 - 'logged_in': 'iniciado sesión como @name con e-mail @email',  
365 - }  
366 -};  
367 -  
368 -Text('logged_in'.trParams({  
369 - 'name': 'Jhon',  
370 - 'email': 'jhon@example.com'  
371 - }));  
372 -```  
373 -  
374 -### Locales  
375 -  
376 -Pass parameters to `GetMaterialApp` to define the locale and translations.  
377 -  
378 -```dart  
379 -return GetMaterialApp(  
380 - translations: Messages(), // your translations  
381 - locale: Locale('en', 'US'), // translations will be displayed in that locale  
382 - fallbackLocale: Locale('en', 'UK'), // specify the fallback locale in case an invalid locale is selected.  
383 -);  
384 -```  
385 -  
386 -#### Change locale  
387 -  
388 -Call `Get.updateLocale(locale)` to update the locale. Translations then automatically use the new locale.  
389 -  
390 -```dart  
391 -var locale = Locale('en', 'US');  
392 -Get.updateLocale(locale);  
393 -```  
394 -  
395 -#### System locale  
396 -  
397 -To read the system locale, you could use `Get.deviceLocale`.  
398 -  
399 -```dart  
400 -return GetMaterialApp(  
401 - locale: Get.deviceLocale,  
402 -);  
403 -```  
404 -  
405 -## Change Theme  
406 -  
407 -Please do not use any higher level widget than `GetMaterialApp` in order to update it. This can trigger duplicate keys. A lot of people are used to the prehistoric approach of creating a "ThemeProvider" widget just to change the theme of your app, and this is definitely NOT necessary with **GetX™**.  
408 -  
409 -You can create your custom theme and simply add it within `Get.changeTheme` without any boilerplate for that:  
410 -  
411 -```dart  
412 -Get.changeTheme(ThemeData.light());  
413 -```  
414 -  
415 -If you want to create something like a button that changes the Theme in `onTap`, you can combine two **GetX™** APIs for that:  
416 -  
417 -- The api that checks if the dark `Theme` is being used.  
418 -- And the `Theme` Change API, you can just put this within an `onPressed`:  
419 -  
420 -```dart  
421 -Get.changeTheme(Get.isDarkMode? ThemeData.light(): ThemeData.dark());  
422 -```  
423 -  
424 -When `.darkmode` is activated, it will switch to the _light theme_, and when the _light theme_ becomes active, it will change to _dark theme_.  
425 -  
426 -## GetConnect  
427 -  
428 -GetConnect is an easy way to communicate from your back to your front with http or websockets  
429 -  
430 -### Default configuration  
431 -  
432 -You can simply extend GetConnect and use the GET/POST/PUT/DELETE/SOCKET methods to communicate with your Rest API or websockets.  
433 -  
434 -```dart  
435 -class UserProvider extends GetConnect {  
436 - // Get request  
437 - Future<Response> getUser(int id) => get('http://youapi/users/$id');  
438 - // Post request  
439 - Future<Response> postUser(Map data) => post('http://youapi/users', body: data);  
440 - // Post request with File  
441 - Future<Response<CasesModel>> postCases(List<int> image) {  
442 - final form = FormData({  
443 - 'file': MultipartFile(image, filename: 'avatar.png'),  
444 - 'otherFile': MultipartFile(image, filename: 'cover.png'),  
445 - });  
446 - return post('http://youapi/users/upload', form);  
447 - }  
448 -  
449 - GetSocket userMessages() {  
450 - return socket('https://yourapi/users/socket');  
451 - }  
452 -}  
453 -```  
454 -  
455 -### Custom configuration  
456 -  
457 -GetConnect is highly customizable You can define base Url, as answer modifiers, as Requests modifiers, define an authenticator, and even the number of attempts in which it will try to authenticate itself, in addition to giving the possibility to define a standard decoder that will transform all your requests into your Models without any additional configuration.  
458 -  
459 -```dart  
460 -class HomeProvider extends GetConnect {  
461 - @override  
462 - void onInit() {  
463 - // All request will pass to jsonEncode so CasesModel.fromJson()  
464 - httpClient.defaultDecoder = CasesModel.fromJson;  
465 - httpClient.baseUrl = 'https://api.covid19api.com';  
466 - // baseUrl = 'https://api.covid19api.com'; // It define baseUrl to  
467 - // Http and websockets if used with no [httpClient] instance  
468 -  
469 - // It's will attach 'apikey' property on header from all requests  
470 - httpClient.addRequestModifier((request) {  
471 - request.headers['apikey'] = '12345678';  
472 - return request;  
473 - });  
474 -  
475 - // Even if the server sends data from the country "Brazil",  
476 - // it will never be displayed to users, because you remove  
477 - // that data from the response, even before the response is delivered  
478 - httpClient.addResponseModifier<CasesModel>((request, response) {  
479 - CasesModel model = response.body;  
480 - if (model.countries.contains('Brazil')) {  
481 - model.countries.remove('Brazilll');  
482 - }  
483 - });  
484 -  
485 - httpClient.addAuthenticator((request) async {  
486 - final response = await get("http://yourapi/token");  
487 - final token = response.body['token'];  
488 - // Set the header  
489 - request.headers['Authorization'] = "$token";  
490 - return request;  
491 - });  
492 -  
493 - //Autenticator will be called 3 times if HttpStatus is  
494 - //HttpStatus.unauthorized  
495 - httpClient.maxAuthRetries = 3;  
496 - }  
497 - }  
498 -  
499 - @override  
500 - Future<Response<CasesModel>> getCases(String path) => get(path);  
501 -}  
502 -```  
503 -  
504 -## GetPage Middleware  
505 -  
506 -The GetPage has now new property that takes a list of GetMiddleWare and run them in the specific order.  
507 -  
508 -**Note**: When GetPage has a Middlewares, all the children of this page will have the same middlewares automatically.  
509 -  
510 -### Priority  
511 -  
512 -The Order of the Middlewares to run can pe set by the priority in the GetMiddleware.  
513 -  
514 -```dart  
515 -final middlewares = [  
516 - GetMiddleware(priority: 2),  
517 - GetMiddleware(priority: 5),  
518 - GetMiddleware(priority: 4),  
519 - GetMiddleware(priority: -8),  
520 -];  
521 -```  
522 -  
523 -those middlewares will be run in this order **-8 => 2 => 4 => 5**  
524 -  
525 -### Redirect  
526 -  
527 -This function will be called when the page of the called route is being searched for. It takes RouteSettings as a result to redirect to. Or give it null and there will be no redirecting.  
528 -  
529 -```dart  
530 -RouteSettings redirect(String route) {  
531 - final authService = Get.find<AuthService>();  
532 - return authService.authed.value ? null : RouteSettings(name: '/login')  
533 -}  
534 -```  
535 -  
536 -### onPageCalled  
537 -  
538 -This function will be called when this Page is called before anything created  
539 -you can use it to change something about the page or give it new page  
540 -  
541 -```dart  
542 -GetPage onPageCalled(GetPage page) {  
543 - final authService = Get.find<AuthService>();  
544 - return page.copyWith(title: 'Welcome ${authService.UserName}');  
545 -}  
546 -```  
547 -  
548 -### OnBindingsStart  
549 -  
550 -This function will be called right before the Bindings are initialize.  
551 -Here you can change Bindings for this page.  
552 -  
553 -```dart  
554 -List<Bindings> onBindingsStart(List<Bindings> bindings) {  
555 - final authService = Get.find<AuthService>();  
556 - if (authService.isAdmin) {  
557 - bindings.add(AdminBinding());  
558 - }  
559 - return bindings;  
560 -}  
561 -```  
562 -  
563 -### OnPageBuildStart  
564 -  
565 -This function will be called right after the Bindings are initialize.  
566 -Here you can do something after that you created the bindings and before creating the page widget.  
567 -  
568 -```dart  
569 -GetPageBuilder onPageBuildStart(GetPageBuilder page) {  
570 - print('bindings are ready');  
571 - return page;  
572 -}  
573 -```  
574 -  
575 -### OnPageBuilt  
576 -  
577 -This function will be called right after the GetPage.page function is called and will give you the result of the function. and take the widget that will be showed.  
578 -  
579 -### OnPageDispose  
580 -  
581 -This function will be called right after disposing all the related objects (Controllers, views, ...) of the page.  
582 -  
583 -## Other Advanced APIs  
584 -  
585 -```dart  
586 -// give the current args from currentScreen  
587 -Get.arguments  
588 -  
589 -// give name of previous route  
590 -Get.previousRoute  
591 -  
592 -// give the raw route to access for example, rawRoute.isFirst()  
593 -Get.rawRoute  
594 -  
595 -// give access to Routing API from GetObserver  
596 -Get.routing  
597 -  
598 -// check if snackbar is open  
599 -Get.isSnackbarOpen  
600 -  
601 -// check if dialog is open  
602 -Get.isDialogOpen  
603 -  
604 -// check if bottomsheet is open  
605 -Get.isBottomSheetOpen  
606 -  
607 -// remove one route.  
608 -Get.removeRoute()  
609 -  
610 -// back repeatedly until the predicate returns true.  
611 -Get.until()  
612 -  
613 -// go to next route and remove all the previous routes until the predicate returns true.  
614 -Get.offUntil()  
615 -  
616 -// go to next named route and remove all the previous routes until the predicate returns true.  
617 -Get.offNamedUntil()  
618 -  
619 -//Check in what platform the app is running  
620 -GetPlatform.isAndroid  
621 -GetPlatform.isIOS  
622 -GetPlatform.isMacOS  
623 -GetPlatform.isWindows  
624 -GetPlatform.isLinux  
625 -GetPlatform.isFuchsia  
626 -  
627 -//Check the device type  
628 -GetPlatform.isMobile  
629 -GetPlatform.isDesktop  
630 -//All platforms are supported independently in web!  
631 -//You can tell if you are running inside a browser  
632 -//on Windows, iOS, OSX, Android, etc.  
633 -GetPlatform.isWeb  
634 -  
635 -  
636 -// Equivalent to : MediaQuery.of(context).size.height,  
637 -// but immutable.  
638 -Get.height  
639 -Get.width  
640 -  
641 -// Gives the current context of the Navigator.  
642 -Get.context  
643 -  
644 -// Gives the context of the snackbar/dialog/bottomsheet in the foreground, anywhere in your code.  
645 -Get.contextOverlay  
646 -  
647 -// Note: the following methods are extensions on context. Since you  
648 -// have access to context in any place of your UI, you can use it anywhere in the UI code  
649 -  
650 -// If you need a changeable height/width (like Desktop or browser windows that can be scaled) you will need to use context.  
651 -context.width  
652 -context.height  
653 -  
654 -// Gives you the power to define half the screen, a third of it and so on.  
655 -// Useful for responsive applications.  
656 -// param dividedBy (double) optional - default: 1  
657 -// param reducedBy (double) optional - default: 0  
658 -context.heightTransformer()  
659 -context.widthTransformer()  
660 -  
661 -/// Similar to MediaQuery.of(context).size  
662 -context.mediaQuerySize()  
663 -  
664 -/// Similar to MediaQuery.of(context).padding  
665 -context.mediaQueryPadding()  
666 -  
667 -/// Similar to MediaQuery.of(context).viewPadding  
668 -context.mediaQueryViewPadding()  
669 -  
670 -/// Similar to MediaQuery.of(context).viewInsets;  
671 -context.mediaQueryViewInsets()  
672 -  
673 -/// Similar to MediaQuery.of(context).orientation;  
674 -context.orientation()  
675 -  
676 -/// Check if device is on landscape mode  
677 -context.isLandscape()  
678 -  
679 -/// Check if device is on portrait mode  
680 -context.isPortrait()  
681 -  
682 -/// Similar to MediaQuery.of(context).devicePixelRatio;  
683 -context.devicePixelRatio()  
684 -  
685 -/// Similar to MediaQuery.of(context).textScaleFactor;  
686 -context.textScaleFactor()  
687 -  
688 -/// Get the shortestSide from screen  
689 -context.mediaQueryShortestSide()  
690 -  
691 -/// True if width be larger than 800  
692 -context.showNavbar()  
693 -  
694 -/// True if the shortestSide is smaller than 600p  
695 -context.isPhone()  
696 -  
697 -/// True if the shortestSide is largest than 600p  
698 -context.isSmallTablet()  
699 -  
700 -/// True if the shortestSide is largest than 720p  
701 -context.isLargeTablet()  
702 -  
703 -/// True if the current device is Tablet  
704 -context.isTablet()  
705 -  
706 -/// Returns a value<T> according to the screen size  
707 -/// can give value for:  
708 -/// watch: if the shortestSide is smaller than 300  
709 -/// mobile: if the shortestSide is smaller than 600  
710 -/// tablet: if the shortestSide is smaller than 1200  
711 -/// desktop: if width is largest than 1200  
712 -context.responsiveValue<T>()  
713 -```  
714 -  
715 -### Optional Global Settings and Manual configurations  
716 -  
717 -GetMaterialApp configures everything for you, but if you want to configure Get manually.  
718 -  
719 -```dart  
720 -MaterialApp(  
721 - navigatorKey: Get.key,  
722 - navigatorObservers: [GetObserver()],  
723 -);  
724 -```  
725 -  
726 -You will also be able to use your own Middleware within `GetObserver`, this will not influence anything.  
727 -  
728 -```dart  
729 -MaterialApp(  
730 - navigatorKey: Get.key,  
731 - navigatorObservers: [  
732 - GetObserver(MiddleWare.observer) // Here  
733 - ],  
734 -);  
735 -```  
736 -  
737 -You can create _Global Settings_ for `Get`. Just add `Get.config` to your code before pushing any route.  
738 -Or do it directly in your `GetMaterialApp`  
739 -  
740 -```dart  
741 -GetMaterialApp(  
742 - enableLog: true,  
743 - defaultTransition: Transition.fade,  
744 - opaqueRoute: Get.isOpaqueRouteDefault,  
745 - popGesture: Get.isPopGestureEnable,  
746 - transitionDuration: Get.defaultDurationTransition,  
747 - defaultGlobalState: Get.defaultGlobalState,  
748 -);  
749 -  
750 -Get.config(  
751 - enableLog = true,  
752 - defaultPopGesture = true,  
753 - defaultTransition = Transitions.cupertino  
754 -)  
755 -```  
756 -  
757 -You can optionally redirect all the logging messages from `Get`.  
758 -If you want to use your own, favourite logging package,  
759 -and want to capture the logs there:  
760 -  
761 -```dart  
762 -GetMaterialApp(  
763 - enableLog: true,  
764 - logWriterCallback: localLogWriter,  
765 -);  
766 -  
767 -void localLogWriter(String text, {bool isError = false}) {  
768 - // pass the message to your favourite logging package here  
769 - // please note that even if enableLog: false log messages will be pushed in this callback  
770 - // you get check the flag if you want through GetConfig.isLogEnable  
771 -}  
772 -  
773 -```  
774 -  
775 -### Local State Widgets  
776 -  
777 -These Widgets allows you to manage a single value, and keep the state ephemeral and locally.  
778 -We have flavours for Reactive and Simple.  
779 -For instance, you might use them to toggle obscureText in a `TextField`, maybe create a custom  
780 -Expandable Panel, or maybe modify the current index in `BottomNavigationBar` while changing the content  
781 -of the body in a `Scaffold`.  
782 -  
783 -#### ValueBuilder  
784 -  
785 -A simplification of `StatefulWidget` that works with a `.setState` callback that takes the updated value.  
786 -  
787 -```dart  
788 -ValueBuilder<bool>(  
789 - initialValue: false,  
790 - builder: (value, updateFn) => Switch(  
791 - value: value,  
792 - onChanged: updateFn, // same signature! you could use ( newValue ) => updateFn( newValue )  
793 - ),  
794 - // if you need to call something outside the builder method.  
795 - onUpdate: (value) => print("Value updated: $value"),  
796 - onDispose: () => print("Widget unmounted"),  
797 -),  
798 -```  
799 -  
800 -#### ObxValue  
801 -  
802 -Similar to [`ValueBuilder`](#valuebuilder), but this is the Reactive version, you pass a Rx instance (remember the magical .obs?) and  
803 -updates automatically... isn't it awesome?  
804 -  
805 -```dart  
806 -ObxValue((data) => Switch(  
807 - value: data.value,  
808 - onChanged: data, // Rx has a _callable_ function! You could use (flag) => data.value = flag,  
809 - ),  
810 - false.obs,  
811 -),  
812 -```  
813 -  
814 -## Useful tips  
815 -  
816 -`.obs`ervables (also known as _Rx_ Types) have a wide variety of internal methods and operators.  
817 -  
818 -> Is very common to _believe_ that a property with `.obs` **IS** the actual value... but make no mistake!  
819 -> We avoid the Type declaration of the variable, because Dart's compiler is smart enough, and the code  
820 -> looks cleaner, but:  
821 -  
822 -```dart  
823 -var message = 'Hello world'.obs;  
824 -print( 'Message "$message" has Type ${message.runtimeType}');  
825 -```  
826 -  
827 -Even if `message` _prints_ the actual String value, the Type is **RxString**!  
828 -  
829 -So, you can't do `message.substring( 0, 4 )`.  
830 -You have to access the real `value` inside the _observable_:  
831 -The most "used way" is `.value`, but, did you know that you can also use...  
832 -  
833 -```dart  
834 -final name = 'GetX'.obs;  
835 -// only "updates" the stream, if the value is different from the current one.  
836 -name.value = 'Hey';  
837 -  
838 -// All Rx properties are "callable" and returns the new value.  
839 -// but this approach does not accepts `null`, the UI will not rebuild.  
840 -name('Hello');  
841 -  
842 -// is like a getter, prints 'Hello'.  
843 -name() ;  
844 -  
845 -/// numbers:  
846 -  
847 -final count = 0.obs;  
848 -  
849 -// You can use all non mutable operations from num primitives!  
850 -count + 1;  
851 -  
852 -// Watch out! this is only valid if `count` is not final, but var  
853 -count += 1;  
854 -  
855 -// You can also compare against values:  
856 -count > 2;  
857 -  
858 -/// booleans:  
859 -  
860 -final flag = false.obs;  
861 -  
862 -// switches the value between true/false  
863 -flag.toggle();  
864 -  
865 -  
866 -/// all types:  
867 -  
868 -// Sets the `value` to null.  
869 -flag.nil();  
870 -  
871 -// All toString(), toJson() operations are passed down to the `value`  
872 -print( count ); // calls `toString()` inside for RxInt  
873 -  
874 -final abc = [0,1,2].obs;  
875 -// Converts the value to a json Array, prints RxList  
876 -// Json is supported by all Rx types!  
877 -print('json: ${jsonEncode(abc)}, type: ${abc.runtimeType}');  
878 -  
879 -// RxMap, RxList and RxSet are special Rx types, that extends their native types.  
880 -// but you can work with a List as a regular list, although is reactive!  
881 -abc.add(12); // pushes 12 to the list, and UPDATES the stream.  
882 -abc[3]; // like Lists, reads the index 3.  
883 -  
884 -  
885 -// equality works with the Rx and the value, but hashCode is always taken from the value  
886 -final number = 12.obs;  
887 -print( number == 12 ); // prints > true  
888 -  
889 -/// Custom Rx Models:  
890 -  
891 -// toJson(), toString() are deferred to the child, so you can implement override on them, and print() the observable directly.  
892 -  
893 -class User {  
894 - String name, last;  
895 - int age;  
896 - User({this.name, this.last, this.age});  
897 -  
898 - @override  
899 - String toString() => '$name $last, $age years old';  
900 -}  
901 -  
902 -final user = User(name: 'John', last: 'Doe', age: 33).obs;  
903 -  
904 -// `user` is "reactive", but the properties inside ARE NOT!  
905 -// So, if we change some variable inside of it...  
906 -user.value.name = 'Roi';  
907 -// The widget will not rebuild!,  
908 -// `Rx` don't have any clue when you change something inside user.  
909 -// So, for custom classes, we need to manually "notify" the change.  
910 -user.refresh();  
911 -  
912 -// or we can use the `update()` method!  
913 -user.update((value){  
914 - value.name='Roi';  
915 -});  
916 -  
917 -print( user );  
918 -```  
919 -## StateMixin  
920 -  
921 -Another way to handle your `UI` state is use the `StateMixin<T>` .  
922 -To implement it, use the `with` to add the `StateMixin<T>`  
923 -to your controller which allows a T model.  
924 -  
925 -``` dart  
926 -class Controller extends GetController with StateMixin<User>{}  
927 -```  
928 -  
929 -The `change()` method change the State whenever we want.  
930 -Just pass the data and the status in this way:  
931 -  
932 -```dart  
933 -change(data, status: RxStatus.success());  
934 -```  
935 -  
936 -RxStatus allow these status:  
937 -  
938 -``` dart  
939 -RxStatus.loading();  
940 -RxStatus.success();  
941 -RxStatus.empty();  
942 -RxStatus.error('message');  
943 -```  
944 -  
945 -To represent it in the UI, use:  
946 -  
947 -```dart  
948 -class OtherClass extends GetView<Controller> {  
949 - @override  
950 - Widget build(BuildContext context) {  
951 - return Scaffold(  
952 -  
953 - body: controller.obx(  
954 - (state)=>Text(state.name),  
955 -  
956 - // here you can put your custom loading indicator, but  
957 - // by default would be Center(child:CircularProgressIndicator())  
958 - onLoading: CustomLoadingIndicator(),  
959 - onEmpty: Text('No data found'),  
960 -  
961 - // here also you can set your own error widget, but by  
962 - // default will be an Center(child:Text(error))  
963 - onError: (error)=>Text(error),  
964 - ),  
965 - );  
966 -}  
967 -```  
968 -  
969 -#### GetView  
970 -  
971 -I love this Widget, is so simple, yet, so useful!  
972 -  
973 -Is a `const Stateless` Widget that has a getter `controller` for a registered `Controller`, that's all.  
974 -  
975 -```dart  
976 - class AwesomeController extends GetController {  
977 - final String title = 'My Awesome View';  
978 - }  
979 -  
980 - // ALWAYS remember to pass the `Type` you used to register your controller!  
981 - class AwesomeView extends GetView<AwesomeController> {  
982 - @override  
983 - Widget build(BuildContext context) {  
984 - return Container(  
985 - padding: EdgeInsets.all(20),  
986 - child: Text(controller.title), // just call `controller.something`  
987 - );  
988 - }  
989 - }  
990 -```  
991 -  
992 -#### GetResponsiveView  
993 -  
994 -Extend this widget to build responsive view.  
995 -this widget contains the `screen` property that have all  
996 -information about the screen size and type.  
997 -  
998 -##### How to use it  
999 -  
1000 -You have two options to build it.  
1001 -  
1002 -- with `builder` method you return the widget to build.  
1003 -- with methods `desktop`, `tablet`,`phone`, `watch`. the specific  
1004 - method will be built when the screen type matches the method  
1005 - when the screen is [ScreenType.Tablet] the `tablet` method  
1006 - will be exuded and so on.  
1007 - **Note:** If you use this method please set the property `alwaysUseBuilder` to `false`  
1008 -  
1009 -With `settings` property you can set the width limit for the screen types.  
1010 -  
1011 -![example](https://github.com/SchabanBo/get_page_example/blob/master/docs/Example.gif?raw=true)  
1012 -Code to this screen  
1013 -[code](https://github.com/SchabanBo/get_page_example/blob/master/lib/pages/responsive_example/responsive_view.dart)  
1014 -  
1015 -#### GetWidget  
1016 -  
1017 -Most people have no idea about this Widget, or totally confuse the usage of it.  
1018 -The use case is very rare, but very specific: It `caches` a Controller.  
1019 -Because of the _cache_, can't be a `const Stateless`.  
1020 -  
1021 -> So, when do you need to "cache" a Controller?  
1022 -  
1023 -If you use, another "not so common" feature of **GetX**: `Get.create()`.  
1024 -  
1025 -`Get.create(()=>Controller())` will generate a new `Controller` each time you call  
1026 -`Get.find<Controller>()`,  
1027 -  
1028 -That's where `GetWidget` shines... as you can use it, for example,  
1029 -to keep a list of Todo items. So, if the widget gets "rebuilt", it will keep the same controller instance.  
1030 -  
1031 -#### GetxService  
1032 -  
1033 -This class is like a `GetxController`, it shares the same lifecycle ( `onInit()`, `onReady()`, `onClose()`).  
1034 -But has no "logic" inside of it. It just notifies **GetX** Dependency Injection system, that this subclass  
1035 -**can not** be removed from memory.  
1036 -  
1037 -So is super useful to keep your "Services" always reachable and active with `Get.find()`. Like:  
1038 -`ApiService`, `StorageService`, `CacheService`.  
1039 -  
1040 -```dart  
1041 -Future<void> main() async {  
1042 - await initServices(); /// AWAIT SERVICES INITIALIZATION.  
1043 - runApp(SomeApp());  
1044 -}  
1045 -  
1046 -/// Is a smart move to make your Services intiialize before you run the Flutter app.  
1047 -/// as you can control the execution flow (maybe you need to load some Theme configuration,  
1048 -/// apiKey, language defined by the User... so load SettingService before running ApiService.  
1049 -/// so GetMaterialApp() doesnt have to rebuild, and takes the values directly.  
1050 -void initServices() async {  
1051 - print('starting services ...');  
1052 - /// Here is where you put get_storage, hive, shared_pref initialization.  
1053 - /// or moor connection, or whatever that's async.  
1054 - await Get.putAsync(() => DbService().init());  
1055 - await Get.putAsync(SettingsService()).init();  
1056 - print('All services started...');  
1057 -}  
1058 -  
1059 -class DbService extends GetxService {  
1060 - Future<DbService> init() async {  
1061 - print('$runtimeType delays 2 sec');  
1062 - await 2.delay();  
1063 - print('$runtimeType ready!');  
1064 - return this;  
1065 - }  
1066 -}  
1067 -  
1068 -class SettingsService extends GetxService {  
1069 - void init() async {  
1070 - print('$runtimeType delays 1 sec');  
1071 - await 1.delay();  
1072 - print('$runtimeType ready!');  
1073 - }  
1074 -}  
1075 -  
1076 -```  
1077 -  
1078 -The only way to actually delete a `GetxService`, is with `Get.reset()` which is like a  
1079 -"Hot Reboot" of your app. So remember, if you need absolute persistence of a class instance during the  
1080 -lifetime of your app, use `GetxService`.  
1081 -  
1082 -# Breaking changes from 2.0  
1083 -  
1084 -1- Rx types:  
1085 -  
1086 -| Before | After |  
1087 -| ------- | ---------- |  
1088 -| StringX | `RxString` |  
1089 -| IntX | `RxInt` |  
1090 -| MapX | `RxMap` |  
1091 -| ListX | `RxList` |  
1092 -| NumX | `RxNum` |  
1093 -| DoubleX | `RxDouble` |  
1094 -  
1095 -RxController and GetBuilder now have merged, you no longer need to memorize which controller you want to use, just use GetxController, it will work for simple state management and for reactive as well.  
1096 -  
1097 -2- NamedRoutes  
1098 -Before:  
1099 -  
1100 -```dart  
1101 -GetMaterialApp(  
1102 - namedRoutes: {  
1103 - '/': GetRoute(page: Home()),  
1104 - }  
1105 -)  
1106 -```  
1107 -  
1108 -Now:  
1109 -  
1110 -```dart  
1111 -GetMaterialApp(  
1112 - getPages: [  
1113 - GetPage(name: '/', page: () => Home()),  
1114 - ]  
1115 -)  
1116 -```  
1117 -  
1118 -Why this change?  
1119 -Often, it may be necessary to decide which page will be displayed from a parameter, or a login token, the previous approach was inflexible, as it did not allow this.  
1120 -Inserting the page into a function has significantly reduced the RAM consumption, since the routes will not be allocated in memory since the app was started, and it also allowed to do this type of approach:  
1121 -  
1122 -```dart  
1123 -  
1124 -GetStorage box = GetStorage();  
1125 -  
1126 -GetMaterialApp(  
1127 - getPages: [  
1128 - GetPage(name: '/', page:(){  
1129 - return box.hasData('token') ? Home() : Login();  
1130 - })  
1131 - ]  
1132 -)  
1133 -```  
1134 -  
1135 -# Why Getx?  
1136 -  
1137 -1- Many times after a Flutter update, many of your packages will break. Sometimes compilation errors happen, errors often appear that there are still no answers about, and the developer needs to know where the error came from, track the error, only then try to open an issue in the corresponding repository, and see its problem solved. Get centralizes the main resources for development (State, dependency and route management), allowing you to add a single package to your pubspec, and start working. After a Flutter update, the only thing you need to do is update the Get dependency, and get to work. Get also resolves compatibility issues. How many times a version of a package is not compatible with the version of another, because one uses a dependency in one version, and the other in another version? This is also not a concern using Get, as everything is in the same package and is fully compatible.  
1138 -  
1139 -2- Flutter is easy, Flutter is incredible, but Flutter still has some boilerplate that may be unwanted for most developers, such as `Navigator.of(context).push (context, builder [...]`. Get simplifies development. Instead of writing 8 lines of code to just call a route, you can just do it: `Get.to(Home())` and you're done, you'll go to the next page. Dynamic web urls are a really painful thing to do with Flutter currently, and that with GetX is stupidly simple. Managing states in Flutter, and managing dependencies is also something that generates a lot of discussion, as there are hundreds of patterns in the pub. But there is nothing as easy as adding a ".obs" at the end of your variable, and place your widget inside an Obx, and that's it, all updates to that variable will be automatically updated on the screen.  
1140 -  
1141 -3- Ease without worrying about performance. Flutter's performance is already amazing, but imagine that you use a state manager, and a locator to distribute your blocs/stores/controllers/ etc. classes. You will have to manually call the exclusion of that dependency when you don't need it. But have you ever thought of simply using your controller, and when it was no longer being used by anyone, it would simply be deleted from memory? That's what GetX does. With SmartManagement, everything that is not being used is deleted from memory, and you shouldn't have to worry about anything but programming. You will be assured that you are consuming the minimum necessary resources, without even having created a logic for this.  
1142 -  
1143 -4- Actual decoupling. You may have heard the concept "separate the view from the business logic". This is not a peculiarity of BLoC, MVC, MVVM, and any other standard on the market has this concept. However, this concept can often be mitigated in Flutter due to the use of context.  
1144 -If you need context to find an InheritedWidget, you need it in the view, or pass the context by parameter. I particularly find this solution very ugly, and to work in teams we will always have a dependence on View's business logic. Getx is unorthodox with the standard approach, and while it does not completely ban the use of StatefulWidgets, InitState, etc., it always has a similar approach that can be cleaner. Controllers have life cycles, and when you need to make an APIREST request for example, you don't depend on anything in the view. You can use onInit to initiate the http call, and when the data arrives, the variables will be populated. As GetX is fully reactive (really, and works under streams), once the items are filled, all widgets that use that variable will be automatically updated in the view. This allows people with UI expertise to work only with widgets, and not have to send anything to business logic other than user events (like clicking a button), while people working with business logic will be free to create and test the business logic separately.  
1145 -  
1146 -This library will always be updated and implementing new features. Feel free to offer PRs and contribute to them.  
1147 -  
1148 -# Community  
1149 -  
1150 -## Community channels  
1151 -  
1152 -GetX has a highly active and helpful community. If you have questions, or would like any assistance regarding the use of this framework, please join our community channels, your question will be answered more quickly, and it will be the most suitable place. This repository is exclusive for opening issues, and requesting resources, but feel free to be part of GetX Community.  
1153 -  
1154 -| **Slack** | **Discord** | **Telegram** |  
1155 -| :-------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------- |  
1156 -| [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://communityinviter.com/apps/getxworkspace/getx) | [![Discord Shield](https://img.shields.io/discord/722900883784073290.svg?logo=discord)](https://discord.com/invite/9Hpt99N) | [![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/joinchat/PhdbJRmsZNpAqSLJL6bH7g) |  
1157 -  
1158 -## How to contribute  
1159 -  
1160 -_Want to contribute to the project? We will be proud to highlight you as one of our collaborators. Here are some points where you can contribute and make Get (and Flutter) even better._  
1161 -  
1162 -- Helping to translate the readme into other languages.  
1163 -- Adding documentation to the readme (a lot of Get's functions haven't been documented yet).  
1164 -- Write articles or make videos teaching how to use Get (they will be inserted in the Readme and in the future in our Wiki).  
1165 -- Offering PRs for code/tests.  
1166 -- Including new functions.  
1167 -  
1168 -Any contribution is welcome!  
1169 -  
1170 -## Articles and videos  
1171 -  
1172 -- [Flutter Getx EcoSystem package for arabic people](https://www.youtube.com/playlist?list=PLV1fXIAyjeuZ6M8m56zajMUwu4uE3-SL0) - Tutorial by [Pesa Coder](https://github.com/UsamaElgendy).  
1173 -- [Dynamic Themes in 3 lines using GetX™](https://medium.com/swlh/flutter-dynamic-themes-in-3-lines-c3b375f292e3) - Tutorial by [Rod Brown](https://github.com/RodBr).  
1174 -- [Complete GetX™ Navigation](https://www.youtube.com/watch?v=RaqPIoJSTtI) - Route management video by Amateur Coder.  
1175 -- [Complete GetX State Management](https://www.youtube.com/watch?v=CNpXbeI_slw) - Quản lý State video by Amateur Coder.  
1176 -- [GetX™ Other Features](https://youtu.be/ttQtlX_Q0eU) - Utils, storage, bindings and other features video by Amateur Coder.  
1177 -- [Firestore User with GetX | Todo App](https://www.youtube.com/watch?v=BiV0DcXgk58) - Video by Amateur Coder.  
1178 -- [Firebase Auth with GetX | Todo App](https://www.youtube.com/watch?v=-H-T_BSgfOE) - Video by Amateur Coder.  
1179 -- [The Flutter GetX™ Ecosystem ~ State Management](https://medium.com/flutter-community/the-flutter-getx-ecosystem-state-management-881c7235511d) - Quản lý State by [Aachman Garg](https://github.com/imaachman).  
1180 -- [The Flutter GetX™ Ecosystem ~ Dependency Injection](https://medium.com/flutter-community/the-flutter-getx-ecosystem-dependency-injection-8e763d0ec6b9) - Dependency Injection by [Aachman Garg](https://github.com/imaachman).  
1181 -- [GetX, the all-in-one Flutter package](https://www.youtube.com/watch?v=IYQgtu9TM74) - A brief tutorial covering State Management and Navigation by Thad Carnevalli.  
1182 -- [Build a To-do List App from scratch using Flutter and GetX](https://www.youtube.com/watch?v=EcnqFasHf18) - UI + State Management + Storage video by Thad Carnevalli.  
1183 -- [GetX Flutter Firebase Auth Example](https://medium.com/@jeffmcmorris/getx-flutter-firebase-auth-example-b383c1dd1de2) - Article by Jeff McMorris.  
1184 -- [Flutter State Management with GetX – Complete App](https://www.appwithflutter.com/flutter-state-management-with-getx/) - by App With Flutter.  
1185 -- [Flutter Routing with Animation using Get Package](https://www.appwithflutter.com/flutter-routing-using-get-package/) - by App With Flutter.  
1186 -- [A minimal example on dartpad](https://dartpad.dev/2b3d0d6f9d4e312c5fdbefc414c1727e?) - by [Roi Peker](https://github.com/roipeker)