Showing
1 changed file
with
10 additions
and
11 deletions
| @@ -254,43 +254,42 @@ Get.offAll(NextScreen()); | @@ -254,43 +254,42 @@ Get.offAll(NextScreen()); | ||
| 254 | 254 | ||
| 255 | ### Подробнее об управлении маршрутами | 255 | ### Подробнее об управлении маршрутами | 
| 256 | 256 | ||
| 257 | -**Начните работать с именованными маршрутами, а также предложите более низкий уровень контроля над вашими маршрутами! [Здесь](./documentation/ru_RU/route_management.md) есть подробная документация.** | 257 | +**Get работает с именованными маршрутами, а также предлагает более низкий уровень контроля над вашими маршрутами! [Здесь](./documentation/ru_RU/route_management.md) есть подробная документация.** | 
| 258 | 258 | ||
| 259 | -## Dependency management | 259 | +## Внедрение зависимостей | 
| 260 | 260 | ||
| 261 | -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: | 261 | +Get имеет простой и мощный менеджер зависимостей, который позволяет вам получить тот же класс, что и ваш BLoC или контроллер, всего одной строкой кода, без Provider context, без InheritedWidget: | 
| 262 | 262 | ||
| 263 | ```dart | 263 | ```dart | 
| 264 | Controller controller = Get.put(Controller()); // Rather Controller controller = Controller(); | 264 | Controller controller = Get.put(Controller()); // Rather Controller controller = Controller(); | 
| 265 | ``` | 265 | ``` | 
| 266 | 266 | ||
| 267 | -- Note: If you are using Get's State Manager, pay more attention to the bindings api, which will make easier to connect your view to your controller. | 267 | +- Примечание: Если вы используете Get State Manager, обратите больше внимания на API привязок, который упростит подключение вашего представления к контроллеру. | 
| 268 | 268 | ||
| 269 | -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. | ||
| 270 | -So you can use your controller (or class Bloc) normally | 269 | +Вместо того, чтобы создавать экземпляр вашего класса внутри класса, который вы используете, вы создаете его в экземпляре Get, что сделает его доступным во всем приложении. Таким образом, вы можете использовать свой контроллер (или BLoC) в обычном режиме. | 
| 271 | 270 | ||
| 272 | -**Tip:** Get dependency management is decloupled 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 | 271 | +**Совет:** Управление зависимостями Get не связано с другими частями пакета, поэтому, если, например, ваше приложение уже использует менеджер состояний (любой, не имеет значения), вам не нужно все это переписывать, вы можете использовать это внедрение зависимостей без проблем. | 
| 273 | 272 | ||
| 274 | ```dart | 273 | ```dart | 
| 275 | controller.fetchApi(); | 274 | controller.fetchApi(); | 
| 276 | ``` | 275 | ``` | 
| 277 | 276 | ||
| 278 | -Imagine that you have navigated through numerous routes, and you need a 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: | 277 | +Представьте, что вы прошли через множество маршрутов и вам нужны данные, которые остались в вашем контроллере, вам понадобится менеджер состояний в сочетании с Provider или Get_it, верно? Только не с Get. Вам просто нужно попросить Get «найти» ваш контроллер, никаких дополнительных зависимостей вам не потребуется: | 
| 279 | 278 | ||
| 280 | ```dart | 279 | ```dart | 
| 281 | Controller controller = Get.find(); | 280 | Controller controller = Get.find(); | 
| 282 | //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. | 281 | //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. | 
| 283 | ``` | 282 | ``` | 
| 284 | 283 | ||
| 285 | -And then you will be able to recover your controller data that was obtained back there: | 284 | +И тогда вы сможете восстановить данные вашего контроллера, которые были там получены: | 
| 286 | 285 | ||
| 287 | ```dart | 286 | ```dart | 
| 288 | Text(controller.textFromApi); | 287 | Text(controller.textFromApi); | 
| 289 | ``` | 288 | ``` | 
| 290 | 289 | ||
| 291 | -### More details about dependency management | 290 | +### Подробнее о внедрении зависимостей | 
| 292 | 291 | ||
| 293 | -**See a more in-depth explanation of dependency management [here](./documentation/en_US/dependency_management.md)** | 292 | +**Более подробное объяснение управления зависимостями [здесь](./documentation/ru_RU/dependency_management.md)** | 
| 294 | 293 | ||
| 295 | # Utils | 294 | # Utils | 
| 296 | 295 | 
- 
Please register or login to post a comment