Committed by
GitHub
Merge pull request #424 from ajatsoft/patch-1
Update README-es.md
Showing
1 changed file
with
2 additions
and
1 deletions
| @@ -106,7 +106,7 @@ void main() => runApp(GetMaterialApp(home: Home())); | @@ -106,7 +106,7 @@ void main() => runApp(GetMaterialApp(home: Home())); | ||
| 106 | Cree su clase con la lógica de negocio colocando todas las variables, métodos y controladores dentro de ella. Puede hacer que cualquier variable sea observable usando un simple ".obs". | 106 | Cree su clase con la lógica de negocio colocando todas las variables, métodos y controladores dentro de ella. Puede hacer que cualquier variable sea observable usando un simple ".obs". | 
| 107 | 107 | ||
| 108 | ```dart | 108 | ```dart | 
| 109 | -class Controller extends GetXController { | 109 | +class Controller extends GetxController { | 
| 110 | var count = 0.obs; | 110 | var count = 0.obs; | 
| 111 | increment() => count.value++; | 111 | increment() => count.value++; | 
| 112 | } | 112 | } | 
| @@ -141,6 +141,7 @@ class Other extends StatelessWidget { | @@ -141,6 +141,7 @@ class Other extends StatelessWidget { | ||
| 141 | Widget build(context){ | 141 | Widget build(context){ | 
| 142 | // Access the updated count variable | 142 | // Access the updated count variable | 
| 143 | return Scaffold(body: Center(child: Text(c.count.string))); | 143 | return Scaffold(body: Center(child: Text(c.count.string))); | 
| 144 | + } | ||
| 144 | } | 145 | } | 
| 145 | 146 | ||
| 146 | ``` | 147 | ``` | 
- 
Please register or login to post a comment