Nipodemos

More translations

@@ -302,22 +302,22 @@ Você remover classe N da rota de forma inesperada, e tentasse usar o controller @@ -302,22 +302,22 @@ Você remover classe N da rota de forma inesperada, e tentasse usar o controller
302 ### Simple state manager usage 302 ### Simple state manager usage
303 303
304 ```dart 304 ```dart
305 -// Create controller class and extends GetController 305 +// Crie a classe Controller e entenda ela do GetController
306 class Controller extends GetController { 306 class Controller extends GetController {
307 int counter = 0; 307 int counter = 0;
308 void increment() { 308 void increment() {
309 counter++; 309 counter++;
310 - update(this); // use update(this) to update counter variable on UI when increment be called 310 + update(this); // use update(this) para atualizar a variável counter na UI quando increment for chamado
311 } 311 }
312 } 312 }
313 -// On your Stateless/Stateful class, use GetBuilder to update Text when increment be called 313 +// Na sua classe Stateless/Stateful, use o GetBuilder para atualizar o texto quando a função increment for chamada
314 GetBuilder<Controller>( 314 GetBuilder<Controller>(
315 - init: Controller(), // INIT IT ONLY THE FIRST TIME 315 + init: Controller(), // INICIE O CONTROLLER SOMENTE NA PRIMEIRA VEZ
316 builder: (controller) => Text( 316 builder: (controller) => Text(
317 '${controller.counter}', 317 '${controller.counter}',
318 ), 318 ),
319 ), 319 ),
320 -//Initialize your controller only the first time. The second time you are using ReBuilder for the same controller, do not use it again. Your controller will be automatically removed from memory as soon as the widget that marked it as 'init' is deployed. You don't have to worry about that, Get will do it automatically, just make sure you don't start the same controller twice. 320 +// Inicialize seu controller somente uma vez. Na segunda vez que você for usar GetBuilder para o mesmo controller, não Inicialize denovo. Seu controller será automaticamente removido da memória. Você não precisa se preocupar com isso, Get vai fazer isso automaticamente, apenas tenha certeza que você não vai inicializar o mesmo controller duas vezes.
321 ``` 321 ```
322 **Done!** 322 **Done!**
323 - You have already learned how to manage states with Get. 323 - You have already learned how to manage states with Get.