Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
fluttertpc_get
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Eduardo Florence
2020-09-15 14:39:33 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
23798d8ca8bbffa8a56a28b6c0c3d50a5e1ff77e
23798d8c
1 parent
e517acb1
Ajustes no primeiro exemplo de uso devido a não ser mais necessário tostring
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
README.pt-br.md
README.pt-br.md
View file @
23798d8
...
...
@@ -122,8 +122,7 @@ class Home extends StatelessWidget {
final
Controller
c
=
Get
.
put
(
Controller
());
@override
Widget
build
(
context
)
=>
Scaffold
(
appBar:
AppBar
(
title:
Obx
(
()
=>
Text
(
"Total of clicks: "
+
c
.
count
.
string
))),
appBar:
AppBar
(
title:
Obx
(()
=>
Text
(
"Total de cliques:
${c.count}
"
))),
// Troque o Navigator.push de 8 linhas por um simples Get.to(). Você não precisa do 'context'
body:
Center
(
child:
RaisedButton
(
child:
Text
(
"Ir pra Outra tela"
),
onPressed:
()
=>
Get
.
to
(
Outra
()))),
...
...
@@ -135,7 +134,7 @@ class Outra extends StatelessWidget {
// Você pode pedir o Get para encontrar o controller que foi usado em outra página e redirecionar você pra ele.
final
Controller
c
=
Get
.
find
();
@override
Widget
build
(
context
)
=>
Scaffold
(
body:
Center
(
child:
Text
(
c
.
count
.
string
)));
Widget
build
(
context
)
=>
Scaffold
(
body:
Center
(
child:
Text
(
"
${c.count}
"
)));
}
```
...
...
Please
register
or
login
to post a comment