Navigate to new screen with name. See more details on named routes [here](./documentation/en_US/route_management.md#navigation-with-named-routes)
명칭으로 새로운 화면으로 이동합니다. 명칭으로 라우트하는 더 자세한 사항은 [여기](./documentation/en_US/route_management.md#navigation-with-named-routes) 있습니다.
```dart
Get.toNamed('/details');
```
To close snackbars, dialogs, bottomsheets, or anything you would normally close with Navigator.pop(context);
스낵바, 다이얼로그, bottomsheets 또는 Navigator.pop(context);로 닫아야 하는 어떤것도 닫게 합니다:
```dart
Get.back();
```
To go to the next screen and no option to go back to the previous screen (for use in SplashScreens, login screens and etc.)
다음 화면으로 이동하고 이전 화면으로 돌아갈 필요가 없는 경우 (스플래시, 로그인화면 등..)
```dart
Get.off(NextScreen());
```
To go to the next screen and cancel all previous routes (useful in shopping carts, polls, and tests)
다음 화면으로 이동하고 이전 화면들 모두 닫는 경우 (쇼핑카트, 투표, 테스트에 유용)
```dart
Get.offAll(NextScreen());
```
Noticed that you didn't had 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.
이러한 작업을 수행하기 위해 컨텍스트를 사용할 필요가 없다는 것을 보셨나요? 이것이 Get 라우트 관리를 사용하는 가장 큰 장점 중 하나입니다. 이를 통해 걱정없이 컨트롤러 클래스 내에서 이러한 모든 메서드를 실행할 수 있습니다.
### 라우트 관리에 대한 자세한 내용
**Get work with named routes and also offer a lower level control over your routes! There is a in-depth documentation [here](./documentation/en_US/route_management.md)**
**Get은 명명된 라우트로 작업하고 더 쉬운 방식으로 라우트의 제어를 제공합니다! [여기](./documentation/en_US/route_management.md)에 더 자세한 문서가 있습니다.**
## 종속성 관리
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:
Get은 간단하고 강력한 종속성 관리자를 가지고 있어 Bloc나 Controller와 유사한 클래스를 Provide context, inheritedWidget 없이 1줄의 코드로 끌어낼 수 있습니다:
```dart
Controllercontroller=Get.put(Controller());// Rather Controller controller = Controller();
```
-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.
-주석: Get의 상태 관리자를 사용중이면 뷰를 controller에 더 쉽게 연결할 수 있는 바인딩 api에 더 주의를 기울이십시오.
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.
So you can use your controller (or class Bloc) normally
사용 중인 클래스에서 클래스를 인스턴스화하는 대신에 Get 인스턴스에서 인스턴스화하면 앱에서 해당 클래스를 사용할 수 있습니다.
그래서 controller(또는 Bloc)를 정상적으로 사용할 수 있습니다.
**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
**팁:** Get 종속성 관리는 패키지의 다른 부분과 분리되어서 예제 앱이 이미 상태 관리자(하나여도 상관없음)를 사용중이면 모두 다시 작성할 필요 없이 아무 문제 없이 종속성 주입을 사용할 수 있습니다.
```dart
controller.fetchApi();
```
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:
여러 경로를 통해 이동했고 controller에 남아있는 데이터가 필요가 있다고 가정하십시오. Get_it이나 Provider와 조합된 상태 관리자가 필요합니다. 맞습니까? Get은 아닙니다. 다른 추가적인 종속성이 필요없이 controller를 Get의 "find"로 찾으면 됩니다:
```dart
Controllercontroller=Get.find();
//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.
//마법처럼 Get이 controller를 찾아서 가져올 것 입니다. 백만개의 인스턴스화 contrller를 가질수 있고 Get은 올바른 controller를 항상 가져다 줄 것입니다.
```
And then you will be able to recover your controller data that was obtained back there:
그리고나서 가져온 controller 데이터를 사용할 수 있습니다:
```dart
Text(controller.textFromApi);
...
...
@@ -290,7 +290,7 @@ Text(controller.textFromApi);
### 종속성 관리에 대한 자세한 내용
**See a more in-depth explanation of dependency management [here](./documentation/en_US/dependency_management.md)**
**종속성 관리에 대한 더 제사한 사항은 [여기](./documentation/en_US/dependency_management.md)에 있습니다.**
# 기능들
...
...
@@ -298,8 +298,8 @@ Text(controller.textFromApi);
### 번역
Translations are kept as a simple key-value dictionary map.
To add custom translations, create a class and extend `Translations`.
번역은 간단한 key-value 맵으로 유지됩니다.
커스텀 번역을 추가하려면 `Translations`으로 확장하여 클래스를 만드세요.
```dart
import'package:get/get.dart';
...
...
@@ -319,7 +319,7 @@ class Messages extends Translations {
#### 번역 사용법
Just append `.tr` to the specified key and it will be translated, using the current value of `Get.locale` and `Get.fallbackLocale`.
단지 `.tr`로 명시된 키만 추가하면 `Get.locale`과 `Get.fallbackLocale`의 현재값을 사용해서 번역될 것 입니다.
```dart
Text('title'.tr);
...
...
@@ -327,19 +327,19 @@ Text('title'.tr);
### 지역화
Pass parameters to `GetMaterialApp` to define the locale and translations.
`GetMaterialApp`의 파라미터를 전달하여 지역과 번역어를 정의합니다.
```dart
returnGetMaterialApp(
translations:Messages(),// your translations
locale:Locale('en','US'),// translations will be displayed in that locale
fallbackLocale:Locale('en','UK'),// specify the fallback locale in case an invalid locale is selected.
translations:Messages(),// 번역들
locale:Locale('en','US'),// 해당 지역의 번역이 표시
fallbackLocale:Locale('en','UK'),// 잘못된 지역이 선택된 경우 복구될 지역을 지정
);
```
#### 지역 변경
Call `Get.updateLocale(locale)` to update the locale. Translations then automatically use the new locale.
지역을 업데이트할때 `Get.updateLocale(locale)`를 콜하십시오. 새로운 지역을 사용하여 자동적으로 번역합니다.
```dart
varlocale=Locale('en','US');
...
...
@@ -348,7 +348,7 @@ Get.updateLocale(locale);
#### 시스템 지역
To read the system locale, you could use `Get.deviceLocale`.
`Get.deviceLocale`를 사용해서 시스템 지역을 읽어옵니다.
```dart
returnGetMaterialApp(
...
...
@@ -358,24 +358,24 @@ return GetMaterialApp(
## 테마 변경
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™**.
테마를 업데이트하기 위해 `GetMaterialApp` 보다 더 상위 위젯을 사용하지 말아 주십시오. 이러면 중복 키가 트리거 될 수 있습니다. 많은 사람들이 테마를 바꾸기 위해 "ThemeProvider" 위젯을 사용하고 있는데 **GetX**는 이런 방식이 필요 없습니다.
You can create your custom theme and simply add it within `Get.changeTheme` without any boilerplate for that:
다른 표준사항은 없이 `Get.changeTheme`로 추가하고 간단하게 커스텀 테마를 만들수 있습니다:
```dart
Get.changeTheme(ThemeData.light());
```
If you want to create something like a button that changes the Theme in `onTap`, you can combine two **GetX™** APIs for that:
`onTap`에 테마 변경이 있는 버튼 같은 무언가를 만들고 싶다면 두개의 **GetX™** API를 조합하여 가능합니다:
- The api that checks if the dark `Theme` is being used.
- And the `Theme` Change API, you can just put this within an `onPressed`: