Nipodemos

finnaly translated everything!

@@ -50,9 +50,10 @@ Essa biblioteca vai mudar a forma que você trabalha com o Framework e salvar se @@ -50,9 +50,10 @@ Essa biblioteca vai mudar a forma que você trabalha com o Framework e salvar se
50 - [Links de Url dinâmicos](#links-de-url-dinâmicos) 50 - [Links de Url dinâmicos](#links-de-url-dinâmicos)
51 - [Middleware](#middleware) 51 - [Middleware](#middleware)
52 - [Change Theme](#change-theme) 52 - [Change Theme](#change-theme)
  53 + - [Configurações Globais Opcionais](#configurações-globais-opcionais)
53 - [Optional Global Settings](#optional-global-settings) 54 - [Optional Global Settings](#optional-global-settings)
54 - - [Other Advanced APIs and Manual configurations](#other-advanced-apis-and-manual-configurations)  
55 - - [Nested Navigators](#nested-navigators) 55 + - [Outras APIs avançadas e Configurações Manuais](#outras-apis-avançadas-e-configurações-manuais)
  56 + - [Navigators Aninhados](#navigators-aninhados)
56 57
57 58
58 59
@@ -922,149 +923,143 @@ class Terceira extends StatelessWidget { @@ -922,149 +923,143 @@ class Terceira extends StatelessWidget {
922 ``` 923 ```
923 924
924 ### Change Theme 925 ### Change Theme
925 -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 Get.  
926 -  
927 -You can create your custom theme and simply add it within Get.changeTheme without any boilerplate for that:  
928 - 926 +Por favor não use nenhum widget acima do `GetMaterialApp` para atualizá-lo. Isso pode ativar keys duplicadas. Muitas pessoas estão acostumadas com a forma pré-história de criar um widget `ThemeProvider` só pra mudar o tema do seu app, e isso definitamente NÃO é necessário com o Get.
929 927
  928 +Você pode criar seu tema customizado e simplesmente adicionar ele dentro de `Get.changeTheme()` sem nenhum boilerplate para isso:
930 ```dart 929 ```dart
931 Get.changeTheme(ThemeData.light()); 930 Get.changeTheme(ThemeData.light());
932 ``` 931 ```
933 932
934 -If you want to create something like a button that changes the theme with onTap, you can combine two Get APIs for that, the api that checks if the dark theme is being used, and the theme change API, you can just put this within an onPressed:  
935 - 933 +Se você quer criar algo como um botão que muda o tema com um toque, você pode combinar duas APIs Get para isso, a API que checa se o tema dark está sendo usado, e a API de mudança de tema. E dentro de um `onPressed`:
936 ```dart 934 ```dart
937 Get.changeTheme(Get.isDarkMode? ThemeData.light(): ThemeData.dark()); 935 Get.changeTheme(Get.isDarkMode? ThemeData.light(): ThemeData.dark());
938 ``` 936 ```
  937 +Quando o modo escuro está ativado, ele vai alterar para o modo claro, e vice versa.
939 938
940 -When darkmode is activated, it will switch to the light theme, and when the light theme is activated, it will change to dark.  
941 -  
942 -  
943 -If you want to know in depth how to change the theme, you can follow this tutorial on Medium that even teaches the persistence of the theme using Get:  
944 - 939 +Se você quer saber a fundo como mudar o tema, você pode seguir esse tutorial no Medium que até te ensina a persistir o tema usando Get:
945 - [Dynamic Themes in 3 lines using Get](https://medium.com/swlh/flutter-dynamic-themes-in-3-lines-c3b375f292e3) - Tutorial by [Rod Brown](https://github.com/RodBr). 940 - [Dynamic Themes in 3 lines using Get](https://medium.com/swlh/flutter-dynamic-themes-in-3-lines-c3b375f292e3) - Tutorial by [Rod Brown](https://github.com/RodBr).
946 941
947 - 942 +### Configurações Globais Opcionais
  943 +Você pode criar configurações globais para o Get. Apenas adicione `Get.config` no seu código antes de ir para qualquer rota ou faça diretamente no seu GetMaterialApp
948 ### Optional Global Settings 944 ### Optional Global Settings
949 You can create Global settings for Get. Just add Get.config to your code before pushing any route or do it directly in your GetMaterialApp 945 You can create Global settings for Get. Just add Get.config to your code before pushing any route or do it directly in your GetMaterialApp
950 946
951 ```dart 947 ```dart
  948 +//esse
  949 +GetMaterialApp(
  950 + enableLog: true,
  951 + defaultTransition: Transition.fade,
  952 + opaqueRoute: Get.isOpaqueRouteDefault,
  953 + popGesture: Get.isPopGestureEnable,
  954 + transitionDuration: Get.defaultDurationTransition,
  955 + defaultGlobalState: Get.defaultGlobalState,
  956 +);
952 957
953 -GetMaterialApp(  
954 - enableLog: true,  
955 - defaultTransition: Transition.fade,  
956 - opaqueRoute: Get.isOpaqueRouteDefault,  
957 - popGesture: Get.isPopGestureEnable,  
958 - transitionDuration: Get.defaultDurationTransition,  
959 - defaultGlobalState: Get.defaultGlobalState,  
960 - );  
961 - 958 +// ou esse
962 Get.config( 959 Get.config(
963 - enableLog = true,  
964 - defaultPopGesture = true,  
965 - defaultTransition = Transitions.cupertino} 960 + enableLog = true,
  961 + defaultPopGesture = true,
  962 + defaultTransition = Transitions.cupertino
  963 +)
966 ``` 964 ```
967 -  
968 -  
969 -### Other Advanced APIs and Manual configurations  
970 -GetMaterialApp configures everything for you, but if you want to configure Get Manually using advanced APIs.  
971 - 965 +### Outras APIs avançadas e Configurações Manuais
  966 +GetMaterialApp configura tudo para você, mas se quiser configurar Get manualmente, você pode usando APIs avançadas.
972 ```dart 967 ```dart
973 MaterialApp( 968 MaterialApp(
974 - navigatorKey: Get.key,  
975 - navigatorObservers: [GetObserver()],  
976 - ); 969 + navigatorKey: Get.key,
  970 + navigatorObservers: [GetObserver()],
  971 +);
977 ``` 972 ```
978 973
979 -You will also be able to use your own Middleware within GetObserver, this will not influence anything.  
980 - 974 +Você também será capaz de usar seu próprio Middleware dentro do GetObserver, isso não irá influenciar em nada.
981 ```dart 975 ```dart
982 MaterialApp( 976 MaterialApp(
983 - navigatorKey: Get.key,  
984 - navigatorObservers: [GetObserver(MiddleWare.observer)], // Here  
985 - ); 977 + navigatorKey: Get.key,
  978 + navigatorObservers: [GetObserver(MiddleWare.observer)], // Aqui
  979 +);
986 ``` 980 ```
987 981
988 ```dart 982 ```dart
989 -Get.arguments // give the current args from currentScreen 983 +Get.arguments // fornece os arguments da tela atual
990 984
991 -Get.previousArguments // give arguments of previous route 985 +Get.previousArguments // fornece os arguments da rota anterior
992 986
993 -Get.previousRoute // give name of previous route 987 +Get.previousRoute // fornece o nome da rota anterior
994 988
995 -Get.rawRoute // give the raw route to access for example, rawRoute.isFirst() 989 +Get.rawRoute // fornece a rota bruta para acessar por exemplo, rawRoute.isFirst()
996 990
997 -Get.routing // give access to Rounting API from GetObserver 991 +Get.routing // fornece acesso a API de rotas de dentro do GetObserver
998 992
999 -Get.isSnackbarOpen // check if snackbar is open 993 +Get.isSnackbarOpen // checa se o snackbar está aberto
1000 994
1001 -Get.isDialogOpen // check if dialog is open 995 +Get.isDialogOpen // checa se o dialog está aberto
1002 996
1003 -Get.isBottomSheetOpen // check if bottomsheet is open 997 +Get.isBottomSheetOpen // checa se o bottomsheet está aberto
1004 998
1005 -Get.removeRoute() // remove one route. 999 +Get.removeRoute() // remove uma rota.
1006 1000
1007 -Get.until() // back repeatedly until the predicate returns true. 1001 +Get.until() // volta repeditamente até o predicate retorne true.
1008 1002
1009 -Get.offUntil() // go to next route and remove all the previous routes until the predicate returns true. 1003 +Get.offUntil() // vá para a próxima rota e remove todas as rotas anteriores até que o predicate retorne true.
1010 1004
1011 -Get.offNamedUntil() // go to next named route and remove all the previous routes until the predicate returns true. 1005 +Get.offNamedUntil() // vá para a próxima rota nomeada e remove todas as rotas anteriores até que o predicate retorne true.
1012 1006
1013 -GetPlatform.isAndroid/isIOS/isWeb... //(This method is completely compatible with FlutterWeb, unlike the framework. "Platform.isAndroid") 1007 +GetPlatform.isAndroid/isIOS/isWeb... // retorna qual é a plataforma (Esse método é completamente compatível com o FlutterWeb, diferente do método do framework "Platform.isAndroid")
1014 1008
1015 -Get.height / Get.width // Equivalent to the method: MediaQuery.of(context).size.height 1009 +Get.height // Equivalente ao método: MediaQuery.of(context).size.height
  1010 +Get.width // Equivalente ao método: MediaQuery.of(context).size.width
1016 1011
1017 -Get.context // Gives the context of the screen in the foreground anywhere in your code. 1012 +Get.context // forncece o context da tela em qualquer lugar do seu código.
1018 1013
1019 -Get.contextOverlay // Gives the context of the snackbar/dialog/bottomsheet in the foreground anywhere in your code. 1014 +Get.contextOverlay // fornece o context de snackbar/dialog/bottomsheet em qualquer lugar do seu código.
1020 1015
1021 ``` 1016 ```
1022 1017
1023 -### Nested Navigators 1018 +### Navigators Aninhados
1024 1019
1025 -Get made Flutter's nested navigation even easier.  
1026 -You don't need the context, and you will find your navigation stack by Id. 1020 +Get fez a navegação aninhada no Flutter mais fácil ainda. Você não precisa do `context`, e você encontrará sua `navigation stack` pela ID.
1027 1021
1028 -- NOTE: Creating parallel navigation stacks can be dangerous. The ideal is not to use NestedNavigators, or to use sparingly. If your project requires it, go ahead, but keep in mind that keeping multiple navigation stacks in memory may not be a good idea for RAM consumption. 1022 +* Nota: Criar navegação paralela em stacks pode ser perigoso. O idela é não usar `NestedNavigators`, The ideal is not to use NestedNavigators, or usar com moderação. Se o seu projeto requer isso, vá em frente, mas fique ciente que manter múltiplas stacks de navegação na memória pode não ser uma boa ideia no quesito consumo de RAM.
1029 1023
1030 -See how simple it is: 1024 +Veja como é simples:
1031 ```dart 1025 ```dart
1032 - Navigator(  
1033 - key: nestedKey(1), // create a key by index  
1034 - initialRoute: '/',  
1035 - onGenerateRoute: (settings) {  
1036 - if (settings.name == '/') {  
1037 - return GetRouteBase(  
1038 - page: Scaffold(  
1039 - appBar: AppBar(  
1040 - title: Text("Main"),  
1041 - ),  
1042 - body: Center(  
1043 - child: FlatButton(  
1044 - color: Colors.blue,  
1045 - onPressed: () {  
1046 - Get.toNamed('/second', id:1); // navigate by your nested route by index  
1047 - },  
1048 - child: Text("Go to second")),  
1049 - ),  
1050 - ),  
1051 - );  
1052 - } else if (settings.name == '/second') {  
1053 - return GetRouteBase(  
1054 - page: Center(  
1055 - child: Scaffold(  
1056 - appBar: AppBar(  
1057 - title: Text("Main"),  
1058 - ),  
1059 - body: Center(  
1060 - child: Text("second")  
1061 - ),  
1062 - ),  
1063 - ),  
1064 - );  
1065 - }  
1066 - }), 1026 +Navigator(
  1027 + key: nestedKey(1), // crie uma key para index
  1028 + initialRoute: '/',
  1029 + onGenerateRoute: (settings) {
  1030 + if (settings.name == '/') {
  1031 + return GetRouteBase(
  1032 + page: Scaffold(
  1033 + appBar: AppBar(
  1034 + title: Text("Principal"),
  1035 + ),
  1036 + body: Center(
  1037 + child: FlatButton(
  1038 + color: Colors.blue,
  1039 + child: Text("Ir para a segunda"),
  1040 + onPressed: () {
  1041 + Get.toNamed('/segunda', id:1); // navega pela sua navegação aninhada usando o index
  1042 + },
  1043 + )
  1044 + ),
  1045 + ),
  1046 + );
  1047 + } else if (settings.name == '/segunda') {
  1048 + return GetRouteBase(
  1049 + page: Center(
  1050 + child: Scaffold(
  1051 + appBar: AppBar(
  1052 + title: Text("Principal"),
  1053 + ),
  1054 + body: Center(
  1055 + child: Text("Segunda")
  1056 + ),
  1057 + ),
  1058 + ),
  1059 + );
  1060 + }
  1061 + }
  1062 +),
1067 ``` 1063 ```
1068 1064
1069 -  
1070 -This library will always be updated and implementing new features. Feel free to offer PRs and contribute to them. 1065 +Essa biblioteca vai sempre ficar atualizada e será sempre implementado nova features. Sinta-se livre para oferecer PRs e contribuir com o package.