Jonny Borges

update buttons to Material spec

@@ -136,7 +136,7 @@ class Home extends StatelessWidget { @@ -136,7 +136,7 @@ class Home extends StatelessWidget {
136 appBar: AppBar(title: Obx(() => Text("Clicks: " + c.count.string))), 136 appBar: AppBar(title: Obx(() => Text("Clicks: " + c.count.string))),
137 137
138 // Reemplace el Navigator.push de 8 líneas por un simple Get.to(). No necesitas contexto 138 // Reemplace el Navigator.push de 8 líneas por un simple Get.to(). No necesitas contexto
139 - body: Center(child: RaisedButton( 139 + body: Center(child: ElevatedButton(
140 child: Text("Go to Other"), onPressed: () => Get.to(Other()))), 140 child: Text("Go to Other"), onPressed: () => Get.to(Other()))),
141 floatingActionButton: 141 floatingActionButton:
142 FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment)); 142 FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment));
@@ -148,7 +148,7 @@ class Home extends StatelessWidget { @@ -148,7 +148,7 @@ class Home extends StatelessWidget {
148 appBar: AppBar(title: Obx(() => Text("Clicks: ${c.count}"))), 148 appBar: AppBar(title: Obx(() => Text("Clicks: ${c.count}"))),
149 149
150 // Remplacez les 8 lignes Navigator.push par un simple Get.to(). Vous n'avez pas besoin de 'context' 150 // Remplacez les 8 lignes Navigator.push par un simple Get.to(). Vous n'avez pas besoin de 'context'
151 - body: Center(child: RaisedButton( 151 + body: Center(child: ElevatedButton(
152 child: Text("Go to Other"), onPressed: () => Get.to(Other()))), 152 child: Text("Go to Other"), onPressed: () => Get.to(Other()))),
153 floatingActionButton: 153 floatingActionButton:
154 FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment)); 154 FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment));
@@ -148,7 +148,7 @@ class Home extends StatelessWidget { @@ -148,7 +148,7 @@ class Home extends StatelessWidget {
148 appBar: AppBar(title: Obx(() => Text("Clicks: ${c.count}"))), 148 appBar: AppBar(title: Obx(() => Text("Clicks: ${c.count}"))),
149 149
150 // Ganti 8 baris Navigator.push menggunan Get.to() agar lebih sederhana. Anda tidak perlu `context`. 150 // Ganti 8 baris Navigator.push menggunan Get.to() agar lebih sederhana. Anda tidak perlu `context`.
151 - body: Center(child: RaisedButton( 151 + body: Center(child: ElevatedButton(
152 child: Text("Go to Other"), onPressed: () => Get.to(Other()))), 152 child: Text("Go to Other"), onPressed: () => Get.to(Other()))),
153 floatingActionButton: 153 floatingActionButton:
154 FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment)); 154 FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment));
@@ -145,7 +145,7 @@ class Home extends StatelessWidget { @@ -145,7 +145,7 @@ class Home extends StatelessWidget {
145 appBar: AppBar(title: Obx(() => Text("Clicks: ${c.count}"))), 145 appBar: AppBar(title: Obx(() => Text("Clicks: ${c.count}"))),
146 146
147 // 8줄의 Navigator.push를 간단한 Get.to()로 변경합니다. context는 필요없습니다. 147 // 8줄의 Navigator.push를 간단한 Get.to()로 변경합니다. context는 필요없습니다.
148 - body: Center(child: RaisedButton( 148 + body: Center(child: ElevatedButton(
149 child: Text("Go to Other"), onPressed: () => Get.to(Other()))), 149 child: Text("Go to Other"), onPressed: () => Get.to(Other()))),
150 floatingActionButton: 150 floatingActionButton:
151 FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment)); 151 FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment));
@@ -149,7 +149,7 @@ class Home extends StatelessWidget { @@ -149,7 +149,7 @@ class Home extends StatelessWidget {
149 appBar: AppBar(title: Obx(() => Text("Clicks: ${c.count}"))), 149 appBar: AppBar(title: Obx(() => Text("Clicks: ${c.count}"))),
150 150
151 // Replace the 8 lines Navigator.push by a simple Get.to(). You don't need context 151 // Replace the 8 lines Navigator.push by a simple Get.to(). You don't need context
152 - body: Center(child: RaisedButton( 152 + body: Center(child: ElevatedButton(
153 child: Text("Go to Other"), onPressed: () => Get.to(Other()))), 153 child: Text("Go to Other"), onPressed: () => Get.to(Other()))),
154 floatingActionButton: 154 floatingActionButton:
155 FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment)); 155 FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment));
@@ -113,7 +113,7 @@ class Home extends StatelessWidget { @@ -113,7 +113,7 @@ class Home extends StatelessWidget {
113 appBar: AppBar(title: Obx(() => Text("Clicks: " + c.count.string))), 113 appBar: AppBar(title: Obx(() => Text("Clicks: " + c.count.string))),
114 114
115 // Replace the 8 lines Navigator.push by a simple Get.to(). You don't need context 115 // Replace the 8 lines Navigator.push by a simple Get.to(). You don't need context
116 - body: Center(child: RaisedButton( 116 + body: Center(child: ElevatedButton(
117 child: Text("Go to Other"), onPressed: () => Get.to(Other()))), 117 child: Text("Go to Other"), onPressed: () => Get.to(Other()))),
118 floatingActionButton: 118 floatingActionButton:
119 FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment)); 119 FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment));
@@ -158,7 +158,7 @@ class Home extends StatelessWidget { @@ -158,7 +158,7 @@ class Home extends StatelessWidget {
158 appBar: AppBar(title: Obx(() => Text("Total de cliques: ${c.count}"))), 158 appBar: AppBar(title: Obx(() => Text("Total de cliques: ${c.count}"))),
159 159
160 // Troque o Navigator.push de 8 linhas por um simples Get.to(). Você não precisa do 'context' 160 // Troque o Navigator.push de 8 linhas por um simples Get.to(). Você não precisa do 'context'
161 - body: Center(child: RaisedButton( 161 + body: Center(child: ElevatedButton(
162 child: Text("Ir pra Outra tela"), onPressed: () => Get.to(Outra()))), 162 child: Text("Ir pra Outra tela"), onPressed: () => Get.to(Outra()))),
163 floatingActionButton: 163 floatingActionButton:
164 FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment)); 164 FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment));
@@ -129,7 +129,7 @@ class Home extends StatelessWidget { @@ -129,7 +129,7 @@ class Home extends StatelessWidget {
129 appBar: AppBar(title: Obx(() => Text("Кликов: ${c.count}"))), 129 appBar: AppBar(title: Obx(() => Text("Кликов: ${c.count}"))),
130 130
131 // Замените 8 строк Navigator.push простым Get.to(). Вам не нужен context! 131 // Замените 8 строк Navigator.push простым Get.to(). Вам не нужен context!
132 - body: Center(child: RaisedButton( 132 + body: Center(child: ElevatedButton(
133 child: Text("Перейти к Other"), onPressed: () => Get.to(Other()))), 133 child: Text("Перейти к Other"), onPressed: () => Get.to(Other()))),
134 floatingActionButton: 134 floatingActionButton:
135 FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment)); 135 FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment));
@@ -137,7 +137,7 @@ class Home extends StatelessWidget { @@ -137,7 +137,7 @@ class Home extends StatelessWidget {
137 appBar: AppBar(title: Obx(() => Text("Clicks: ${c.count}"))), 137 appBar: AppBar(title: Obx(() => Text("Clicks: ${c.count}"))),
138 138
139 // Replace the 8 lines Navigator.push by a simple Get.to(). You don't need context 139 // Replace the 8 lines Navigator.push by a simple Get.to(). You don't need context
140 - body: Center(child: RaisedButton( 140 + body: Center(child: ElevatedButton(
141 child: Text("Go to Other"), onPressed: () => Get.to(Other()))), 141 child: Text("Go to Other"), onPressed: () => Get.to(Other()))),
142 floatingActionButton: 142 floatingActionButton:
143 FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment)); 143 FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment));
@@ -138,7 +138,7 @@ class Home extends StatelessWidget { @@ -138,7 +138,7 @@ class Home extends StatelessWidget {
138 appBar: AppBar(title: Obx(() => Text("Clicks: ${c.count}"))), 138 appBar: AppBar(title: Obx(() => Text("Clicks: ${c.count}"))),
139 139
140 // 用一个简单的Get.to()即可代替Navigator.push那8行,无需上下文! 140 // 用一个简单的Get.to()即可代替Navigator.push那8行,无需上下文!
141 - body: Center(child: RaisedButton( 141 + body: Center(child: ElevatedButton(
142 child: Text("Go to Other"), onPressed: () => Get.to(Other()))), 142 child: Text("Go to Other"), onPressed: () => Get.to(Other()))),
143 floatingActionButton: 143 floatingActionButton:
144 FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment)); 144 FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment));
@@ -313,7 +313,7 @@ class First extends StatelessWidget { @@ -313,7 +313,7 @@ class First extends StatelessWidget {
313 title: Text('First Route'), 313 title: Text('First Route'),
314 ), 314 ),
315 body: Center( 315 body: Center(
316 - child: RaisedButton( 316 + child: ElevatedButton(
317 child: Text('Open route'), 317 child: Text('Open route'),
318 onPressed: () { 318 onPressed: () {
319 Get.toNamed("/second"); 319 Get.toNamed("/second");
@@ -338,7 +338,7 @@ class Second extends StatelessWidget { @@ -338,7 +338,7 @@ class Second extends StatelessWidget {
338 title: Text('second Route'), 338 title: Text('second Route'),
339 ), 339 ),
340 body: Center( 340 body: Center(
341 - child: RaisedButton( 341 + child: ElevatedButton(
342 child: Text('Open route'), 342 child: Text('Open route'),
343 onPressed: () { 343 onPressed: () {
344 Get.toNamed("/third"); 344 Get.toNamed("/third");
@@ -357,7 +357,7 @@ class Third extends StatelessWidget { @@ -357,7 +357,7 @@ class Third extends StatelessWidget {
357 title: Text("Third Route"), 357 title: Text("Third Route"),
358 ), 358 ),
359 body: Center( 359 body: Center(
360 - child: RaisedButton( 360 + child: ElevatedButton(
361 onPressed: () { 361 onPressed: () {
362 Get.back(); 362 Get.back();
363 }, 363 },
@@ -428,7 +428,7 @@ Get.snackbar( @@ -428,7 +428,7 @@ Get.snackbar(
428 // Color leftBarIndicatorColor, 428 // Color leftBarIndicatorColor,
429 // List<BoxShadow> boxShadows, 429 // List<BoxShadow> boxShadows,
430 // Gradient backgroundGradient, 430 // Gradient backgroundGradient,
431 - // FlatButton mainButton, 431 + // TextButton mainButton,
432 // OnTap onTap, 432 // OnTap onTap,
433 // bool isDismissible, 433 // bool isDismissible,
434 // bool showProgressIndicator, 434 // bool showProgressIndicator,
@@ -518,7 +518,7 @@ Navigator( @@ -518,7 +518,7 @@ Navigator(
518 title: Text("Main"), 518 title: Text("Main"),
519 ), 519 ),
520 body: Center( 520 body: Center(
521 - child: FlatButton( 521 + child: TextButton(
522 color: Colors.blue, 522 color: Colors.blue,
523 onPressed: () { 523 onPressed: () {
524 Get.toNamed('/second', id:1); // navigate by your nested route by index 524 Get.toNamed('/second', id:1); // navigate by your nested route by index
@@ -312,7 +312,7 @@ class First extends StatelessWidget { @@ -312,7 +312,7 @@ class First extends StatelessWidget {
312 title: Text('First Route'), 312 title: Text('First Route'),
313 ), 313 ),
314 body: Center( 314 body: Center(
315 - child: RaisedButton( 315 + child: ElevatedButton(
316 child: Text('Open route'), 316 child: Text('Open route'),
317 onPressed: () { 317 onPressed: () {
318 Get.toNamed("/second"); 318 Get.toNamed("/second");
@@ -337,7 +337,7 @@ class Second extends StatelessWidget { @@ -337,7 +337,7 @@ class Second extends StatelessWidget {
337 title: Text('second Route'), 337 title: Text('second Route'),
338 ), 338 ),
339 body: Center( 339 body: Center(
340 - child: RaisedButton( 340 + child: ElevatedButton(
341 child: Text('Open route'), 341 child: Text('Open route'),
342 onPressed: () { 342 onPressed: () {
343 Get.toNamed("/third"); 343 Get.toNamed("/third");
@@ -356,7 +356,7 @@ class Third extends StatelessWidget { @@ -356,7 +356,7 @@ class Third extends StatelessWidget {
356 title: Text("Third Route"), 356 title: Text("Third Route"),
357 ), 357 ),
358 body: Center( 358 body: Center(
359 - child: RaisedButton( 359 + child: ElevatedButton(
360 onPressed: () { 360 onPressed: () {
361 Get.back(); 361 Get.back();
362 }, 362 },
@@ -427,7 +427,7 @@ Get.snackbar( @@ -427,7 +427,7 @@ Get.snackbar(
427 // Color leftBarIndicatorColor, 427 // Color leftBarIndicatorColor,
428 // List<BoxShadow> boxShadows, 428 // List<BoxShadow> boxShadows,
429 // Gradient backgroundGradient, 429 // Gradient backgroundGradient,
430 - // FlatButton mainButton, 430 + // TextButton mainButton,
431 // OnTap onTap, 431 // OnTap onTap,
432 // bool isDismissible, 432 // bool isDismissible,
433 // bool showProgressIndicator, 433 // bool showProgressIndicator,
@@ -519,7 +519,7 @@ Navigator( @@ -519,7 +519,7 @@ Navigator(
519 title: Text("Main"), 519 title: Text("Main"),
520 ), 520 ),
521 body: Center( 521 body: Center(
522 - child: FlatButton( 522 + child: TextButton(
523 color: Colors.blue, 523 color: Colors.blue,
524 onPressed: () { 524 onPressed: () {
525 Get.toNamed('/second', id:1); // navigate by your nested route by index 525 Get.toNamed('/second', id:1); // navigate by your nested route by index
@@ -314,7 +314,7 @@ class First extends StatelessWidget { @@ -314,7 +314,7 @@ class First extends StatelessWidget {
314 title: Text('First Route'), 314 title: Text('First Route'),
315 ), 315 ),
316 body: Center( 316 body: Center(
317 - child: RaisedButton( 317 + child: ElevatedButton(
318 child: Text('Open route'), 318 child: Text('Open route'),
319 onPressed: () { 319 onPressed: () {
320 Get.toNamed("/second"); 320 Get.toNamed("/second");
@@ -339,7 +339,7 @@ class Second extends StatelessWidget { @@ -339,7 +339,7 @@ class Second extends StatelessWidget {
339 title: Text('second Route'), 339 title: Text('second Route'),
340 ), 340 ),
341 body: Center( 341 body: Center(
342 - child: RaisedButton( 342 + child: ElevatedButton(
343 child: Text('Open route'), 343 child: Text('Open route'),
344 onPressed: () { 344 onPressed: () {
345 Get.toNamed("/third"); 345 Get.toNamed("/third");
@@ -358,7 +358,7 @@ class Third extends StatelessWidget { @@ -358,7 +358,7 @@ class Third extends StatelessWidget {
358 title: Text("Third Route"), 358 title: Text("Third Route"),
359 ), 359 ),
360 body: Center( 360 body: Center(
361 - child: RaisedButton( 361 + child: ElevatedButton(
362 onPressed: () { 362 onPressed: () {
363 Get.back(); 363 Get.back();
364 }, 364 },
@@ -428,7 +428,7 @@ Get.snackbar( @@ -428,7 +428,7 @@ Get.snackbar(
428 // Color leftBarIndicatorColor, 428 // Color leftBarIndicatorColor,
429 // List<BoxShadow> boxShadows, 429 // List<BoxShadow> boxShadows,
430 // Gradient backgroundGradient, 430 // Gradient backgroundGradient,
431 - // FlatButton mainButton, 431 + // TextButton mainButton,
432 // OnTap onTap, 432 // OnTap onTap,
433 // bool isDismissible, 433 // bool isDismissible,
434 // bool showProgressIndicator, 434 // bool showProgressIndicator,
@@ -518,7 +518,7 @@ Navigator( @@ -518,7 +518,7 @@ Navigator(
518 title: Text("Main"), 518 title: Text("Main"),
519 ), 519 ),
520 body: Center( 520 body: Center(
521 - child: FlatButton( 521 + child: TextButton(
522 color: Colors.blue, 522 color: Colors.blue,
523 onPressed: () { 523 onPressed: () {
524 Get.toNamed('/second', id:1); // naviguer votre itinéraire imbriqué par index 524 Get.toNamed('/second', id:1); // naviguer votre itinéraire imbriqué par index
@@ -315,7 +315,7 @@ class First extends StatelessWidget { @@ -315,7 +315,7 @@ class First extends StatelessWidget {
315 title: Text('Halaman Pertama'), 315 title: Text('Halaman Pertama'),
316 ), 316 ),
317 body: Center( 317 body: Center(
318 - child: RaisedButton( 318 + child: ElevatedButton(
319 child: Text('Pindah halaman'), 319 child: Text('Pindah halaman'),
320 onPressed: () { 320 onPressed: () {
321 Get.toNamed("/second"); 321 Get.toNamed("/second");
@@ -340,7 +340,7 @@ class Second extends StatelessWidget { @@ -340,7 +340,7 @@ class Second extends StatelessWidget {
340 title: Text('Halaman kedua'), 340 title: Text('Halaman kedua'),
341 ), 341 ),
342 body: Center( 342 body: Center(
343 - child: RaisedButton( 343 + child: ElevatedButton(
344 child: Text('Pindah halaman'), 344 child: Text('Pindah halaman'),
345 onPressed: () { 345 onPressed: () {
346 Get.toNamed("/third"); 346 Get.toNamed("/third");
@@ -359,7 +359,7 @@ class Third extends StatelessWidget { @@ -359,7 +359,7 @@ class Third extends StatelessWidget {
359 title: Text("Halaman ketiga"), 359 title: Text("Halaman ketiga"),
360 ), 360 ),
361 body: Center( 361 body: Center(
362 - child: RaisedButton( 362 + child: ElevatedButton(
363 onPressed: () { 363 onPressed: () {
364 Get.back(); 364 Get.back();
365 }, 365 },
@@ -430,7 +430,7 @@ Get.snackbar( @@ -430,7 +430,7 @@ Get.snackbar(
430 // Color leftBarIndicatorColor, 430 // Color leftBarIndicatorColor,
431 // List<BoxShadow> boxShadows, 431 // List<BoxShadow> boxShadows,
432 // Gradient backgroundGradient, 432 // Gradient backgroundGradient,
433 - // FlatButton mainButton, 433 + // TextButton mainButton,
434 // OnTap onTap, 434 // OnTap onTap,
435 // bool isDismissible, 435 // bool isDismissible,
436 // bool showProgressIndicator, 436 // bool showProgressIndicator,
@@ -520,7 +520,7 @@ Navigator( @@ -520,7 +520,7 @@ Navigator(
520 title: Text("Main"), 520 title: Text("Main"),
521 ), 521 ),
522 body: Center( 522 body: Center(
523 - child: FlatButton( 523 + child: TextButton(
524 color: Colors.blue, 524 color: Colors.blue,
525 onPressed: () { 525 onPressed: () {
526 Get.toNamed('/second', id:1); // pindah ke halaman bersarang anda menggunakan index 526 Get.toNamed('/second', id:1); // pindah ke halaman bersarang anda menggunakan index
@@ -313,7 +313,7 @@ class First extends StatelessWidget { @@ -313,7 +313,7 @@ class First extends StatelessWidget {
313 title: Text('First Route'), 313 title: Text('First Route'),
314 ), 314 ),
315 body: Center( 315 body: Center(
316 - child: RaisedButton( 316 + child: ElevatedButton(
317 child: Text('Open route'), 317 child: Text('Open route'),
318 onPressed: () { 318 onPressed: () {
319 Get.toNamed("/second"); 319 Get.toNamed("/second");
@@ -338,7 +338,7 @@ class Second extends StatelessWidget { @@ -338,7 +338,7 @@ class Second extends StatelessWidget {
338 title: Text('second Route'), 338 title: Text('second Route'),
339 ), 339 ),
340 body: Center( 340 body: Center(
341 - child: RaisedButton( 341 + child: ElevatedButton(
342 child: Text('Open route'), 342 child: Text('Open route'),
343 onPressed: () { 343 onPressed: () {
344 Get.toNamed("/third"); 344 Get.toNamed("/third");
@@ -357,7 +357,7 @@ class Third extends StatelessWidget { @@ -357,7 +357,7 @@ class Third extends StatelessWidget {
357 title: Text("Third Route"), 357 title: Text("Third Route"),
358 ), 358 ),
359 body: Center( 359 body: Center(
360 - child: RaisedButton( 360 + child: ElevatedButton(
361 onPressed: () { 361 onPressed: () {
362 Get.back(); 362 Get.back();
363 }, 363 },
@@ -428,7 +428,7 @@ Get.snackbar( @@ -428,7 +428,7 @@ Get.snackbar(
428 // Color leftBarIndicatorColor, 428 // Color leftBarIndicatorColor,
429 // List<BoxShadow> boxShadows, 429 // List<BoxShadow> boxShadows,
430 // Gradient backgroundGradient, 430 // Gradient backgroundGradient,
431 - // FlatButton mainButton, 431 + // TextButton mainButton,
432 // OnTap onTap, 432 // OnTap onTap,
433 // bool isDismissible, 433 // bool isDismissible,
434 // bool showProgressIndicator, 434 // bool showProgressIndicator,
@@ -518,7 +518,7 @@ Navigator( @@ -518,7 +518,7 @@ Navigator(
518 title: Text("Main"), 518 title: Text("Main"),
519 ), 519 ),
520 body: Center( 520 body: Center(
521 - child: FlatButton( 521 + child: TextButton(
522 color: Colors.blue, 522 color: Colors.blue,
523 onPressed: () { 523 onPressed: () {
524 Get.toNamed('/second', id:1); // index로 중첩된 경로를 탐색 524 Get.toNamed('/second', id:1); // index로 중첩된 경로를 탐색
@@ -140,7 +140,7 @@ Get.snackbar( @@ -140,7 +140,7 @@ Get.snackbar(
140 // Color leftBarIndicatorColor, 140 // Color leftBarIndicatorColor,
141 // List<BoxShadow> boxShadows, 141 // List<BoxShadow> boxShadows,
142 // Gradient backgroundGradient, 142 // Gradient backgroundGradient,
143 - // FlatButton mainButton, 143 + // TextButton mainButton,
144 // OnTap onTap, 144 // OnTap onTap,
145 // bool isDismissible, 145 // bool isDismissible,
146 // bool showProgressIndicator, 146 // bool showProgressIndicator,
@@ -393,7 +393,7 @@ class Primeira extends StatelessWidget { @@ -393,7 +393,7 @@ class Primeira extends StatelessWidget {
393 title: Text('Primeira rota'), 393 title: Text('Primeira rota'),
394 ), 394 ),
395 body: Center( 395 body: Center(
396 - child: RaisedButton( 396 + child: ElevatedButton(
397 child: Text('Abrir rota'), 397 child: Text('Abrir rota'),
398 onPressed: () { 398 onPressed: () {
399 Get.toNamed("/segunda"); 399 Get.toNamed("/segunda");
@@ -418,7 +418,7 @@ class Segunda extends StatelessWidget { @@ -418,7 +418,7 @@ class Segunda extends StatelessWidget {
418 title: Text('Segunda rota'), 418 title: Text('Segunda rota'),
419 ), 419 ),
420 body: Center( 420 body: Center(
421 - child: RaisedButton( 421 + child: ElevatedButton(
422 child: Text('Abrir rota'), 422 child: Text('Abrir rota'),
423 onPressed: () { 423 onPressed: () {
424 Get.toNamed("/terceira"); 424 Get.toNamed("/terceira");
@@ -437,7 +437,7 @@ class Terceira extends StatelessWidget { @@ -437,7 +437,7 @@ class Terceira extends StatelessWidget {
437 title: Text("Terceira Rota"), 437 title: Text("Terceira Rota"),
438 ), 438 ),
439 body: Center( 439 body: Center(
440 - child: RaisedButton( 440 + child: ElevatedButton(
441 onPressed: () { 441 onPressed: () {
442 Get.back(); 442 Get.back();
443 }, 443 },
@@ -512,7 +512,7 @@ Navigator( @@ -512,7 +512,7 @@ Navigator(
512 title: Text("Principal"), 512 title: Text("Principal"),
513 ), 513 ),
514 body: Center( 514 body: Center(
515 - child: FlatButton( 515 + child: TextButton(
516 color: Colors.blue, 516 color: Colors.blue,
517 child: Text("Ir para a segunda"), 517 child: Text("Ir para a segunda"),
518 onPressed: () { 518 onPressed: () {
@@ -313,7 +313,7 @@ class First extends StatelessWidget { @@ -313,7 +313,7 @@ class First extends StatelessWidget {
313 title: Text('First Route'), 313 title: Text('First Route'),
314 ), 314 ),
315 body: Center( 315 body: Center(
316 - child: RaisedButton( 316 + child: ElevatedButton(
317 child: Text('Open route'), 317 child: Text('Open route'),
318 onPressed: () { 318 onPressed: () {
319 Get.toNamed("/second"); 319 Get.toNamed("/second");
@@ -338,7 +338,7 @@ class Second extends StatelessWidget { @@ -338,7 +338,7 @@ class Second extends StatelessWidget {
338 title: Text('second Route'), 338 title: Text('second Route'),
339 ), 339 ),
340 body: Center( 340 body: Center(
341 - child: RaisedButton( 341 + child: ElevatedButton(
342 child: Text('Open route'), 342 child: Text('Open route'),
343 onPressed: () { 343 onPressed: () {
344 Get.toNamed("/third"); 344 Get.toNamed("/third");
@@ -357,7 +357,7 @@ class Third extends StatelessWidget { @@ -357,7 +357,7 @@ class Third extends StatelessWidget {
357 title: Text("Third Route"), 357 title: Text("Third Route"),
358 ), 358 ),
359 body: Center( 359 body: Center(
360 - child: RaisedButton( 360 + child: ElevatedButton(
361 onPressed: () { 361 onPressed: () {
362 Get.back(); 362 Get.back();
363 }, 363 },
@@ -428,7 +428,7 @@ Get.snackbar( @@ -428,7 +428,7 @@ Get.snackbar(
428 // Color leftBarIndicatorColor, 428 // Color leftBarIndicatorColor,
429 // List<BoxShadow> boxShadows, 429 // List<BoxShadow> boxShadows,
430 // Gradient backgroundGradient, 430 // Gradient backgroundGradient,
431 - // FlatButton mainButton, 431 + // TextButton mainButton,
432 // OnTap onTap, 432 // OnTap onTap,
433 // bool isDismissible, 433 // bool isDismissible,
434 // bool showProgressIndicator, 434 // bool showProgressIndicator,
@@ -518,7 +518,7 @@ Navigator( @@ -518,7 +518,7 @@ Navigator(
518 title: Text("Main"), 518 title: Text("Main"),
519 ), 519 ),
520 body: Center( 520 body: Center(
521 - child: FlatButton( 521 + child: TextButton(
522 color: Colors.blue, 522 color: Colors.blue,
523 onPressed: () { 523 onPressed: () {
524 Get.toNamed('/second', id:1); // navigate by your nested route by index 524 Get.toNamed('/second', id:1); // navigate by your nested route by index
@@ -308,7 +308,7 @@ class First extends StatelessWidget { @@ -308,7 +308,7 @@ class First extends StatelessWidget {
308 title: Text('First Route'), 308 title: Text('First Route'),
309 ), 309 ),
310 body: Center( 310 body: Center(
311 - child: RaisedButton( 311 + child: ElevatedButton(
312 child: Text('Open route'), 312 child: Text('Open route'),
313 onPressed: () { 313 onPressed: () {
314 Get.toNamed("/second"); 314 Get.toNamed("/second");
@@ -333,7 +333,7 @@ class Second extends StatelessWidget { @@ -333,7 +333,7 @@ class Second extends StatelessWidget {
333 title: Text('second Route'), 333 title: Text('second Route'),
334 ), 334 ),
335 body: Center( 335 body: Center(
336 - child: RaisedButton( 336 + child: ElevatedButton(
337 child: Text('Open route'), 337 child: Text('Open route'),
338 onPressed: () { 338 onPressed: () {
339 Get.toNamed("/third"); 339 Get.toNamed("/third");
@@ -352,7 +352,7 @@ class Third extends StatelessWidget { @@ -352,7 +352,7 @@ class Third extends StatelessWidget {
352 title: Text("Third Route"), 352 title: Text("Third Route"),
353 ), 353 ),
354 body: Center( 354 body: Center(
355 - child: RaisedButton( 355 + child: ElevatedButton(
356 onPressed: () { 356 onPressed: () {
357 Get.back(); 357 Get.back();
358 }, 358 },
@@ -422,7 +422,7 @@ Get.snackbar( @@ -422,7 +422,7 @@ Get.snackbar(
422 // Color leftBarIndicatorColor, 422 // Color leftBarIndicatorColor,
423 // List<BoxShadow> boxShadows, 423 // List<BoxShadow> boxShadows,
424 // Gradient backgroundGradient, 424 // Gradient backgroundGradient,
425 - // FlatButton mainButton, 425 + // TextButton mainButton,
426 // OnTap onTap, 426 // OnTap onTap,
427 // bool isDismissible, 427 // bool isDismissible,
428 // bool showProgressIndicator, 428 // bool showProgressIndicator,
@@ -512,7 +512,7 @@ Navigator( @@ -512,7 +512,7 @@ Navigator(
512 title: Text("Main"), 512 title: Text("Main"),
513 ), 513 ),
514 body: Center( 514 body: Center(
515 - child: FlatButton( 515 + child: TextButton(
516 color: Colors.blue, 516 color: Colors.blue,
517 onPressed: () { 517 onPressed: () {
518 Get.toNamed('/second', id:1); // navigate by your nested route by index 518 Get.toNamed('/second', id:1); // navigate by your nested route by index
@@ -53,7 +53,7 @@ class Home extends StatelessWidget { @@ -53,7 +53,7 @@ class Home extends StatelessWidget {
53 builder: (_) => Text( 53 builder: (_) => Text(
54 'clicks: ${controller.count}', 54 'clicks: ${controller.count}',
55 )), 55 )),
56 - RaisedButton( 56 + ElevatedButton(
57 child: Text('Next Route'), 57 child: Text('Next Route'),
58 onPressed: () { 58 onPressed: () {
59 Get.to(Second()); 59 Get.to(Second());
@@ -120,7 +120,7 @@ class Home extends StatelessWidget { @@ -120,7 +120,7 @@ class Home extends StatelessWidget {
120 builder: (_) => Text( 120 builder: (_) => Text(
121 'clicks: ${controller.count}', 121 'clicks: ${controller.count}',
122 )), 122 )),
123 - RaisedButton( 123 + ElevatedButton(
124 child: Text('Next Route'), 124 child: Text('Next Route'),
125 onPressed: () { 125 onPressed: () {
126 Get.to(Second()); 126 Get.to(Second());
@@ -161,7 +161,7 @@ class Home extends StatelessWidget { @@ -161,7 +161,7 @@ class Home extends StatelessWidget {
161 Obx(() => Text( 161 Obx(() => Text(
162 'clicks: ${controller.count}', 162 'clicks: ${controller.count}',
163 )), 163 )),
164 - RaisedButton( 164 + ElevatedButton(
165 child: Text('Next Route'), 165 child: Text('Next Route'),
166 onPressed: () { 166 onPressed: () {
167 Get.to(Second()); 167 Get.to(Second());
@@ -362,13 +362,13 @@ class First extends StatelessWidget { @@ -362,13 +362,13 @@ class First extends StatelessWidget {
362 builder: (_) => Text( 362 builder: (_) => Text(
363 'clicks: ${_.count}', 363 'clicks: ${_.count}',
364 )), 364 )),
365 - RaisedButton( 365 + ElevatedButton(
366 child: Text('Next Route'), 366 child: Text('Next Route'),
367 onPressed: () { 367 onPressed: () {
368 Get.toNamed('/second'); 368 Get.toNamed('/second');
369 }, 369 },
370 ), 370 ),
371 - RaisedButton( 371 + ElevatedButton(
372 child: Text('Change locale to English'), 372 child: Text('Change locale to English'),
373 onPressed: () { 373 onPressed: () {
374 Get.updateLocale(Locale('en', 'UK')); 374 Get.updateLocale(Locale('en', 'UK'));
@@ -421,13 +421,13 @@ class Second extends GetView<ControllerX> { @@ -421,13 +421,13 @@ class Second extends GetView<ControllerX> {
421 GetX<ControllerX>( 421 GetX<ControllerX>(
422 builder: (_) => Text('Age: ${_.user.value.age}'), 422 builder: (_) => Text('Age: ${_.user.value.age}'),
423 ), 423 ),
424 - RaisedButton( 424 + ElevatedButton(
425 child: Text("Go to last page"), 425 child: Text("Go to last page"),
426 onPressed: () { 426 onPressed: () {
427 Get.toNamed('/third', arguments: 'arguments of second'); 427 Get.toNamed('/third', arguments: 'arguments of second');
428 }, 428 },
429 ), 429 ),
430 - RaisedButton( 430 + ElevatedButton(
431 child: Text("Back page and open snackbar"), 431 child: Text("Back page and open snackbar"),
432 onPressed: () { 432 onPressed: () {
433 Get.back(); 433 Get.back();
@@ -437,25 +437,25 @@ class Second extends GetView<ControllerX> { @@ -437,25 +437,25 @@ class Second extends GetView<ControllerX> {
437 ); 437 );
438 }, 438 },
439 ), 439 ),
440 - RaisedButton( 440 + ElevatedButton(
441 child: Text("Increment"), 441 child: Text("Increment"),
442 onPressed: () { 442 onPressed: () {
443 Get.find<ControllerX>().increment(); 443 Get.find<ControllerX>().increment();
444 }, 444 },
445 ), 445 ),
446 - RaisedButton( 446 + ElevatedButton(
447 child: Text("Increment"), 447 child: Text("Increment"),
448 onPressed: () { 448 onPressed: () {
449 Get.find<ControllerX>().increment2(); 449 Get.find<ControllerX>().increment2();
450 }, 450 },
451 ), 451 ),
452 - RaisedButton( 452 + ElevatedButton(
453 child: Text("Update name"), 453 child: Text("Update name"),
454 onPressed: () { 454 onPressed: () {
455 Get.find<ControllerX>().updateUser(); 455 Get.find<ControllerX>().updateUser();
456 }, 456 },
457 ), 457 ),
458 - RaisedButton( 458 + ElevatedButton(
459 child: Text("Dispose worker"), 459 child: Text("Dispose worker"),
460 onPressed: () { 460 onPressed: () {
461 Get.find<ControllerX>().disposeWorker(); 461 Get.find<ControllerX>().disposeWorker();
@@ -61,18 +61,24 @@ class HomeView extends GetView<HomeController> { @@ -61,18 +61,24 @@ class HomeView extends GetView<HomeController> {
61 SizedBox( 61 SizedBox(
62 height: 10, 62 height: 10,
63 ), 63 ),
64 - OutlineButton(  
65 - borderSide: BorderSide(  
66 - color: Colors.deepPurple,  
67 - width: 3, 64 + OutlinedButton(
  65 + style: OutlinedButton.styleFrom(
  66 + textStyle: TextStyle(color: Colors.black),
  67 + side: BorderSide(
  68 + color: Colors.deepPurple,
  69 + width: 3,
  70 + ),
  71 + shape: StadiumBorder(),
68 ), 72 ),
69 - shape: StadiumBorder(),  
70 onPressed: () { 73 onPressed: () {
71 Get.toNamed('/home/country'); 74 Get.toNamed('/home/country');
72 }, 75 },
73 child: Text( 76 child: Text(
74 'fetch_country'.tr, 77 'fetch_country'.tr,
75 - style: TextStyle(fontWeight: FontWeight.bold), 78 + style: TextStyle(
  79 + fontWeight: FontWeight.bold,
  80 + color: Colors.black,
  81 + ),
76 ), 82 ),
77 ) 83 )
78 ], 84 ],
@@ -125,7 +125,7 @@ extension ExtensionSnackbar on GetInterface { @@ -125,7 +125,7 @@ extension ExtensionSnackbar on GetInterface {
125 Color leftBarIndicatorColor, 125 Color leftBarIndicatorColor,
126 List<BoxShadow> boxShadows, 126 List<BoxShadow> boxShadows,
127 Gradient backgroundGradient, 127 Gradient backgroundGradient,
128 - FlatButton mainButton, 128 + TextButton mainButton,
129 OnTap onTap, 129 OnTap onTap,
130 bool isDismissible, 130 bool isDismissible,
131 bool showProgressIndicator, 131 bool showProgressIndicator,
@@ -326,23 +326,25 @@ extension ExtensionDialog on GetInterface { @@ -326,23 +326,25 @@ extension ExtensionDialog on GetInterface {
326 actions.add(cancel); 326 actions.add(cancel);
327 } else { 327 } else {
328 if (leanCancel) { 328 if (leanCancel) {
329 - actions.add(FlatButton(  
330 - materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, 329 + actions.add(TextButton(
  330 + style: TextButton.styleFrom(
  331 + tapTargetSize: MaterialTapTargetSize.shrinkWrap,
  332 + padding: EdgeInsets.symmetric(horizontal: 10, vertical: 8),
  333 + shape: RoundedRectangleBorder(
  334 + side: BorderSide(
  335 + color: buttonColor ?? theme.accentColor,
  336 + width: 2,
  337 + style: BorderStyle.solid),
  338 + borderRadius: BorderRadius.circular(100)),
  339 + ),
331 onPressed: () { 340 onPressed: () {
332 onCancel?.call(); 341 onCancel?.call();
333 back(); 342 back();
334 }, 343 },
335 - padding: EdgeInsets.symmetric(horizontal: 10, vertical: 8),  
336 child: Text( 344 child: Text(
337 textCancel ?? "Cancel", 345 textCancel ?? "Cancel",
338 style: TextStyle(color: cancelTextColor ?? theme.accentColor), 346 style: TextStyle(color: cancelTextColor ?? theme.accentColor),
339 ), 347 ),
340 - shape: RoundedRectangleBorder(  
341 - side: BorderSide(  
342 - color: buttonColor ?? theme.accentColor,  
343 - width: 2,  
344 - style: BorderStyle.solid),  
345 - borderRadius: BorderRadius.circular(100)),  
346 )); 348 ));
347 } 349 }
348 } 350 }
@@ -350,14 +352,18 @@ extension ExtensionDialog on GetInterface { @@ -350,14 +352,18 @@ extension ExtensionDialog on GetInterface {
350 actions.add(confirm); 352 actions.add(confirm);
351 } else { 353 } else {
352 if (leanConfirm) { 354 if (leanConfirm) {
353 - actions.add(FlatButton(  
354 - materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,  
355 - color: buttonColor ?? theme.accentColor,  
356 - shape: RoundedRectangleBorder(  
357 - borderRadius: BorderRadius.circular(100)), 355 + actions.add(TextButton(
  356 + style: TextButton.styleFrom(
  357 + tapTargetSize: MaterialTapTargetSize.shrinkWrap,
  358 + //color: buttonColor ?? theme.accentColor,
  359 + backgroundColor: buttonColor ?? theme.accentColor,
  360 + shape: RoundedRectangleBorder(
  361 + borderRadius: BorderRadius.circular(100)),
  362 + ),
358 child: Text( 363 child: Text(
359 textConfirm ?? "Ok", 364 textConfirm ?? "Ok",
360 - style: TextStyle(color: confirmTextColor ?? theme.primaryColor), 365 + style:
  366 + TextStyle(color: confirmTextColor ?? theme.backgroundColor),
361 ), 367 ),
362 onPressed: () { 368 onPressed: () {
363 onConfirm?.call(); 369 onConfirm?.call();
@@ -13,7 +13,7 @@ dependencies: @@ -13,7 +13,7 @@ dependencies:
13 dev_dependencies: 13 dev_dependencies:
14 flutter_test: 14 flutter_test:
15 sdk: flutter 15 sdk: flutter
16 - effective_dart: ^1.0.0 16 +
17 17
18 # For information on the generic Dart part of this file, see the 18 # For information on the generic Dart part of this file, see the
19 # following page: https://dart.dev/tools/pub/pubspec 19 # following page: https://dart.dev/tools/pub/pubspec
@@ -485,7 +485,7 @@ void main() { @@ -485,7 +485,7 @@ void main() {
485 await tester.pumpWidget( 485 await tester.pumpWidget(
486 GetMaterialApp( 486 GetMaterialApp(
487 popGesture: true, 487 popGesture: true,
488 - home: RaisedButton( 488 + home: ElevatedButton(
489 child: Text('Open Snackbar'), 489 child: Text('Open Snackbar'),
490 onPressed: () { 490 onPressed: () {
491 Get.snackbar('title', "message", duration: Duration(seconds: 1)); 491 Get.snackbar('title', "message", duration: Duration(seconds: 1));
@@ -504,7 +504,7 @@ void main() { @@ -504,7 +504,7 @@ void main() {
504 testWidgets("Get.rawSnackbar test", (tester) async { 504 testWidgets("Get.rawSnackbar test", (tester) async {
505 await tester.pumpWidget( 505 await tester.pumpWidget(
506 Wrapper( 506 Wrapper(
507 - child: RaisedButton( 507 + child: ElevatedButton(
508 child: Text('Open Snackbar'), 508 child: Text('Open Snackbar'),
509 onPressed: () { 509 onPressed: () {
510 Get.rawSnackbar( 510 Get.rawSnackbar(
@@ -32,7 +32,7 @@ void main() { @@ -32,7 +32,7 @@ void main() {
32 Text( 32 Text(
33 'Map: ${controller.map.length}', 33 'Map: ${controller.map.length}',
34 ), 34 ),
35 - FlatButton( 35 + TextButton(
36 child: Text("increment"), 36 child: Text("increment"),
37 onPressed: () => controller.increment(), 37 onPressed: () => controller.increment(),
38 ) 38 )
@@ -17,7 +17,7 @@ void main() { @@ -17,7 +17,7 @@ void main() {
17 Text('List: ${controller.list.length}'), 17 Text('List: ${controller.list.length}'),
18 Text('Bool: ${controller.boolean.value}'), 18 Text('Bool: ${controller.boolean.value}'),
19 Text('Map: ${controller.map.length}'), 19 Text('Map: ${controller.map.length}'),
20 - FlatButton( 20 + TextButton(
21 child: Text("increment"), 21 child: Text("increment"),
22 onPressed: controller.increment, 22 onPressed: controller.increment,
23 ), 23 ),
@@ -30,7 +30,7 @@ void main() { @@ -30,7 +30,7 @@ void main() {
30 Text( 30 Text(
31 'Map: ${controller.map.length}', 31 'Map: ${controller.map.length}',
32 ), 32 ),
33 - FlatButton( 33 + TextButton(
34 child: Text("increment"), 34 child: Text("increment"),
35 onPressed: () => controller.increment(), 35 onPressed: () => controller.increment(),
36 ), 36 ),
@@ -14,11 +14,11 @@ void main() { @@ -14,11 +14,11 @@ void main() {
14 Text( 14 Text(
15 '${controller.counter}', 15 '${controller.counter}',
16 ), 16 ),
17 - FlatButton( 17 + TextButton(
18 child: Text("increment"), 18 child: Text("increment"),
19 onPressed: () => controller.increment(), 19 onPressed: () => controller.increment(),
20 ), 20 ),
21 - FlatButton( 21 + TextButton(
22 child: Text("incrementWithId"), 22 child: Text("incrementWithId"),
23 onPressed: () => controller.incrementWithId(), 23 onPressed: () => controller.incrementWithId(),
24 ), 24 ),