CpdnCristiano

Add example de trPlural

Showing 1 changed file with 17 additions and 6 deletions
@@ -83,7 +83,7 @@ @@ -83,7 +83,7 @@
83 - 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. 83 - 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.
84 84
85 - 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. 85 - 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.
86 -**It is possible to fully reuse your code made on the frontend on your backend with [Get Server](https://github.com/jonataslaw/get_server)**. 86 + **It is possible to fully reuse your code made on the frontend on your backend with [Get Server](https://github.com/jonataslaw/get_server)**.
87 87
88 **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)**. 88 **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)**.
89 89
@@ -341,6 +341,13 @@ Just append `.tr` to the specified key and it will be translated, using the curr @@ -341,6 +341,13 @@ Just append `.tr` to the specified key and it will be translated, using the curr
341 Text('title'.tr); 341 Text('title'.tr);
342 ``` 342 ```
343 343
  344 +#### Using translation with singular and plural
  345 +
  346 +```dart
  347 +var products = [];
  348 +Text('singularKey'.trPlural('pluralKey', products.length, Args));
  349 +```
  350 +
344 ### Locales 351 ### Locales
345 352
346 Pass parameters to `GetMaterialApp` to define the locale and translations. 353 Pass parameters to `GetMaterialApp` to define the locale and translations.
@@ -394,9 +401,11 @@ Get.changeTheme(Get.isDarkMode? ThemeData.light(): ThemeData.dark()); @@ -394,9 +401,11 @@ Get.changeTheme(Get.isDarkMode? ThemeData.light(): ThemeData.dark());
394 When `.darkmode` is activated, it will switch to the _light theme_, and when the _light theme_ becomes active, it will change to _dark theme_. 401 When `.darkmode` is activated, it will switch to the _light theme_, and when the _light theme_ becomes active, it will change to _dark theme_.
395 402
396 ## GetConnect 403 ## GetConnect
  404 +
397 GetConnect is an easy way to communicate from your back to your front with http or websockets 405 GetConnect is an easy way to communicate from your back to your front with http or websockets
398 406
399 ### Default configuration 407 ### Default configuration
  408 +
400 You can simply extend GetConnect and use the GET/POST/PUT/DELETE/SOCKET methods to communicate with your Rest API or websockets. 409 You can simply extend GetConnect and use the GET/POST/PUT/DELETE/SOCKET methods to communicate with your Rest API or websockets.
401 410
402 ```dart 411 ```dart
@@ -419,7 +428,9 @@ class UserProvider extends GetConnect { @@ -419,7 +428,9 @@ class UserProvider extends GetConnect {
419 } 428 }
420 } 429 }
421 ``` 430 ```
  431 +
422 ### Custom configuration 432 ### Custom configuration
  433 +
423 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. 434 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.
424 435
425 ```dart 436 ```dart
@@ -485,6 +496,7 @@ final middlewares = [ @@ -485,6 +496,7 @@ final middlewares = [
485 GetMiddleware(priority: -8), 496 GetMiddleware(priority: -8),
486 ]; 497 ];
487 ``` 498 ```
  499 +
488 those middlewares will be run in this order **-8 => 2 => 4 => 5** 500 those middlewares will be run in this order **-8 => 2 => 4 => 5**
489 501
490 ### Redirect 502 ### Redirect
@@ -917,10 +929,10 @@ You have two options to build it. @@ -917,10 +929,10 @@ You have two options to build it.
917 929
918 - with `builder` method you return the widget to build. 930 - with `builder` method you return the widget to build.
919 - with methods `desktop`, `tablet`,`phone`, `watch`. the specific 931 - with methods `desktop`, `tablet`,`phone`, `watch`. the specific
920 -method will be built when the screen type matches the method  
921 -when the screen is [ScreenType.Tablet] the `tablet` method  
922 -will be exuded and so on.  
923 -**Note:** If you use this method please set the property `alwaysUseBuilder` to `false` 932 + method will be built when the screen type matches the method
  933 + when the screen is [ScreenType.Tablet] the `tablet` method
  934 + will be exuded and so on.
  935 + **Note:** If you use this method please set the property `alwaysUseBuilder` to `false`
924 936
925 With `settings` property you can set the width limit for the screen types. 937 With `settings` property you can set the width limit for the screen types.
926 938
@@ -1098,4 +1110,3 @@ Any contribution is welcome! @@ -1098,4 +1110,3 @@ Any contribution is welcome!
1098 - [GetX Flutter Firebase Auth Example](https://medium.com/@jeffmcmorris/getx-flutter-firebase-auth-example-b383c1dd1de2) - Article by Jeff McMorris. 1110 - [GetX Flutter Firebase Auth Example](https://medium.com/@jeffmcmorris/getx-flutter-firebase-auth-example-b383c1dd1de2) - Article by Jeff McMorris.
1099 - [Flutter State Management with GetX – Complete App](https://www.appwithflutter.com/flutter-state-management-with-getx/) - by App With Flutter. 1111 - [Flutter State Management with GetX – Complete App](https://www.appwithflutter.com/flutter-state-management-with-getx/) - by App With Flutter.
1100 - [Flutter Routing with Animation using Get Package](https://www.appwithflutter.com/flutter-routing-using-get-package/) - by App With Flutter. 1112 - [Flutter Routing with Animation using Get Package](https://www.appwithflutter.com/flutter-routing-using-get-package/) - by App With Flutter.
1101 -