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
Jonny Borges
2021-03-03 22:12:44 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2c0f369c61a30a25c6a7e5612b9d15b011833c71
2c0f369c
1 parent
f1235fcd
update buttons to Material spec
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
98 additions
and
86 deletions
README-es.md
README-fr.md
README.id-ID.md
README.ko-kr.md
README.md
README.pl.md
README.pt-br.md
README.ru.md
README.ur-PK.md
README.zh-cn.md
documentation/en_US/route_management.md
documentation/es_ES/route_management.md
documentation/fr_FR/route_management.md
documentation/id_ID/route_management.md
documentation/kr_KO/route_management.md
documentation/pt_BR/route_management.md
documentation/ru_RU/route_management.md
documentation/zh_CN/route_management.md
example/example.md
example/lib/pages/home/presentation/views/home_view.dart
lib/get_navigation/src/extension_navigation.dart
pubspec.yaml
test/navigation/get_main_test.dart
test/state_manager/get_mixin_state_test.dart
test/state_manager/get_obx_test.dart
test/state_manager/get_rxstate_test.dart
test/state_manager/get_state_test.dart
README-es.md
View file @
2c0f369
...
...
@@ -136,7 +136,7 @@ class Home extends StatelessWidget {
appBar:
AppBar
(
title:
Obx
(()
=>
Text
(
"Clicks: "
+
c
.
count
.
string
))),
// Reemplace el Navigator.push de 8 líneas por un simple Get.to(). No necesitas contexto
body:
Center
(
child:
Rais
edButton
(
body:
Center
(
child:
Elevat
edButton
(
child:
Text
(
"Go to Other"
),
onPressed:
()
=>
Get
.
to
(
Other
()))),
floatingActionButton:
FloatingActionButton
(
child:
Icon
(
Icons
.
add
),
onPressed:
c
.
increment
));
...
...
README-fr.md
View file @
2c0f369
...
...
@@ -148,7 +148,7 @@ class Home extends StatelessWidget {
appBar:
AppBar
(
title:
Obx
(()
=>
Text
(
"Clicks:
${c.count}
"
))),
// Remplacez les 8 lignes Navigator.push par un simple Get.to(). Vous n'avez pas besoin de 'context'
body:
Center
(
child:
Rais
edButton
(
body:
Center
(
child:
Elevat
edButton
(
child:
Text
(
"Go to Other"
),
onPressed:
()
=>
Get
.
to
(
Other
()))),
floatingActionButton:
FloatingActionButton
(
child:
Icon
(
Icons
.
add
),
onPressed:
c
.
increment
));
...
...
README.id-ID.md
View file @
2c0f369
...
...
@@ -148,7 +148,7 @@ class Home extends StatelessWidget {
appBar:
AppBar
(
title:
Obx
(()
=>
Text
(
"Clicks:
${c.count}
"
))),
// Ganti 8 baris Navigator.push menggunan Get.to() agar lebih sederhana. Anda tidak perlu `context`.
body:
Center
(
child:
Rais
edButton
(
body:
Center
(
child:
Elevat
edButton
(
child:
Text
(
"Go to Other"
),
onPressed:
()
=>
Get
.
to
(
Other
()))),
floatingActionButton:
FloatingActionButton
(
child:
Icon
(
Icons
.
add
),
onPressed:
c
.
increment
));
...
...
README.ko-kr.md
View file @
2c0f369
...
...
@@ -145,7 +145,7 @@ class Home extends StatelessWidget {
appBar:
AppBar
(
title:
Obx
(()
=>
Text
(
"Clicks:
${c.count}
"
))),
// 8줄의 Navigator.push를 간단한 Get.to()로 변경합니다. context는 필요없습니다.
body:
Center
(
child:
Rais
edButton
(
body:
Center
(
child:
Elevat
edButton
(
child:
Text
(
"Go to Other"
),
onPressed:
()
=>
Get
.
to
(
Other
()))),
floatingActionButton:
FloatingActionButton
(
child:
Icon
(
Icons
.
add
),
onPressed:
c
.
increment
));
...
...
README.md
View file @
2c0f369
...
...
@@ -149,7 +149,7 @@ class Home extends StatelessWidget {
appBar:
AppBar
(
title:
Obx
(()
=>
Text
(
"Clicks:
${c.count}
"
))),
// Replace the 8 lines Navigator.push by a simple Get.to(). You don't need context
body:
Center
(
child:
Rais
edButton
(
body:
Center
(
child:
Elevat
edButton
(
child:
Text
(
"Go to Other"
),
onPressed:
()
=>
Get
.
to
(
Other
()))),
floatingActionButton:
FloatingActionButton
(
child:
Icon
(
Icons
.
add
),
onPressed:
c
.
increment
));
...
...
README.pl.md
View file @
2c0f369
...
...
@@ -113,7 +113,7 @@ class Home extends StatelessWidget {
appBar: AppBar(title: Obx(() => Text("Clicks: " + c.count.string))),
// Replace the 8 lines Navigator.push by a simple Get.to(). You don't need context
body: Center(child:
Rais
edButton(
body: Center(child:
Elevat
edButton(
child: Text("Go to Other"), onPressed: () => Get.to(Other()))),
floatingActionButton:
FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment));
...
...
README.pt-br.md
View file @
2c0f369
...
...
@@ -158,7 +158,7 @@ class Home extends StatelessWidget {
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:
Rais
edButton
(
body:
Center
(
child:
Elevat
edButton
(
child:
Text
(
"Ir pra Outra tela"
),
onPressed:
()
=>
Get
.
to
(
Outra
()))),
floatingActionButton:
FloatingActionButton
(
child:
Icon
(
Icons
.
add
),
onPressed:
c
.
increment
));
...
...
README.ru.md
View file @
2c0f369
...
...
@@ -129,7 +129,7 @@ class Home extends StatelessWidget {
appBar:
AppBar
(
title:
Obx
(()
=>
Text
(
"Кликов:
${c.count}
"
))),
// Замените 8 строк Navigator.push простым Get.to(). Вам не нужен context!
body:
Center
(
child:
Rais
edButton
(
body:
Center
(
child:
Elevat
edButton
(
child:
Text
(
"Перейти к Other"
),
onPressed:
()
=>
Get
.
to
(
Other
()))),
floatingActionButton:
FloatingActionButton
(
child:
Icon
(
Icons
.
add
),
onPressed:
c
.
increment
));
...
...
README.ur-PK.md
View file @
2c0f369
...
...
@@ -137,7 +137,7 @@ class Home extends StatelessWidget {
appBar:
AppBar
(
title:
Obx
(()
=>
Text
(
"Clicks:
${c.count}
"
))),
// Replace the 8 lines Navigator.push by a simple Get.to(). You don't need context
body:
Center
(
child:
Rais
edButton
(
body:
Center
(
child:
Elevat
edButton
(
child:
Text
(
"Go to Other"
),
onPressed:
()
=>
Get
.
to
(
Other
()))),
floatingActionButton:
FloatingActionButton
(
child:
Icon
(
Icons
.
add
),
onPressed:
c
.
increment
));
...
...
README.zh-cn.md
View file @
2c0f369
...
...
@@ -138,7 +138,7 @@ class Home extends StatelessWidget {
appBar:
AppBar
(
title:
Obx
(()
=>
Text
(
"Clicks:
${c.count}
"
))),
// 用一个简单的Get.to()即可代替Navigator.push那8行,无需上下文!
body:
Center
(
child:
Rais
edButton
(
body:
Center
(
child:
Elevat
edButton
(
child:
Text
(
"Go to Other"
),
onPressed:
()
=>
Get
.
to
(
Other
()))),
floatingActionButton:
FloatingActionButton
(
child:
Icon
(
Icons
.
add
),
onPressed:
c
.
increment
));
...
...
documentation/en_US/route_management.md
View file @
2c0f369
...
...
@@ -313,7 +313,7 @@ class First extends StatelessWidget {
title:
Text
(
'First Route'
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
child:
Text
(
'Open route'
),
onPressed:
()
{
Get
.
toNamed
(
"/second"
);
...
...
@@ -338,7 +338,7 @@ class Second extends StatelessWidget {
title:
Text
(
'second Route'
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
child:
Text
(
'Open route'
),
onPressed:
()
{
Get
.
toNamed
(
"/third"
);
...
...
@@ -357,7 +357,7 @@ class Third extends StatelessWidget {
title:
Text
(
"Third Route"
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
onPressed:
()
{
Get
.
back
();
},
...
...
@@ -428,7 +428,7 @@ Get.snackbar(
// Color leftBarIndicatorColor,
// List<BoxShadow> boxShadows,
// Gradient backgroundGradient,
//
Fla
tButton mainButton,
//
Tex
tButton mainButton,
// OnTap onTap,
// bool isDismissible,
// bool showProgressIndicator,
...
...
@@ -518,7 +518,7 @@ Navigator(
title:
Text
(
"Main"
),
),
body:
Center
(
child:
Fla
tButton
(
child:
Tex
tButton
(
color:
Colors
.
blue
,
onPressed:
()
{
Get
.
toNamed
(
'/second'
,
id:
1
);
// navigate by your nested route by index
...
...
documentation/es_ES/route_management.md
View file @
2c0f369
...
...
@@ -312,7 +312,7 @@ class First extends StatelessWidget {
title:
Text
(
'First Route'
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
child:
Text
(
'Open route'
),
onPressed:
()
{
Get
.
toNamed
(
"/second"
);
...
...
@@ -337,7 +337,7 @@ class Second extends StatelessWidget {
title:
Text
(
'second Route'
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
child:
Text
(
'Open route'
),
onPressed:
()
{
Get
.
toNamed
(
"/third"
);
...
...
@@ -356,7 +356,7 @@ class Third extends StatelessWidget {
title:
Text
(
"Third Route"
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
onPressed:
()
{
Get
.
back
();
},
...
...
@@ -427,7 +427,7 @@ Get.snackbar(
// Color leftBarIndicatorColor,
// List<BoxShadow> boxShadows,
// Gradient backgroundGradient,
//
Fla
tButton mainButton,
//
Tex
tButton mainButton,
// OnTap onTap,
// bool isDismissible,
// bool showProgressIndicator,
...
...
@@ -519,7 +519,7 @@ Navigator(
title:
Text
(
"Main"
),
),
body:
Center
(
child:
Fla
tButton
(
child:
Tex
tButton
(
color:
Colors
.
blue
,
onPressed:
()
{
Get
.
toNamed
(
'/second'
,
id:
1
);
// navigate by your nested route by index
...
...
documentation/fr_FR/route_management.md
View file @
2c0f369
...
...
@@ -314,7 +314,7 @@ class First extends StatelessWidget {
title:
Text
(
'First Route'
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
child:
Text
(
'Open route'
),
onPressed:
()
{
Get
.
toNamed
(
"/second"
);
...
...
@@ -339,7 +339,7 @@ class Second extends StatelessWidget {
title:
Text
(
'second Route'
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
child:
Text
(
'Open route'
),
onPressed:
()
{
Get
.
toNamed
(
"/third"
);
...
...
@@ -358,7 +358,7 @@ class Third extends StatelessWidget {
title:
Text
(
"Third Route"
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
onPressed:
()
{
Get
.
back
();
},
...
...
@@ -428,7 +428,7 @@ Get.snackbar(
// Color leftBarIndicatorColor,
// List<BoxShadow> boxShadows,
// Gradient backgroundGradient,
//
Fla
tButton mainButton,
//
Tex
tButton mainButton,
// OnTap onTap,
// bool isDismissible,
// bool showProgressIndicator,
...
...
@@ -518,7 +518,7 @@ Navigator(
title:
Text
(
"Main"
),
),
body:
Center
(
child:
Fla
tButton
(
child:
Tex
tButton
(
color:
Colors
.
blue
,
onPressed:
()
{
Get
.
toNamed
(
'/second'
,
id:
1
);
// naviguer votre itinéraire imbriqué par index
...
...
documentation/id_ID/route_management.md
View file @
2c0f369
...
...
@@ -315,7 +315,7 @@ class First extends StatelessWidget {
title:
Text
(
'Halaman Pertama'
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
child:
Text
(
'Pindah halaman'
),
onPressed:
()
{
Get
.
toNamed
(
"/second"
);
...
...
@@ -340,7 +340,7 @@ class Second extends StatelessWidget {
title:
Text
(
'Halaman kedua'
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
child:
Text
(
'Pindah halaman'
),
onPressed:
()
{
Get
.
toNamed
(
"/third"
);
...
...
@@ -359,7 +359,7 @@ class Third extends StatelessWidget {
title:
Text
(
"Halaman ketiga"
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
onPressed:
()
{
Get
.
back
();
},
...
...
@@ -430,7 +430,7 @@ Get.snackbar(
// Color leftBarIndicatorColor,
// List<BoxShadow> boxShadows,
// Gradient backgroundGradient,
//
Fla
tButton mainButton,
//
Tex
tButton mainButton,
// OnTap onTap,
// bool isDismissible,
// bool showProgressIndicator,
...
...
@@ -520,7 +520,7 @@ Navigator(
title:
Text
(
"Main"
),
),
body:
Center
(
child:
Fla
tButton
(
child:
Tex
tButton
(
color:
Colors
.
blue
,
onPressed:
()
{
Get
.
toNamed
(
'/second'
,
id:
1
);
// pindah ke halaman bersarang anda menggunakan index
...
...
documentation/kr_KO/route_management.md
View file @
2c0f369
...
...
@@ -313,7 +313,7 @@ class First extends StatelessWidget {
title:
Text
(
'First Route'
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
child:
Text
(
'Open route'
),
onPressed:
()
{
Get
.
toNamed
(
"/second"
);
...
...
@@ -338,7 +338,7 @@ class Second extends StatelessWidget {
title:
Text
(
'second Route'
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
child:
Text
(
'Open route'
),
onPressed:
()
{
Get
.
toNamed
(
"/third"
);
...
...
@@ -357,7 +357,7 @@ class Third extends StatelessWidget {
title:
Text
(
"Third Route"
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
onPressed:
()
{
Get
.
back
();
},
...
...
@@ -428,7 +428,7 @@ Get.snackbar(
// Color leftBarIndicatorColor,
// List<BoxShadow> boxShadows,
// Gradient backgroundGradient,
//
Fla
tButton mainButton,
//
Tex
tButton mainButton,
// OnTap onTap,
// bool isDismissible,
// bool showProgressIndicator,
...
...
@@ -518,7 +518,7 @@ Navigator(
title:
Text
(
"Main"
),
),
body:
Center
(
child:
Fla
tButton
(
child:
Tex
tButton
(
color:
Colors
.
blue
,
onPressed:
()
{
Get
.
toNamed
(
'/second'
,
id:
1
);
// index로 중첩된 경로를 탐색
...
...
documentation/pt_BR/route_management.md
View file @
2c0f369
...
...
@@ -140,7 +140,7 @@ Get.snackbar(
// Color leftBarIndicatorColor,
// List<BoxShadow> boxShadows,
// Gradient backgroundGradient,
//
Fla
tButton mainButton,
//
Tex
tButton mainButton,
// OnTap onTap,
// bool isDismissible,
// bool showProgressIndicator,
...
...
@@ -393,7 +393,7 @@ class Primeira extends StatelessWidget {
title:
Text
(
'Primeira rota'
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
child:
Text
(
'Abrir rota'
),
onPressed:
()
{
Get
.
toNamed
(
"/segunda"
);
...
...
@@ -418,7 +418,7 @@ class Segunda extends StatelessWidget {
title:
Text
(
'Segunda rota'
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
child:
Text
(
'Abrir rota'
),
onPressed:
()
{
Get
.
toNamed
(
"/terceira"
);
...
...
@@ -437,7 +437,7 @@ class Terceira extends StatelessWidget {
title:
Text
(
"Terceira Rota"
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
onPressed:
()
{
Get
.
back
();
},
...
...
@@ -512,7 +512,7 @@ Navigator(
title:
Text
(
"Principal"
),
),
body:
Center
(
child:
Fla
tButton
(
child:
Tex
tButton
(
color:
Colors
.
blue
,
child:
Text
(
"Ir para a segunda"
),
onPressed:
()
{
...
...
documentation/ru_RU/route_management.md
View file @
2c0f369
...
...
@@ -313,7 +313,7 @@ class First extends StatelessWidget {
title:
Text
(
'First Route'
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
child:
Text
(
'Open route'
),
onPressed:
()
{
Get
.
toNamed
(
"/second"
);
...
...
@@ -338,7 +338,7 @@ class Second extends StatelessWidget {
title:
Text
(
'second Route'
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
child:
Text
(
'Open route'
),
onPressed:
()
{
Get
.
toNamed
(
"/third"
);
...
...
@@ -357,7 +357,7 @@ class Third extends StatelessWidget {
title:
Text
(
"Third Route"
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
onPressed:
()
{
Get
.
back
();
},
...
...
@@ -428,7 +428,7 @@ Get.snackbar(
// Color leftBarIndicatorColor,
// List<BoxShadow> boxShadows,
// Gradient backgroundGradient,
//
Fla
tButton mainButton,
//
Tex
tButton mainButton,
// OnTap onTap,
// bool isDismissible,
// bool showProgressIndicator,
...
...
@@ -518,7 +518,7 @@ Navigator(
title:
Text
(
"Main"
),
),
body:
Center
(
child:
Fla
tButton
(
child:
Tex
tButton
(
color:
Colors
.
blue
,
onPressed:
()
{
Get
.
toNamed
(
'/second'
,
id:
1
);
// navigate by your nested route by index
...
...
documentation/zh_CN/route_management.md
View file @
2c0f369
...
...
@@ -308,7 +308,7 @@ class First extends StatelessWidget {
title:
Text
(
'First Route'
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
child:
Text
(
'Open route'
),
onPressed:
()
{
Get
.
toNamed
(
"/second"
);
...
...
@@ -333,7 +333,7 @@ class Second extends StatelessWidget {
title:
Text
(
'second Route'
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
child:
Text
(
'Open route'
),
onPressed:
()
{
Get
.
toNamed
(
"/third"
);
...
...
@@ -352,7 +352,7 @@ class Third extends StatelessWidget {
title:
Text
(
"Third Route"
),
),
body:
Center
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
onPressed:
()
{
Get
.
back
();
},
...
...
@@ -422,7 +422,7 @@ Get.snackbar(
// Color leftBarIndicatorColor,
// List<BoxShadow> boxShadows,
// Gradient backgroundGradient,
//
Fla
tButton mainButton,
//
Tex
tButton mainButton,
// OnTap onTap,
// bool isDismissible,
// bool showProgressIndicator,
...
...
@@ -512,7 +512,7 @@ Navigator(
title:
Text
(
"Main"
),
),
body:
Center
(
child:
Fla
tButton
(
child:
Tex
tButton
(
color:
Colors
.
blue
,
onPressed:
()
{
Get
.
toNamed
(
'/second'
,
id:
1
);
// navigate by your nested route by index
...
...
example/example.md
View file @
2c0f369
...
...
@@ -53,7 +53,7 @@ class Home extends StatelessWidget {
builder:
(
_
)
=>
Text
(
'clicks:
${controller.count}
'
,
)),
Rais
edButton
(
Elevat
edButton
(
child:
Text
(
'Next Route'
),
onPressed:
()
{
Get
.
to
(
Second
());
...
...
@@ -120,7 +120,7 @@ class Home extends StatelessWidget {
builder:
(
_
)
=>
Text
(
'clicks:
${controller.count}
'
,
)),
Rais
edButton
(
Elevat
edButton
(
child:
Text
(
'Next Route'
),
onPressed:
()
{
Get
.
to
(
Second
());
...
...
@@ -161,7 +161,7 @@ class Home extends StatelessWidget {
Obx
(()
=>
Text
(
'clicks:
${controller.count}
'
,
)),
Rais
edButton
(
Elevat
edButton
(
child:
Text
(
'Next Route'
),
onPressed:
()
{
Get
.
to
(
Second
());
...
...
@@ -362,13 +362,13 @@ class First extends StatelessWidget {
builder:
(
_
)
=>
Text
(
'clicks:
${_.count}
'
,
)),
Rais
edButton
(
Elevat
edButton
(
child:
Text
(
'Next Route'
),
onPressed:
()
{
Get
.
toNamed
(
'/second'
);
},
),
Rais
edButton
(
Elevat
edButton
(
child:
Text
(
'Change locale to English'
),
onPressed:
()
{
Get
.
updateLocale
(
Locale
(
'en'
,
'UK'
));
...
...
@@ -421,13 +421,13 @@ class Second extends GetView<ControllerX> {
GetX
<
ControllerX
>(
builder:
(
_
)
=>
Text
(
'Age:
${_.user.value.age}
'
),
),
Rais
edButton
(
Elevat
edButton
(
child:
Text
(
"Go to last page"
),
onPressed:
()
{
Get
.
toNamed
(
'/third'
,
arguments:
'arguments of second'
);
},
),
Rais
edButton
(
Elevat
edButton
(
child:
Text
(
"Back page and open snackbar"
),
onPressed:
()
{
Get
.
back
();
...
...
@@ -437,25 +437,25 @@ class Second extends GetView<ControllerX> {
);
},
),
Rais
edButton
(
Elevat
edButton
(
child:
Text
(
"Increment"
),
onPressed:
()
{
Get
.
find
<
ControllerX
>().
increment
();
},
),
Rais
edButton
(
Elevat
edButton
(
child:
Text
(
"Increment"
),
onPressed:
()
{
Get
.
find
<
ControllerX
>().
increment2
();
},
),
Rais
edButton
(
Elevat
edButton
(
child:
Text
(
"Update name"
),
onPressed:
()
{
Get
.
find
<
ControllerX
>().
updateUser
();
},
),
Rais
edButton
(
Elevat
edButton
(
child:
Text
(
"Dispose worker"
),
onPressed:
()
{
Get
.
find
<
ControllerX
>().
disposeWorker
();
...
...
example/lib/pages/home/presentation/views/home_view.dart
View file @
2c0f369
...
...
@@ -61,18 +61,24 @@ class HomeView extends GetView<HomeController> {
SizedBox
(
height:
10
,
),
OutlineButton
(
borderSide:
BorderSide
(
OutlinedButton
(
style:
OutlinedButton
.
styleFrom
(
textStyle:
TextStyle
(
color:
Colors
.
black
),
side:
BorderSide
(
color:
Colors
.
deepPurple
,
width:
3
,
),
shape:
StadiumBorder
(),
),
onPressed:
()
{
Get
.
toNamed
(
'/home/country'
);
},
child:
Text
(
'fetch_country'
.
tr
,
style:
TextStyle
(
fontWeight:
FontWeight
.
bold
),
style:
TextStyle
(
fontWeight:
FontWeight
.
bold
,
color:
Colors
.
black
,
),
),
)
],
...
...
lib/get_navigation/src/extension_navigation.dart
View file @
2c0f369
...
...
@@ -125,7 +125,7 @@ extension ExtensionSnackbar on GetInterface {
Color
leftBarIndicatorColor
,
List
<
BoxShadow
>
boxShadows
,
Gradient
backgroundGradient
,
Fla
tButton
mainButton
,
Tex
tButton
mainButton
,
OnTap
onTap
,
bool
isDismissible
,
bool
showProgressIndicator
,
...
...
@@ -326,23 +326,25 @@ extension ExtensionDialog on GetInterface {
actions
.
add
(
cancel
);
}
else
{
if
(
leanCancel
)
{
actions
.
add
(
FlatButton
(
materialTapTargetSize:
MaterialTapTargetSize
.
shrinkWrap
,
actions
.
add
(
TextButton
(
style:
TextButton
.
styleFrom
(
tapTargetSize:
MaterialTapTargetSize
.
shrinkWrap
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
),
shape:
RoundedRectangleBorder
(
side:
BorderSide
(
color:
buttonColor
??
theme
.
accentColor
,
width:
2
,
style:
BorderStyle
.
solid
),
borderRadius:
BorderRadius
.
circular
(
100
)),
),
onPressed:
()
{
onCancel
?.
call
();
back
();
},
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
),
child:
Text
(
textCancel
??
"Cancel"
,
style:
TextStyle
(
color:
cancelTextColor
??
theme
.
accentColor
),
),
shape:
RoundedRectangleBorder
(
side:
BorderSide
(
color:
buttonColor
??
theme
.
accentColor
,
width:
2
,
style:
BorderStyle
.
solid
),
borderRadius:
BorderRadius
.
circular
(
100
)),
));
}
}
...
...
@@ -350,14 +352,18 @@ extension ExtensionDialog on GetInterface {
actions
.
add
(
confirm
);
}
else
{
if
(
leanConfirm
)
{
actions
.
add
(
FlatButton
(
materialTapTargetSize:
MaterialTapTargetSize
.
shrinkWrap
,
color:
buttonColor
??
theme
.
accentColor
,
actions
.
add
(
TextButton
(
style:
TextButton
.
styleFrom
(
tapTargetSize:
MaterialTapTargetSize
.
shrinkWrap
,
//color: buttonColor ?? theme.accentColor,
backgroundColor:
buttonColor
??
theme
.
accentColor
,
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
100
)),
),
child:
Text
(
textConfirm
??
"Ok"
,
style:
TextStyle
(
color:
confirmTextColor
??
theme
.
primaryColor
),
style:
TextStyle
(
color:
confirmTextColor
??
theme
.
backgroundColor
),
),
onPressed:
()
{
onConfirm
?.
call
();
...
...
pubspec.yaml
View file @
2c0f369
...
...
@@ -13,7 +13,7 @@ dependencies:
dev_dependencies
:
flutter_test
:
sdk
:
flutter
effective_dart
:
^1.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
...
...
test/navigation/get_main_test.dart
View file @
2c0f369
...
...
@@ -485,7 +485,7 @@ void main() {
await
tester
.
pumpWidget
(
GetMaterialApp
(
popGesture:
true
,
home:
Rais
edButton
(
home:
Elevat
edButton
(
child:
Text
(
'Open Snackbar'
),
onPressed:
()
{
Get
.
snackbar
(
'title'
,
"message"
,
duration:
Duration
(
seconds:
1
));
...
...
@@ -504,7 +504,7 @@ void main() {
testWidgets
(
"Get.rawSnackbar test"
,
(
tester
)
async
{
await
tester
.
pumpWidget
(
Wrapper
(
child:
Rais
edButton
(
child:
Elevat
edButton
(
child:
Text
(
'Open Snackbar'
),
onPressed:
()
{
Get
.
rawSnackbar
(
...
...
test/state_manager/get_mixin_state_test.dart
View file @
2c0f369
...
...
@@ -32,7 +32,7 @@ void main() {
Text
(
'Map:
${controller.map.length}
'
,
),
Fla
tButton
(
Tex
tButton
(
child:
Text
(
"increment"
),
onPressed:
()
=>
controller
.
increment
(),
)
...
...
test/state_manager/get_obx_test.dart
View file @
2c0f369
...
...
@@ -17,7 +17,7 @@ void main() {
Text
(
'List:
${controller.list.length}
'
),
Text
(
'Bool:
${controller.boolean.value}
'
),
Text
(
'Map:
${controller.map.length}
'
),
Fla
tButton
(
Tex
tButton
(
child:
Text
(
"increment"
),
onPressed:
controller
.
increment
,
),
...
...
test/state_manager/get_rxstate_test.dart
View file @
2c0f369
...
...
@@ -30,7 +30,7 @@ void main() {
Text
(
'Map:
${controller.map.length}
'
,
),
Fla
tButton
(
Tex
tButton
(
child:
Text
(
"increment"
),
onPressed:
()
=>
controller
.
increment
(),
),
...
...
test/state_manager/get_state_test.dart
View file @
2c0f369
...
...
@@ -14,11 +14,11 @@ void main() {
Text
(
'
${controller.counter}
'
,
),
Fla
tButton
(
Tex
tButton
(
child:
Text
(
"increment"
),
onPressed:
()
=>
controller
.
increment
(),
),
Fla
tButton
(
Tex
tButton
(
child:
Text
(
"incrementWithId"
),
onPressed:
()
=>
controller
.
incrementWithId
(),
),
...
...
Please
register
or
login
to post a comment