kamazoun

#25 in README-fr.md

@@ -57,12 +57,12 @@ @@ -57,12 +57,12 @@
57 - [Guide d'utilisation](#guide-d-utilisation) 57 - [Guide d'utilisation](#guide-d-utilisation)
58 - [GetWidget](#getwidget) 58 - [GetWidget](#getwidget)
59 - [GetxService](#getxservice) 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) 60 +- [Changements par rapport à 2.0](#changements-par-rapport-a-20)
  61 +- [Pourquoi Getx?](#pourquoi-getx)
  62 +- [Communité](#communite)
  63 + - [Chaînes communautaires](#chaines-communautaires)
  64 + - [Comment contribuer](#comment-contribuer)
  65 + - [Articles et videos](#articles-et-videos)
66 66
67 # A Propos de Get 67 # A Propos de Get
68 68
@@ -946,93 +946,91 @@ informations sur la taille et le type de l'écran. @@ -946,93 +946,91 @@ informations sur la taille et le type de l'écran.
946 946
947 ##### Guide d utilisation 947 ##### Guide d utilisation
948 948
949 -You have two options to build it. 949 +Vous avez deux options pour le créer:
950 950
951 -- with `builder` method you return the widget to build.  
952 -- with methods `desktop`, `tablet`,`phone`, `watch`. the specific  
953 - method will be built when the screen type matches the method  
954 - when the screen is [ScreenType.Tablet] the `tablet` method  
955 - will be exuded and so on.  
956 - **Note:** If you use this method please set the property `alwaysUseBuilder` to `false` 951 +- avec la méthode `builder` vous renvoyez le widget à construire.
  952 +- avec les méthodes `desktop`,` tablet`, `phone`,` watch`. la méthode spécifique sera exécutée lorsque le type d'écran correspond à la méthode.
  953 + Lorsque l'écran est [ScreenType.Tablet], la méthode `tablet` sera exécutée et ainsi de suite.
  954 + **Note:** Si vous utilisez cette méthode, veuillez définir la propriété `alwaysUseBuilder` à `false`
957 955
958 -With `settings` property you can set the width limit for the screen types. 956 +Avec la propriété `settings`, vous pouvez définir la limite de largeur pour les types d'écran.
959 957
960 -![example](https://github.com/SchabanBo/get_page_example/blob/master/docs/Example.gif?raw=true)  
961 -Code to this screen 958 +![exemple](https://github.com/SchabanBo/get_page_example/blob/master/docs/Example.gif?raw=true)
  959 +Code pour cet écran
962 [code](https://github.com/SchabanBo/get_page_example/blob/master/lib/pages/responsive_example/responsive_view.dart) 960 [code](https://github.com/SchabanBo/get_page_example/blob/master/lib/pages/responsive_example/responsive_view.dart)
963 961
964 #### GetWidget 962 #### GetWidget
965 963
966 -Most people have no idea about this Widget, or totally confuse the usage of it.  
967 -The use case is very rare, but very specific: It `caches` a Controller.  
968 -Because of the _cache_, can't be a `const Stateless`. 964 +La plupart des gens n'ont aucune idée de ce widget ou confondent totalement son utilisation.
  965 +Le cas d'utilisation est très rare, mais très spécifique: il `met en cache` un contrôleur.
  966 +En raison du _cache_, ne peut pas être un `const Stateless`.
969 967
970 -> So, when do you need to "cache" a Controller? 968 +> Alors, quand avez-vous besoin de "mettre en cache" un contrôleur?
971 969
972 -If you use, another "not so common" feature of **GetX**: `Get.create()`. 970 +Si vous utilisez, une autre fonctionnalité "pas si courante" de **GetX**: `Get.create ()`.
973 971
974 -`Get.create(()=>Controller())` will generate a new `Controller` each time you call  
975 -`Get.find<Controller>()`, 972 +`Get.create(()=>Controller())` générera un nouveau `Controller` chaque fois que vous appelez
  973 +`Get.find<Controller>()`.
976 974
977 -That's where `GetWidget` shines... as you can use it, for example,  
978 -to keep a list of Todo items. So, if the widget gets "rebuilt", it will keep the same controller instance. 975 +C'est là que `GetWidget` brille ... comme vous pouvez l'utiliser, par exemple,
  976 +pour conserver une liste de <Todo>s. Donc, si le widget est "reconstruit", il conservera la même instance de contrôleur.
979 977
980 #### GetxService 978 #### GetxService
981 979
982 -This class is like a `GetxController`, it shares the same lifecycle ( `onInit()`, `onReady()`, `onClose()`).  
983 -But has no "logic" inside of it. It just notifies **GetX** Dependency Injection system, that this subclass  
984 -**can not** be removed from memory. 980 +Cette classe est comme un `GetxController`, elle partage le même cycle de vie ( `onInit()`, `onReady()`, `onClose()`), mais n'a pas de "logique" en elle.
  981 +Il notifie simplement le **GetX** Dependency Injection system, que cette sous-classe
  982 +**ne peut pas** être supprimé de la mémoire.
985 983
986 -So is super useful to keep your "Services" always reachable and active with `Get.find()`. Like:  
987 -`ApiService`, `StorageService`, `CacheService`. 984 +Donc est très utile pour garder vos "Services" toujours à portée de main et actifs avec `Get.find()`. Comme:
  985 +`ServiceAPI`, `ServiceDeSauvegarde`, `ServiceDeCaching`.
988 986
989 ```dart 987 ```dart
990 Future<void> main() async { 988 Future<void> main() async {
991 - await initServices(); /// AWAIT SERVICES INITIALIZATION. 989 + await initServices(); /// Attend l'initialisation des services.
992 runApp(SomeApp()); 990 runApp(SomeApp());
993 } 991 }
994 992
995 -/// Is a smart move to make your Services intiialize before you run the Flutter app.  
996 -/// as you can control the execution flow (maybe you need to load some Theme configuration,  
997 -/// apiKey, language defined by the User... so load SettingService before running ApiService.  
998 -/// so GetMaterialApp() doesnt have to rebuild, and takes the values directly. 993 +/// Est une démarche intelligente pour que vos services s'initialisent avant d'exécuter l'application Flutter.
  994 +/// car vous pouvez contrôler le flux d'exécution (peut-être devez-vous charger une configuration de thème,
  995 +/// apiKey, langue définie par l'utilisateur ... donc chargez SettingService avant d'exécuter ApiService.
  996 +/// donc GetMaterialApp () n'a pas besoin de se reconstruire et prend les valeurs directement.
999 void initServices() async { 997 void initServices() async {
1000 print('starting services ...'); 998 print('starting services ...');
1001 - /// Here is where you put get_storage, hive, shared_pref initialization.  
1002 - /// or moor connection, or whatever that's async. 999 + /// C'est ici que vous mettez get_storage, hive, shared_pref initialization.
  1000 + /// ou les connexions moor, ou autres choses async.
1003 await Get.putAsync(() => DbService().init()); 1001 await Get.putAsync(() => DbService().init());
1004 await Get.putAsync(SettingsService()).init(); 1002 await Get.putAsync(SettingsService()).init();
1005 - print('All services started...'); 1003 + print('Tous les services ont démarré...');
1006 } 1004 }
1007 1005
1008 class DbService extends GetxService { 1006 class DbService extends GetxService {
1009 Future<DbService> init() async { 1007 Future<DbService> init() async {
1010 - print('$runtimeType delays 2 sec'); 1008 + print('$runtimeType retarde de 2 sec');
1011 await 2.delay(); 1009 await 2.delay();
1012 - print('$runtimeType ready!'); 1010 + print('$runtimeType prêts!');
1013 return this; 1011 return this;
1014 } 1012 }
1015 } 1013 }
1016 1014
1017 class SettingsService extends GetxService { 1015 class SettingsService extends GetxService {
1018 void init() async { 1016 void init() async {
1019 - print('$runtimeType delays 1 sec'); 1017 + print("$runtimeType retarde d'1 sec");
1020 await 1.delay(); 1018 await 1.delay();
1021 - print('$runtimeType ready!'); 1019 + print('$runtimeType prêts!');
1022 } 1020 }
1023 } 1021 }
1024 1022
1025 ``` 1023 ```
1026 1024
1027 -The only way to actually delete a `GetxService`, is with `Get.reset()` which is like a  
1028 -"Hot Reboot" of your app. So remember, if you need absolute persistence of a class instance during the  
1029 -lifetime of your app, use `GetxService`. 1025 +La seule façon de supprimer réellement un `GetxService`, est d'utiliser` Get.reset () `qui est comme un
  1026 +"Hot Reboot" de votre application. N'oubliez donc pas que si vous avez besoin d'une persistance absolue d'une instance de classe
  1027 +durée de vie de votre application, utilisez `GetxService`.
1030 1028
1031 -# Breaking changes from 2.0 1029 +# Changements par rapport a 2.0
1032 1030
1033 -1- Rx types: 1031 +1- Types Rx:
1034 1032
1035 -| Before | After | 1033 +| Avant | Après |
1036 | ------- | ---------- | 1034 | ------- | ---------- |
1037 | StringX | `RxString` | 1035 | StringX | `RxString` |
1038 | IntX | `RxInt` | 1036 | IntX | `RxInt` |
@@ -1041,10 +1039,12 @@ lifetime of your app, use `GetxService`. @@ -1041,10 +1039,12 @@ lifetime of your app, use `GetxService`.
1041 | NumX | `RxNum` | 1039 | NumX | `RxNum` |
1042 | DoubleX | `RxDouble` | 1040 | DoubleX | `RxDouble` |
1043 1041
1044 -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. 1042 +RxController et GetBuilder ont maintenant fusionné, vous n'avez plus besoin de mémoriser le contrôleur que vous souhaitez utiliser, utilisez simplement GetxController, cela fonctionnera pour une gestion simple de l'état et également pour la réactivité.
  1043 +
1045 1044
1046 2- NamedRoutes 1045 2- NamedRoutes
1047 -Before: 1046 +
  1047 +Avant:
1048 1048
1049 ```dart 1049 ```dart
1050 GetMaterialApp( 1050 GetMaterialApp(
@@ -1054,7 +1054,7 @@ GetMaterialApp( @@ -1054,7 +1054,7 @@ GetMaterialApp(
1054 ) 1054 )
1055 ``` 1055 ```
1056 1056
1057 -Now: 1057 +Maintenant:
1058 1058
1059 ```dart 1059 ```dart
1060 GetMaterialApp( 1060 GetMaterialApp(
@@ -1064,10 +1064,9 @@ GetMaterialApp( @@ -1064,10 +1064,9 @@ GetMaterialApp(
1064 ) 1064 )
1065 ``` 1065 ```
1066 1066
1067 -Why this change?  
1068 -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.  
1069 -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:  
1070 - 1067 +Pourquoi ce changement?
  1068 +Souvent, il peut être nécessaire de décider quelle page sera affichée à partir d'un paramètre, ou d'un 'login token', l'approche précédente était inflexible, car elle ne le permettait pas.
  1069 +L'insertion de la page dans une fonction a considérablement réduit la consommation de RAM, puisque les routes ne seront pas allouées en mémoire depuis le démarrage de l'application, et cela a également permis de faire ce type d'approche:
1071 ```dart 1070 ```dart
1072 1071
1073 GetStorage box = GetStorage(); 1072 GetStorage box = GetStorage();
@@ -1081,42 +1080,41 @@ GetMaterialApp( @@ -1081,42 +1080,41 @@ GetMaterialApp(
1081 ) 1080 )
1082 ``` 1081 ```
1083 1082
1084 -# Why Getx?  
1085 -  
1086 -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. 1083 +# Pourquoi Getx?
1087 1084
1088 -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. 1085 +1- Plusieurs fois après une mise à jour de Flutter, plusieurs de vos packages seront invalides. Parfois, des erreurs de compilation se produisent, des erreurs apparaissent souvent pour lesquelles il n'y a toujours pas de réponses, et le développeur doit savoir d'où vient l'erreur, suivre l'erreur, puis seulement essayer d'ouvrir un problème dans le référentiel correspondant et voir son problème résolu. Get centralise les principales ressources pour le développement (gestion des états, des dépendances et des routes), vous permettant d'ajouter un package unique à votre pubspec et de commencer à travailler. Après une mise à jour Flutter, la seule chose à faire est de mettre à jour la dépendance Get et de vous mettre au travail. Get résout également les problèmes de compatibilité. Combien de fois une version d'un package n'est pas compatible avec la version d'un autre, parce que l'une utilise une dépendance dans une version et l'autre dans une autre version? Ce n'est pas non plus un problème avec Get, car tout est dans le même package et est entièrement compatible.
1089 1086
1090 -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. 1087 +2- Flutter est facile, Flutter est incroyable, mais Flutter a encore quelques règles standard qui peuvent être indésirables pour la plupart des développeurs, comme `Navigator.of (context) .push (context, builder [...]`. Get simplifie le développement. Au lieu de écrire 8 lignes de code pour simplement appeler une route, vous pouvez simplement le faire: `Get.to (Home ())` et vous avez terminé, vous passerez à la page suivante. Les URL Web dynamiques sont une chose vraiment pénible à voir avec Flutter actuellement, et cela avec GetX est stupidement simple. La gestion des états dans Flutter et la gestion des dépendances sont également quelque chose qui génère beaucoup de discussions, car il y a des centaines de modèles dans la pub. Mais rien n'est aussi simple que d'ajouter un ".obs" à la fin de votre variable, et placez votre widget dans un Obx, et c'est tout, toutes les mises à jour de cette variable seront automatiquement mises à jour à l'écran.
1091 1088
1092 -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.  
1093 -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. 1089 +3- Facilité sans vous soucier des performances. Les performances de Flutter sont déjà étonnantes, mais imaginez que vous utilisez un gestionnaire d'état et un localisateur pour distribuer vos classes blocs / stores / contrôleurs / etc. Vous devrez appeler manuellement l'exclusion de cette dépendance lorsque vous n'en avez pas besoin. Mais avez-vous déjà pensé à simplement utiliser votre «contrôleur», et quand il n'était plus utilisé par personne, il serait simplement supprimé de la mémoire? C'est ce que fait GetX. Avec SmartManagement, tout ce qui n'est pas utilisé est supprimé de la mémoire et vous ne devriez pas avoir à vous soucier d'autre chose que de la programmation. Vous serez assuré de consommer le minimum de ressources nécessaires, sans même avoir créé de logique pour cela.
1094 1090
1095 -This library will always be updated and implementing new features. Feel free to offer PRs and contribute to them. 1091 +4- Découplage réel. Vous avez peut-être entendu le concept "séparer la vue de la business logic". Ce n'est pas une particularité de BLoC, MVC, MVVM, et tout autre standard sur le marché a ce concept. Cependant, ce concept peut souvent être atténué dans Flutter en raison de l'utilisation de «context».
  1092 + Si vous avez besoin de contexte pour trouver un InheritedWidget, vous en avez besoin dans la vue, ou passez le «context» par paramètre. Je trouve particulièrement cette solution très moche, et pour travailler en équipe, nous serons toujours dépendants de la 'business logic' de View. Getx n'est pas orthodoxe avec l'approche standard, et même s'il n'interdit pas complètement l'utilisation de StatefulWidgets, InitState, etc., il a toujours une approche similaire qui peut être plus propre. Les contrôleurs ont des cycles de vie, et lorsque vous devez faire une requête APIREST par exemple, vous ne dépendez de rien de la vue. Vous pouvez utiliser onInit pour lancer l'appel http et lorsque les données arrivent, les variables sont remplies. Comme GetX est totalement réactif (vraiment, et fonctionne sous streams), une fois les éléments remplis, tous les widgets qui utilisent cette variable seront automatiquement mis à jour dans la vue.
  1093 + Cela permet aux personnes ayant une expertise de l'interface utilisateur de travailler uniquement avec des widgets et de ne pas avoir à envoyer quoi que ce soit à la business logic autre que des événements utilisateur (comme cliquer sur un bouton), tandis que les personnes travaillant avec la business logic seront libres de créer et de tester la Business logic séparément.
1096 1094
1097 -# Community  
1098 1095
1099 -## Community channels 1096 +# Communite
1100 1097
1101 -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. 1098 +## Chaines communautaires
1102 1099
  1100 +GetX a une communauté très active et utile. Si vous avez des questions, ou souhaitez obtenir de l'aide concernant l'utilisation de ce framework, veuillez rejoindre nos canaux communautaires, votre question sera répondue plus rapidement, et ce sera l'endroit le plus approprié. Ce référentiel est exclusif pour l'ouverture des issues Github et la demande de ressources, mais n'hésitez pas à faire partie de la communauté GetX.
1103 | **Slack** | **Discord** | **Telegram** | 1101 | **Slack** | **Discord** | **Telegram** |
1104 | :-------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------- | 1102 | :-------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------- |
1105 -| [![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) | 1103 +| [![Get sur 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) |
1106 1104
1107 -## How to contribute 1105 +## Comment contribuer
1108 1106
1109 -_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._ 1107 +_Voulez-vous contribuer au projet? Nous serons fiers de vous mettre en avant comme l'un de nos collaborateurs. Voici quelques points sur lesquels vous pouvez contribuer et améliorer encore Get (et Flutter)._
1110 1108
1111 -- Helping to translate the readme into other languages.  
1112 -- Adding documentation to the readme (a lot of Get's functions haven't been documented yet).  
1113 -- Write articles or make videos teaching how to use Get (they will be inserted in the Readme and in the future in our Wiki).  
1114 -- Offering PRs for code/tests.  
1115 -- Including new functions. 1109 +- Aider à traduire les 'Readme's dans d'autres langues.
  1110 +- Ajout de documentation au readme (beaucoup de fonctions de Get n'ont pas encore été documentées).
  1111 +- Rédiger des articles ou réaliser des vidéos pour apprendre à utiliser Get (ils seront insérés dans le Readme et à l'avenir dans notre Wiki).
  1112 +- Offrir des PRs pour code / tests.
  1113 +- Ajouter de nouvelles fonctions.
1116 1114
1117 -Any contribution is welcome! 1115 +Toute contribution est bienvenue!
1118 1116
1119 -## Articles and videos 1117 +## Articles et videos
1120 1118
1121 - [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). 1119 - [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).
1122 - [Complete GetX™ Navigation](https://www.youtube.com/watch?v=RaqPIoJSTtI) - Route management video by Amateur Coder. 1120 - [Complete GetX™ Navigation](https://www.youtube.com/watch?v=RaqPIoJSTtI) - Route management video by Amateur Coder.